diff --git a/layout/generic/nsLineLayout.cpp b/layout/generic/nsLineLayout.cpp index 7d1c0cc79aa..2ff1a7169db 100644 --- a/layout/generic/nsLineLayout.cpp +++ b/layout/generic/nsLineLayout.cpp @@ -743,14 +743,6 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame, printf("\n"); #endif - // See if this frame depends on the width of its containing block. If - // so, disable resize reflow optimizations for the line. (Note that, - // to be conservative, we do this if we *try* to fit a frame on a - // line, even if we don't succeed.) - if (GetFlag(LL_GOTLINEBOX) && IsPercentageAware(aFrame)) { - mLineBox->DisableResizeReflowOptimization(); - } - mTextJustificationNumSpaces = 0; mTextJustificationNumLetters = 0; @@ -824,6 +816,17 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame, // so no need to propagate NS_FRAME_IS_DIRTY from the parent. } + // See if this frame depends on the width of its containing block. If + // so, disable resize reflow optimizations for the line. (Note that, + // to be conservative, we do this if we *try* to fit a frame on a + // line, even if we don't succeed.) (Note also that we can only make + // this IsPercentageAware check *after* we've constructed our + // nsHTMLReflowState, because that construction may be what forces aFrame + // to lazily initialize its (possibly-percent-valued) intrinsic size.) + if (GetFlag(LL_GOTLINEBOX) && IsPercentageAware(aFrame)) { + mLineBox->DisableResizeReflowOptimization(); + } + // Let frame know that are reflowing it. Note that we don't bother // positioning the frame yet, because we're probably going to end up // moving it when we do the vertical alignment diff --git a/layout/reftests/svg/as-image/reftest.list b/layout/reftests/svg/as-image/reftest.list index f859257a531..6e1766d3e3d 100644 --- a/layout/reftests/svg/as-image/reftest.list +++ b/layout/reftests/svg/as-image/reftest.list @@ -58,7 +58,7 @@ asserts(72) == img-and-image-1.html img-and-image-1-ref.svg # More complex tests random-if(gtk2Widget) == img-anim-1.html lime100x100-ref.html # bug 612214 == img-content-outside-viewBox-1.html img-content-outside-viewBox-1-ref.html -random == img-dyn-1.html img-dyn-1-ref.html # Bug 596478 +== img-dyn-1.html img-dyn-1-ref.html fails-if(d2d) == img-widthAndHeight-meet-1.html img-widthAndHeight-meet-1-ref.html # bug 633072 == img-widthAndHeight-meet-2.html img-widthAndHeight-meet-2-ref.html