Backed out changeset f585271d250d (bug 1319273) for eslint failures on /gecko/accessible/tests/browser/bounds/browser_test_zoom_text.js on a CLOSED TREE
authorGurzau Raul <rgurzau@mozilla.com>
Fri, 01 Jun 2018 22:25:19 +0300
changeset 475159 9c58416b4af610a00a9fb7b1344659afeb13ba60
parent 475158 5989424834d2030fecfc43eb6536e5132fb30536
child 475160 6b0ad567bda49c8348e5ffbb1f8a5299e5015aa6
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1319273
milestone62.0a1
backs outf585271d250d8750240e8ab4ec8e462e56eac21e
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 f585271d250d (bug 1319273) for eslint failures on /gecko/accessible/tests/browser/bounds/browser_test_zoom_text.js on a CLOSED TREE
accessible/generic/HyperTextAccessible.cpp
accessible/tests/browser/bounds/browser_test_zoom_text.js
--- a/accessible/generic/HyperTextAccessible.cpp
+++ b/accessible/generic/HyperTextAccessible.cpp
@@ -1236,27 +1236,16 @@ HyperTextAccessible::TextBounds(int32_t 
   index_t startOffset = ConvertMagicOffset(aStartOffset);
   index_t endOffset = ConvertMagicOffset(aEndOffset);
   if (!startOffset.IsValid() || !endOffset.IsValid() ||
       startOffset > endOffset || endOffset > CharacterCount()) {
     NS_ERROR("Wrong in offset");
     return nsIntRect();
   }
 
-  if (CharacterCount() == 0) {
-    nsPresContext* presContext = mDoc->PresContext();
-    // Empty content, use our own bound to at least get x,y coordinates
-    return GetFrame()->GetScreenRectInAppUnits().
-      ToNearestPixels(presContext->AppUnitsPerDevPixel());
-  }
-
-  if (startOffset == endOffset) {
-    NS_ERROR("Wrong in offset");
-    return nsIntRect();
-  }
 
   int32_t childIdx = GetChildIndexAtOffset(startOffset);
   if (childIdx == -1)
     return nsIntRect();
 
   nsIntRect bounds;
   int32_t prevOffset = GetChildOffset(childIdx);
   int32_t offset1 = startOffset - prevOffset;
--- a/accessible/tests/browser/bounds/browser_test_zoom_text.js
+++ b/accessible/tests/browser/bounds/browser_test_zoom_text.js
@@ -14,31 +14,20 @@ async function runTests(browser, accDoc)
     let textNode = hyperTextNode.firstChild;
 
     let contentDPR = await getContentDPR(browser);
     let [x, y, width, height] = getBounds(textNode, contentDPR);
     testTextBounds(hyperTextNode, 0, -1, [x, y, width, height],
                    COORDTYPE_SCREEN_RELATIVE);
   }
 
-  async function testEmptyInputNode(id) {
-    var inputNode = findAccessibleChildByID(accDoc, id);
-
-    var [x, y, width, height] = getBounds(inputNode);
-    testTextBounds(inputNode, 0, -1, [x, y, width, height],
-                   COORDTYPE_SCREEN_RELATIVE);
-    testTextBounds(inputNode, 0, 0, [x, y, width, height],
-                   COORDTYPE_SCREEN_RELATIVE);
-  }
-
   loadFrameScripts(browser, { name: "layout.js", dir: MOCHITESTS_DIR });
 
   await testTextNode("p1");
   await testTextNode("p2");
-  await testEmptyInputNode("i1");
 
   await ContentTask.spawn(browser, {}, () => {
     zoomDocument(document, 2.0);
   });
 
   await testTextNode("p1");
 
   await ContentTask.spawn(browser, {}, () => {
@@ -46,11 +35,10 @@ async function runTests(browser, accDoc)
   });
 }
 
 /**
  * Test the text range boundary when page is zoomed
  */
 addAccessibleTask(`
   <p id='p1' style='font-family: monospace;'>Tilimilitryamdiya</p>
-  <p id='p2'>ل</p>
-  <form><input id='i1' /></form>`, runTests
+  <p id='p2'>ل</p>`, runTests
 );