Bug 1440537 - Introduce an explicit flush in text_composition_querycontent.xul. r=masayuki
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sat, 20 Apr 2019 19:15:54 +0200
changeset 530462 40ccb621b5d137feb6d7f82eb2b7facd8d8f837f
parent 530461 e7be3478e08c069f9ea50173654a9a5abe3caf6e
child 530463 a07956b430eb080767e43e1ecea50821be0de1a2
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1440537
milestone68.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 1440537 - Introduce an explicit flush in text_composition_querycontent.xul. r=masayuki The iframe test runs on an cross-docgroup iframe, even though chrome JS can observe it in this test. This test is relying on the getBoundingClientRect() call below in order to flush the parent document layout as well, but that's going to stop happening (see the bug and patch). Differential Revision: https://phabricator.services.mozilla.com/D28302
widget/tests/window_composition_text_querycontent.xul
--- a/widget/tests/window_composition_text_querycontent.xul
+++ b/widget/tests/window_composition_text_querycontent.xul
@@ -6695,16 +6695,21 @@ function runRemoveContentTest()
     }, 50);
   }, 50);
 }
 
 function runTestOnAnotherContext(aPanelOrFrame, aFocusedEditor, aTestName)
 {
   aFocusedEditor.value = "";
 
+  // The frames and panel are cross-origin, and we no longer
+  // propagate flushes to parent cross-origin iframes explicitly,
+  // so flush our own layout here so the positions are correct.
+  document.documentElement.getBoundingClientRect();
+
   var editorRect = synthesizeQueryEditorRect();
   if (!checkQueryContentResult(editorRect, aTestName + ": editorRect")) {
     return;
   }
 
   var r = aPanelOrFrame.getBoundingClientRect();
   var parentRect = { "left": r.left, "top": r.top, "width": r.right - r.left,
                      "height": r.bottom - r.top };