Bug 1272997 - Ensure block-dir resize is always respected for vertical-rl. r?jfkthame draft
authorXidorn Quan <me@upsuper.org>
Mon, 16 May 2016 17:01:51 +1000
changeset 367254 96bfad3131ac2fb7ccaa28b12cc71d3b9e1e7a6b
parent 367253 d4b4211061c79fe209501c970b3cde7ab26c2b60
child 520953 cc8bcde100e626d33788e2d5e867a718cb3c0f98
push id18179
push userxquan@mozilla.com
push dateMon, 16 May 2016 07:02:25 +0000
reviewersjfkthame
bugs1272997
milestone49.0a1
Bug 1272997 - Ensure block-dir resize is always respected for vertical-rl. r?jfkthame MozReview-Commit-ID: GtPAvGN2gIv
layout/generic/nsHTMLReflowState.cpp
--- a/layout/generic/nsHTMLReflowState.cpp
+++ b/layout/generic/nsHTMLReflowState.cpp
@@ -663,17 +663,21 @@ nsHTMLReflowState::InitResizeFlags(nsPre
     }
   } else if (ComputedBSize() == NS_AUTOHEIGHT) {
     if (eCompatibility_NavQuirks == aPresContext->CompatibilityMode() &&
         mCBReflowState) {
       SetBResize(mCBReflowState->IsBResize());
     } else {
       SetBResize(IsIResize());
     }
-    SetBResize(IsBResize() || NS_SUBTREE_DIRTY(frame));
+    // We always care about block-direction resize for vertical-rl
+    // because in that case, content is aligned to the right, thus we
+    // need to ensure everything is positioned correctly after resize.
+    SetBResize(IsBResize() || wm.IsVerticalRL()
+               || NS_SUBTREE_DIRTY(frame));
   } else {
     // not 'auto' block-size
     SetBResize(frame->BSize(wm) !=
                ComputedBSize() + ComputedLogicalBorderPadding().BStartEnd(wm));
   }
 
   bool dependsOnCBBSize =
     (mStylePosition->BSizeDependsOnContainer(wm) &&