mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 927349 part 17 - Don't count native reflows in test_popupreflows.xul; r=markh
test_popupreflows.xul currently expects to get 1 reflow when a popup is opened. This is triggered by JS code. An incremental layout may be triggered by native code but the test ignores that for unclear reasons ("Because we've simply cargo-culted this test from browser_tabopen_reflows.js!"). In part 16 on this patch series, we force interruptible reflows to become full reflows when we have pending animations which can cause this test to fail since it will see 2 reflows. The above quoted browser_tabopen_reflows.js specifically ignores reflows triggered by native code so we adjust this test to do likewise.
This commit is contained in:
parent
c0f8394d7d
commit
d3833e09da
@ -26,6 +26,13 @@ let panel, anchor, arrow;
|
||||
let observer = {
|
||||
reflows: [],
|
||||
reflow: function (start, end) {
|
||||
// Ignore reflows triggered by native code
|
||||
// (Reflows from native code only have an empty stack after the first frame)
|
||||
var path = (new Error().stack).split("\n").slice(1).join("");
|
||||
if (path === "") {
|
||||
return;
|
||||
}
|
||||
|
||||
this.reflows.push(new Error().stack);
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user