Backed out changeset e36492ae23a6 (bug 1094434) for Android Reftest Failures on a CLOSED TREE
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 13 Nov 2014 12:04:06 +0100
changeset 215499 eb4d49f980d51b33fb5ea4e5d5fdec5b97a5d904
parent 215498 4cb11ba92d434e11b65ae6a44825d3faa402e012
child 215500 ae27ae77e32f5c76f925daff1b29be21ec77f5e6
child 215501 c49c2442f6667ae518c03ed9fb8bcf3c1a8b5578
push id27817
push usercbook@mozilla.com
push dateThu, 13 Nov 2014 15:21:11 +0000
treeherdermozilla-central@ae27ae77e32f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1094434
milestone36.0a1
backs oute36492ae23a67530e0e12dc810971bffe251b797
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
Backed out changeset e36492ae23a6 (bug 1094434) for Android Reftest Failures on a CLOSED TREE
layout/xul/nsResizerFrame.cpp
toolkit/content/widgets/resizer.xml
widget/nsNativeTheme.cpp
--- a/layout/xul/nsResizerFrame.cpp
+++ b/layout/xul/nsResizerFrame.cpp
@@ -497,38 +497,31 @@ nsResizerFrame::GetDirection()
 
   static const Direction directions[] =
     {{-1, -1}, {0, -1}, {1, -1},
      {-1,  0},          {1,  0},
      {-1,  1}, {0,  1}, {1,  1},
      {-1,  1},          {1,  1}
     };
 
-  if (!GetContent()) {
+  if (!GetContent())
     return directions[0]; // default: topleft
-  }
 
   int32_t index = GetContent()->FindAttrValueIn(kNameSpaceID_None,
                                                 nsGkAtoms::dir,
                                                 strings, eCaseMatters);
-  if (index < 0) {
+  if(index < 0)
     return directions[0]; // default: topleft
-  }
-
-  if (index >= 8) {
+  else if (index >= 8 && StyleVisibility()->mDirection == NS_STYLE_DIRECTION_RTL) {
     // Directions 8 and higher are RTL-aware directions and should reverse the
     // horizontal component if RTL.
-    WritingMode wm = GetWritingMode();
-    if (!(wm.IsVertical() ? wm.IsVerticalLR() : wm.IsBidiLTR())) {
-      Direction direction = directions[index];
-      direction.mHorizontal *= -1;
-      return direction;
-    }
+    Direction direction = directions[index];
+    direction.mHorizontal *= -1;
+    return direction;
   }
-
   return directions[index];
 }
 
 void
 nsResizerFrame::MouseClicked(nsPresContext* aPresContext,
                              WidgetMouseEvent* aEvent)
 {
   // Execute the oncommand event handler.
--- a/toolkit/content/widgets/resizer.xml
+++ b/toolkit/content/widgets/resizer.xml
@@ -16,24 +16,18 @@
       <![CDATA[
         // don't do this for viewport resizers; causes a crash related to
         // bugs 563665 and 581536 otherwise
         if (this.parentNode == this.ownerDocument.documentElement)
           return;
 
         // if the direction is rtl, set the rtl attribute so that the
         // stylesheet can use this to make the cursor appear properly
-        var cs = window.getComputedStyle(this, "");
-        if (cs.writingMode == "horizontal-tb") {;
-          if (cs.direction == "rtl") {
-            this.setAttribute("rtl", "true");
-          }
-        } else {
-          if (cs.writingMode == "vertical-rl") {
-            this.setAttribute("rtl", "true");
-          }
+        var direction = window.getComputedStyle(this, "").direction;
+        if (direction == "rtl") {
+          this.setAttribute("rtl", "true");
         }
       ]]>
       </constructor>
     </implementation>
   </binding>
 
 </bindings>
--- a/widget/nsNativeTheme.cpp
+++ b/widget/nsNativeTheme.cpp
@@ -376,21 +376,17 @@ nsNativeTheme::IsDisabled(nsIFrame* aFra
   // be counted as true.
   return content->AttrValueIs(kNameSpaceID_None, nsGkAtoms::disabled,
                               NS_LITERAL_STRING("true"), eCaseMatters);
 }
 
 bool
 nsNativeTheme::IsFrameRTL(nsIFrame* aFrame)
 {
-  if (!aFrame) {
-    return false;
-  }
-  WritingMode wm = aFrame->GetWritingMode();
-  return !(wm.IsVertical() ? wm.IsVerticalLR() : wm.IsBidiLTR());
+  return aFrame && aFrame->StyleVisibility()->mDirection == NS_STYLE_DIRECTION_RTL;
 }
 
 bool
 nsNativeTheme::IsHTMLContent(nsIFrame *aFrame)
 {
   if (!aFrame) {
     return false;
   }