From ea6940e78389cf0d16b9e66e9943ba220a387a8d Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Sat, 13 Dec 2014 11:48:30 +1100 Subject: [PATCH] Bug 1108429 part 3 - Add flag to indicate the existance of ruby. r=roc --HG-- extra : source : 322ca21457397001c361db0ea766367d19b9b9a1 --- layout/generic/nsLineLayout.cpp | 6 +++++- layout/generic/nsLineLayout.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/layout/generic/nsLineLayout.cpp b/layout/generic/nsLineLayout.cpp index a11df4b0fe12..2990d09046df 100644 --- a/layout/generic/nsLineLayout.cpp +++ b/layout/generic/nsLineLayout.cpp @@ -77,7 +77,8 @@ nsLineLayout::nsLineLayout(nsPresContext* aPresContext, mInFirstLetter(false), mHasBullet(false), mDirtyNextLine(false), - mLineAtStart(false) + mLineAtStart(false), + mHasRuby(false) { MOZ_ASSERT(aOuterReflowState, "aOuterReflowState must not be null"); NS_ASSERTION(aFloatManager || aOuterReflowState->frame->GetType() == @@ -1084,6 +1085,9 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame, // nonempty leaf content has been placed mLineAtStart = false; } + if (nsGkAtoms::rubyFrame == frameType) { + mHasRuby = true; + } } // Place the frame, updating aBounds with the final size and diff --git a/layout/generic/nsLineLayout.h b/layout/generic/nsLineLayout.h index 2a6e0605aeb8..c4b6173ff2a5 100644 --- a/layout/generic/nsLineLayout.h +++ b/layout/generic/nsLineLayout.h @@ -578,6 +578,7 @@ protected: bool mHasBullet : 1; bool mDirtyNextLine : 1; bool mLineAtStart : 1; + bool mHasRuby : 1; int32_t mSpanDepth; #ifdef DEBUG