Bug 1087954 - Fix invalid mix of logical/physical coordinate systems in nsLineLayout::AllowForStartMargin. r=smontagu
authorJonathan Kew <jkew@mozilla.com>
Fri, 24 Oct 2014 12:24:40 +0100
changeset 212226 0114b29a07303f24ea384bdac60548ec9d1a3a9a
parent 212225 155f1e8a15787a475e9535843f5a2e790c0c8a4f
child 212227 eaaa68a7c2d8085969f5f15304b790bbf992ff63
push id27702
push userkwierso@gmail.com
push dateFri, 24 Oct 2014 22:05:50 +0000
treeherdermozilla-central@c70f62375f7d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmontagu
bugs1087954
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1087954 - Fix invalid mix of logical/physical coordinate systems in nsLineLayout::AllowForStartMargin. r=smontagu
layout/generic/nsLineLayout.cpp
--- a/layout/generic/nsLineLayout.cpp
+++ b/layout/generic/nsLineLayout.cpp
@@ -1096,26 +1096,26 @@ nsLineLayout::AllowForStartMargin(PerFra
   if ((pfd->mFrame->GetPrevContinuation() ||
        pfd->mFrame->FrameIsNonFirstInIBSplit()) &&
       aReflowState.mStyleBorder->mBoxDecorationBreak ==
         NS_STYLE_BOX_DECORATION_BREAK_SLICE) {
     // Zero this out so that when we compute the max-element-width of
     // the frame we will properly avoid adding in the starting margin.
     pfd->mMargin.IStart(frameWM) = 0;
   } else {
-    NS_WARN_IF_FALSE(NS_UNCONSTRAINEDSIZE != aReflowState.AvailableWidth(),
-                     "have unconstrained width; this should only result from "
-                     "very large sizes, not attempts at intrinsic width "
-                     "calculation");
-    if (NS_UNCONSTRAINEDSIZE == aReflowState.ComputedWidth()) {
+    NS_WARN_IF_FALSE(NS_UNCONSTRAINEDSIZE != aReflowState.AvailableISize(),
+                     "have unconstrained inline-size; this should only result "
+                     "from very large sizes, not attempts at intrinsic "
+                     "inline-size calculation");
+    if (NS_UNCONSTRAINEDSIZE == aReflowState.ComputedISize()) {
       // For inline-ish and text-ish things (which don't compute widths
-      // in the reflow state), adjust available width to account for the
+      // in the reflow state), adjust available inline-size to account for the
       // start margin. The end margin will be accounted for when we
       // finish flowing the frame.
-      aReflowState.AvailableWidth() -= pfd->mMargin.IStart(frameWM);
+      aReflowState.AvailableISize() -= pfd->mMargin.IStart(frameWM);
     }
   }
 }
 
 nscoord
 nsLineLayout::GetCurrentFrameInlineDistanceFromBlock()
 {
   PerSpanData* psd;