Backed out changeset 50d264e4ffa4 (bug 1052123) for android/linux reftest failures
authorWes Kocher <wkocher@mozilla.com>
Tue, 16 Dec 2014 15:44:15 -0800
changeset 245875 cdefc124ccaa705e08b8cab905a01e760302876d
parent 245874 dfb46363d636325d38b85fe811224084724d8fcc
child 245876 63b88d106d11af2a92c91e9dcf11656baa30e4b0
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1052123
milestone37.0a1
backs out50d264e4ffa47a4c34600d93cd747f38dc7861ba
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 50d264e4ffa4 (bug 1052123) for android/linux reftest failures
layout/generic/nsFrameState.cpp
layout/generic/nsFrameStateBits.h
layout/generic/nsRubyBaseContainerFrame.cpp
layout/generic/nsRubyTextFrame.cpp
layout/generic/nsRubyTextFrame.h
layout/reftests/css-ruby/autohiding-1-ref.html
layout/reftests/css-ruby/autohiding-1.html
layout/reftests/css-ruby/autohiding-2-ref.html
layout/reftests/css-ruby/autohiding-2.html
layout/reftests/css-ruby/autohiding-3-ref.html
layout/reftests/css-ruby/autohiding-3.html
layout/reftests/css-ruby/reftest.list
--- a/layout/generic/nsFrameState.cpp
+++ b/layout/generic/nsFrameState.cpp
@@ -12,17 +12,16 @@
 #include "nsBulletFrame.h"
 #include "nsFlexContainerFrame.h"
 #include "nsGfxScrollFrame.h"
 #include "nsIFrame.h"
 #include "nsISVGChildFrame.h"
 #include "nsImageFrame.h"
 #include "nsInlineFrame.h"
 #include "nsPlaceholderFrame.h"
-#include "nsRubyTextFrame.h"
 #include "nsSVGContainerFrame.h"
 #include "nsTableCellFrame.h"
 #include "nsTableRowFrame.h"
 #include "nsTableRowGroupFrame.h"
 #include "nsTextFrame.h"
 
 namespace mozilla {
 
--- a/layout/generic/nsFrameStateBits.h
+++ b/layout/generic/nsFrameStateBits.h
@@ -507,25 +507,16 @@ FRAME_STATE_GROUP(Inline, nsInlineFrame)
  *  first (or last) frame (or a continuation frame).
  *  This state value shows if this frame is first (or last) continuation
  *  or not.
  */
 
 FRAME_STATE_BIT(Inline, 21, NS_INLINE_FRAME_BIDI_VISUAL_STATE_IS_SET)
 FRAME_STATE_BIT(Inline, 22, NS_INLINE_FRAME_BIDI_VISUAL_IS_FIRST)
 FRAME_STATE_BIT(Inline, 23, NS_INLINE_FRAME_BIDI_VISUAL_IS_LAST)
-// nsRubyTextFrame inherits from nsInlineFrame
-
-
-// == Frame state bits that apply to ruby text frames =========================
-
-FRAME_STATE_GROUP(RubyText, nsRubyTextFrame)
-
-// inherits from nsInlineFrame
-FRAME_STATE_BIT(RubyText, 24, NS_RUBY_TEXT_FRAME_AUTOHIDE)
 
 
 // == Frame state bits that apply to placeholder frames =======================
 
 FRAME_STATE_GROUP(Placeholder, nsPlaceholderFrame)
 
 // Frame state bits that are used to keep track of what this is a
 // placeholder for.
--- a/layout/generic/nsRubyBaseContainerFrame.cpp
+++ b/layout/generic/nsRubyBaseContainerFrame.cpp
@@ -2,17 +2,16 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code is subject to the terms of the Mozilla Public License
  * version 2.0 (the "License"). You can obtain a copy of the License at
  * http://mozilla.org/MPL/2.0/. */
 
 /* rendering object for CSS "display: ruby-base-container" */
 
 #include "nsRubyBaseContainerFrame.h"
-#include "nsContentUtils.h"
 #include "nsLineLayout.h"
 #include "nsPresContext.h"
 #include "nsStyleContext.h"
 #include "WritingModes.h"
 
 using namespace mozilla;
 
 //----------------------------------------------------------------------
@@ -519,50 +518,25 @@ nsRubyBaseContainerFrame::ReflowOnePair(
 {
   WritingMode lineWM = aReflowState.mLineLayout->GetWritingMode();
   const uint32_t rtcCount = mTextContainers.Length();
   MOZ_ASSERT(aTextFrames.Length() == rtcCount);
   MOZ_ASSERT(aReflowStates.Length() == rtcCount);
   nscoord istart = aReflowState.mLineLayout->GetCurrentICoord();
   nscoord pairISize = 0;
 
-  nsAutoString baseText;
-  if (aBaseFrame) {
-    if (!nsContentUtils::GetNodeTextContent(aBaseFrame->GetContent(),
-                                            true, baseText)) {
-      NS_RUNTIMEABORT("OOM");
-    }
-  }
-
   // Reflow text frames
   for (uint32_t i = 0; i < rtcCount; i++) {
-    nsIFrame* textFrame = aTextFrames[i];
-    if (textFrame) {
-      MOZ_ASSERT(textFrame->GetType() == nsGkAtoms::rubyTextFrame);
-      nsAutoString annotationText;
-      if (!nsContentUtils::GetNodeTextContent(textFrame->GetContent(),
-                                              true, annotationText)) {
-        NS_RUNTIMEABORT("OOM");
-      }
-      // Per CSS Ruby spec, the content comparison for auto-hiding
-      // takes place prior to white spaces collapsing (white-space)
-      // and text transformation (text-transform), and ignores elements
-      // (considers only the textContent of the boxes). Which means
-      // using the content tree text comparison is correct.
-      if (annotationText.Equals(baseText)) {
-        textFrame->AddStateBits(NS_RUBY_TEXT_FRAME_AUTOHIDE);
-      } else {
-        textFrame->RemoveStateBits(NS_RUBY_TEXT_FRAME_AUTOHIDE);
-      }
-
+    if (aTextFrames[i]) {
+      MOZ_ASSERT(aTextFrames[i]->GetType() == nsGkAtoms::rubyTextFrame);
       nsReflowStatus reflowStatus;
       nsHTMLReflowMetrics metrics(*aReflowStates[i]);
 
       bool pushedFrame;
-      aReflowStates[i]->mLineLayout->ReflowFrame(textFrame, reflowStatus,
+      aReflowStates[i]->mLineLayout->ReflowFrame(aTextFrames[i], reflowStatus,
                                                  &metrics, pushedFrame);
       if (NS_INLINE_IS_BREAK(reflowStatus)) {
         // If any breaking occurs when reflowing a ruby text frame,
         // we should abandon reflowing this pair.
         aStatus = NS_INLINE_LINE_BREAK_BEFORE();
         return 0;
       }
       MOZ_ASSERT(!pushedFrame, "Shouldn't push frame if there is no break");
--- a/layout/generic/nsRubyTextFrame.cpp
+++ b/layout/generic/nsRubyTextFrame.cpp
@@ -55,42 +55,8 @@ nsRubyTextFrame::GetFrameName(nsAString&
 /* virtual */ bool
 nsRubyTextFrame::IsFrameOfType(uint32_t aFlags) const
 {
   if (aFlags & eBidiInlineContainer) {
     return false;
   }
   return nsRubyTextFrameSuper::IsFrameOfType(aFlags);
 }
-
-
-/* virtual */ void
-nsRubyTextFrame::BuildDisplayList(nsDisplayListBuilder*   aBuilder,
-                                  const nsRect&           aDirtyRect,
-                                  const nsDisplayListSet& aLists)
-{
-  if (GetStateBits() & NS_RUBY_TEXT_FRAME_AUTOHIDE) {
-    return;
-  }
-
-  nsRubyTextFrameSuper::BuildDisplayList(aBuilder, aDirtyRect, aLists);
-}
-
-/* virtual */ void
-nsRubyTextFrame::Reflow(nsPresContext* aPresContext,
-                        nsHTMLReflowMetrics& aDesiredSize,
-                        const nsHTMLReflowState& aReflowState,
-                        nsReflowStatus& aStatus)
-{
-  // Even if we want to hide this frame, we have to reflow it first.
-  // If we leave it dirty, changes to its content will never be
-  // propagated to the ancestors, then it won't be displayed even if
-  // the content is no longer the same, until next reflow triggered by
-  // some other change. In general, we always reflow all the frames we
-  // created. There might be other problems if we don't do that.
-  nsRubyTextFrameSuper::Reflow(aPresContext, aDesiredSize,
-                               aReflowState, aStatus);
-
-  if (GetStateBits() & NS_RUBY_TEXT_FRAME_AUTOHIDE) {
-    aDesiredSize.ClearSize();
-    aDesiredSize.SetOverflowAreasToDesiredBounds();
-  }
-}
--- a/layout/generic/nsRubyTextFrame.h
+++ b/layout/generic/nsRubyTextFrame.h
@@ -30,25 +30,16 @@ public:
   // nsIFrame overrides
   virtual nsIAtom* GetType() const MOZ_OVERRIDE;
   virtual bool IsFrameOfType(uint32_t aFlags) const MOZ_OVERRIDE;
 
 #ifdef DEBUG_FRAME_DUMP
   virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
 #endif
 
-  virtual void BuildDisplayList(nsDisplayListBuilder*   aBuilder,
-                                const nsRect&           aDirtyRect,
-                                const nsDisplayListSet& aLists) MOZ_OVERRIDE;
-
-  virtual void Reflow(nsPresContext* aPresContext,
-                      nsHTMLReflowMetrics& aDesiredSize,
-                      const nsHTMLReflowState& aReflowState,
-                      nsReflowStatus& aStatus) MOZ_OVERRIDE;
-
 protected:
   friend nsContainerFrame* NS_NewRubyTextFrame(nsIPresShell* aPresShell,
                                                nsStyleContext* aContext);
   explicit nsRubyTextFrame(nsStyleContext* aContext)
     : nsRubyTextFrameSuper(aContext) {}
 };
 
 #endif /* nsRubyTextFrame_h___ */
deleted file mode 100644
--- a/layout/reftests/css-ruby/autohiding-1-ref.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html lang="ja">
-<head>
-  <meta charset="UTF-8">
-  <title>Bug 1052123 - Autohide ruby annotations which are identical to their bases</title>
-  <link rel="stylesheet" href="common.css">
-</head>
-<body>
-  <ruby>
-    <rb>振</rb><rb>り</rb><rb>仮</rb><rb>名</rb>
-    <rt>ふ</rt><rt></rt><rt>が</rt><rt>な</rt>
-  </ruby>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/css-ruby/autohiding-1.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html lang="ja">
-<head>
-  <meta charset="UTF-8">
-  <title>Bug 1052123 - Autohide ruby annotations which are identical to their bases</title>
-  <link rel="stylesheet" href="common.css">
-</head>
-<body>
-  <ruby>
-    <rb>振</rb><rb>り</rb><rb>仮</rb><rb>名</rb>
-    <rt>ふ</rt><rt>り</rt><rt>が</rt><rt>な</rt>
-  </ruby>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/css-ruby/autohiding-2-ref.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<html lang="ja">
-<head>
-  <meta charset="UTF-8">
-  <title>Bug 1052123 - Autohide ruby annotations which are identical to their bases</title>
-  <link rel="stylesheet" href="common.css">
-</head>
-<body>
-  <p><ruby>
-    <rb>振</rb><rb>り</rb><rb>仮</rb><rb>名</rb>
-    <rt>ふ</rt><rt>ri</rt><rt>が</rt><rt>な</rt>
-  </ruby></p>
-  <p><ruby>
-    <rb>振</rb><rb>ri</rb><rb>仮</rb><rb>名</rb>
-    <rt>ふ</rt><rt>り</rt><rt>が</rt><rt>な</rt>
-  </ruby></p>
-  <p><ruby>
-    <rb>振</rb><rb>り</rb><rb>仮</rb><rb>名</rb>
-    <rt>ふ</rt><rt></rt><rt>が</rt><rt>な</rt>
-  </ruby></p>
-  <p><ruby>
-    <rb>振</rb><rb>り</rb><rb>仮</rb><rb>名</rb>
-    <rt>ふ</rt><rt></rt><rt>が</rt><rt>な</rt>
-  </ruby></p>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/css-ruby/autohiding-2.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<html lang="ja">
-<head>
-  <meta charset="UTF-8">
-  <title>Bug 1052123 - Autohide ruby annotations which are identical to their bases</title>
-  <link rel="stylesheet" href="common.css">
-  <script>
-    window.onload = function() {
-      // Force a reflow before changes.
-      document.body.clientWidth;
-      var elems = document.querySelectorAll('[data-content]');
-      Array.from(elems).forEach(function(e) {
-        e.textContent = e.dataset.content;
-      });
-    };
-  </script>
-</head>
-<body>
-  <p><ruby>
-    <rb>振</rb><rb>り</rb><rb>仮</rb><rb>名</rb>
-    <rt>ふ</rt><rt data-content="ri">り</rt><rt>が</rt><rt>な</rt>
-  </ruby></p>
-  <p><ruby>
-    <rb>振</rb><rb data-content="ri">り</rb><rb>仮</rb><rb>名</rb>
-    <rt>ふ</rt><rt>り</rt><rt>が</rt><rt>な</rt>
-  </ruby></p>
-  <p><ruby>
-    <rb>振</rb><rb>り</rb><rb>仮</rb><rb>名</rb>
-    <rt>ふ</rt><rt data-content="り">ri</rt><rt>が</rt><rt>な</rt>
-  </ruby></p>
-  <p><ruby>
-    <rb>振</rb><rb data-content="り">ri</rb><rb>仮</rb><rb>名</rb>
-    <rt>ふ</rt><rt>り</rt><rt>が</rt><rt>な</rt>
-  </ruby></p>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/css-ruby/autohiding-3-ref.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html lang="ja">
-<head>
-  <meta charset="UTF-8">
-  <title>Bug 1052123 - Autohide ruby annotations which are identical to their bases</title>
-  <link rel="stylesheet" href="common.css">
-  <style>
-    body { line-height: 5em; }
-  </style>
-</head>
-<body>
-  <ruby>
-    <rb>振</rb><rb>り</rb><rb>仮</rb><rb>名</rb>
-    <rt>ふ</rt><rt></rt><rt>が</rt><rt>な</rt>
-  </ruby>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/css-ruby/autohiding-3.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html lang="ja">
-<head>
-  <meta charset="UTF-8">
-  <title>Bug 1052123 - Autohide ruby annotations which are identical to their bases</title>
-  <link rel="stylesheet" href="common.css">
-  <style>
-    body { line-height: 5em; }
-  </style>
-</head>
-<body>
-  <ruby>
-    <rb>振</rb><rb>り</rb><rb>仮</rb><rb>名</rb>
-    <rt>ふ</rt><rt style="line-height: 100em;">り</rt><rt>が</rt><rt>な</rt>
-  </ruby>
-</body>
-</html>
--- a/layout/reftests/css-ruby/reftest.list
+++ b/layout/reftests/css-ruby/reftest.list
@@ -1,13 +1,10 @@
 default-preferences pref(layout.css.ruby.enabled,true)
 
-== autohiding-1.html autohiding-1-ref.html
-== autohiding-2.html autohiding-2-ref.html
-== autohiding-3.html autohiding-3-ref.html
 == box-generation-1.html box-generation-1-ref.html
 == box-generation-2.html box-generation-2-ref.html
 == box-generation-3.html box-generation-3-ref.html
 == box-generation-4.html box-generation-4-ref.html
 == box-generation-5.html box-generation-5-ref.html
 == dynamic-insertion-1.html dynamic-insertion-1-ref.html
 == dynamic-insertion-2.html dynamic-insertion-2-ref.html
 == dynamic-insertion-3.html dynamic-insertion-3-ref.html