Bug 1532477 - Return BEnd() from LogicalRect::YMost() in the case of non vertical. r=dholbert
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Tue, 05 Mar 2019 01:22:06 +0000
changeset 520183 7c5b913dc2e3b68cb7b019574de03d7b5d8de364
parent 520182 b6a5fe5a1c5287718bab9da980c212afac30a8ee
child 520204 c59f0f40e0f6995c2bf70499e783afc7626cab96
child 520205 5d76e6e7025c4a7b26aa95b60ae54fcc713e78a6
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1532477
milestone67.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 1532477 - Return BEnd() from LogicalRect::YMost() in the case of non vertical. r=dholbert Differential Revision: https://phabricator.services.mozilla.com/D22035
layout/generic/WritingModes.h
--- a/layout/generic/WritingModes.h
+++ b/layout/generic/WritingModes.h
@@ -1560,60 +1560,56 @@ class LogicalRect {
 
   /**
    * Physical coordinates of the rect.
    */
   nscoord X(WritingMode aWritingMode, nscoord aContainerWidth) const {
     CHECK_WRITING_MODE(aWritingMode);
     if (aWritingMode.IsVertical()) {
       return aWritingMode.IsVerticalLR() ? mBStart : aContainerWidth - BEnd();
-    } else {
-      return aWritingMode.IsInlineReversed() ? aContainerWidth - IEnd()
-                                             : mIStart;
     }
+    return aWritingMode.IsInlineReversed() ? aContainerWidth - IEnd()
+                                           : mIStart;
   }
 
   nscoord Y(WritingMode aWritingMode, nscoord aContainerHeight) const {
     CHECK_WRITING_MODE(aWritingMode);
     if (aWritingMode.IsVertical()) {
       return aWritingMode.IsInlineReversed() ? aContainerHeight - IEnd()
                                              : mIStart;
-    } else {
-      return mBStart;
     }
+    return mBStart;
   }
 
   nscoord Width(WritingMode aWritingMode) const {
     CHECK_WRITING_MODE(aWritingMode);
     return aWritingMode.IsVertical() ? mBSize : mISize;
   }
 
   nscoord Height(WritingMode aWritingMode) const {
     CHECK_WRITING_MODE(aWritingMode);
     return aWritingMode.IsVertical() ? mISize : mBSize;
   }
 
   nscoord XMost(WritingMode aWritingMode, nscoord aContainerWidth) const {
     CHECK_WRITING_MODE(aWritingMode);
     if (aWritingMode.IsVertical()) {
       return aWritingMode.IsVerticalLR() ? BEnd() : aContainerWidth - mBStart;
-    } else {
-      return aWritingMode.IsInlineReversed() ? aContainerWidth - mIStart
-                                             : IEnd();
     }
+    return aWritingMode.IsInlineReversed() ? aContainerWidth - mIStart
+                                           : IEnd();
   }
 
   nscoord YMost(WritingMode aWritingMode, nscoord aContainerHeight) const {
     CHECK_WRITING_MODE(aWritingMode);
     if (aWritingMode.IsVertical()) {
       return aWritingMode.IsInlineReversed() ? aContainerHeight - mIStart
                                              : IEnd();
-    } else {
-      return mBStart;
     }
+    return BEnd();
   }
 
   bool IsEmpty() const { return mISize <= 0 || mBSize <= 0; }
 
   bool IsAllZero() const {
     return (mIStart == 0 && mBStart == 0 && mISize == 0 && mBSize == 0);
   }