Bug 1322096 - Don't special-case rp in innerText. r=smaug
☠☠ backed out by 13ee6c203030 ☠ ☠
authorSimon Pieters <zcorpan@gmail.com>
Wed, 03 Oct 2018 08:12:08 +0000
changeset 495089 7da26bb326dee45fb06081c094cb47f2d6c44947
parent 495088 57994656668db26261b12f836b8b57aa8369f50c
child 495090 13ee6c203030801e96e5046cad27c696e66a2d95
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1322096
milestone64.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 1322096 - Don't special-case rp in innerText. r=smaug Differential Revision: https://phabricator.services.mozilla.com/D7420
dom/base/nsRange.cpp
testing/web-platform/meta/html/dom/elements/the-innertext-idl-attribute/getter.html.ini
--- a/dom/base/nsRange.cpp
+++ b/dom/base/nsRange.cpp
@@ -3578,22 +3578,17 @@ nsRange::GetInnerTextNoFlush(DOMString& 
     currentState = AT_NODE;
   }
 
   while (currentNode != endNode || currentState != endState) {
     nsIFrame* f = currentNode->GetPrimaryFrame();
     bool isVisibleAndNotReplaced = IsVisibleAndNotInReplacedElement(f);
     if (currentState == AT_NODE) {
       bool isText = currentNode->IsText();
-      if (isText && currentNode->GetParent()->IsHTMLElement(nsGkAtoms::rp) &&
-          ElementIsVisibleNoFlush(currentNode->GetParent()->AsElement())) {
-        nsAutoString str;
-        currentNode->GetTextContent(str, aError);
-        result.Append(str);
-      } else if (isVisibleAndNotReplaced) {
+      if (isVisibleAndNotReplaced) {
         result.AddRequiredLineBreakCount(GetRequiredInnerTextLineBreakCount(f));
         if (isText) {
           nsIFrame::RenderedText text = f->GetRenderedText();
           result.Append(text.mString);
         }
       }
       nsIContent* child = currentNode->GetFirstChild();
       if (child) {
--- a/testing/web-platform/meta/html/dom/elements/the-innertext-idl-attribute/getter.html.ini
+++ b/testing/web-platform/meta/html/dom/elements/the-innertext-idl-attribute/getter.html.ini
@@ -1,16 +1,4 @@
 [getter.html]
   [<canvas><div id='target'> contents ok for element not being rendered ("<canvas><div id='target'>abc")]
     expected: FAIL
 
-  [<rp> ("<div><ruby>abc<rp>(</rp><rt>def</rt><rp>)</rp></ruby>")]
-    expected: FAIL
-
-  [Lone <rp> ("<div><rp>abc</rp>")]
-    expected: FAIL
-
-  [display:block <rp> with whitespace ("<div><rp style='display:block'> abc </rp>def")]
-    expected: FAIL
-
-  [<rp> in a <select> ("<div><select class='poke-rp'></select>")]
-    expected: FAIL
-