Backed out changeset 33172a0a496a (bug 1356271) for broken tests after the backout of bug 1351148 on try
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Fri, 28 Jul 2017 09:22:30 +0200
changeset 420164 5845151f1a2cd00957fdd48e204542ccbdfaba1e
parent 420163 0ec51e44ccd19a6d5c92af69eb61da7a9d1a340f
child 420258 bbcec17958a9f17a7bd9fb5a581c4a51a29803de
child 420314 72316ddbb5483fab6ed65ace45caff16219c37cd
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1356271, 1351148
milestone56.0a1
backs out33172a0a496ae73cb0b14cd9d65637c692577670
first release with
nightly linux32
5845151f1a2c / 56.0a1 / 20170728100358 / files
nightly linux64
5845151f1a2c / 56.0a1 / 20170728100358 / files
nightly mac
5845151f1a2c / 56.0a1 / 20170728100358 / files
nightly win32
5845151f1a2c / 56.0a1 / 20170728100358 / files
nightly win64
5845151f1a2c / 56.0a1 / 20170728100358 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 33172a0a496a (bug 1356271) for broken tests after the backout of bug 1351148 on try
browser/base/content/test/performance/head.js
--- a/browser/base/content/test/performance/head.js
+++ b/browser/base/content/test/performance/head.js
@@ -1,12 +1,40 @@
 /**
  * Async utility function for ensuring that no unexpected uninterruptible
  * reflows occur during some period of time in a window.
  *
+ * The helper works by running a JS function before each event is
+ * dispatched that attempts to dirty the layout tree - the idea being
+ * that this puts us in the "worst case scenario" so that any JS
+ * that attempts to query for layout or style information will cause
+ * a reflow to fire. We also dirty the layout tree after each reflow
+ * occurs, for good measure.
+ *
+ * This sounds good in theory, but it's trickier in practice due to
+ * various optimizations in our Layout engine. The default function
+ * for dirtying the layout tree adds a margin to the first element
+ * child it finds in the window to a maximum of 3px, and then goes
+ * back to 0px again and loops.
+ *
+ * This is not sufficient for reflows that we expect to happen within
+ * scrollable frames, as Gecko is able to side-step reflowing the
+ * contents of a scrollable frame if outer frames are dirtied. Because
+ * of this, it's currently possible to override the default node to
+ * dirty with one more appropriate for the test.
+ *
+ * It is also theoretically possible for enough events to fire between
+ * reflows such that the before and after state of the layout tree is
+ * exactly the same, meaning that no reflow is required, which opens
+ * us up to missing expected reflows. This seems to be possible in
+ * theory, but hasn't yet shown up in practice - it's just something
+ * to be aware of.
+ *
+ * Bug 1363361 has been filed for a more reliable way of dirtying layout.
+ *
  * @param testFn (async function)
  *        The async function that will exercise the browser activity that is
  *        being tested for reflows.
  * @param expectedStacks (Array, optional)
  *        An Array of Arrays representing stacks.
  *
  *        Example:
  *