author | Timothy Nikkel <tnikkel@gmail.com> |
Mon, 18 Nov 2019 11:26:45 +0000 | |
changeset 502490 | 285e9108032ffb6cd62fe7d587ef97c1a86d8d41 |
parent 502489 | ddcfa0a1fa00353cb74f5b237a9652bce8398b45 |
child 502491 | 0dc7546c4a8a75dda043edc312305a6ceba0ad53 |
push id | 114172 |
push user | dluca@mozilla.com |
push date | Tue, 19 Nov 2019 11:31:10 +0000 |
treeherder | mozilla-inbound@b5c5ba07d3db [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mattwoodrow |
bugs | 1593170 |
milestone | 72.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
|
--- a/layout/tools/reftest/reftest-content.js +++ b/layout/tools/reftest/reftest-content.js @@ -645,19 +645,36 @@ function WaitForTestEnd(contentRootEleme function AfterPaintListener(event) { LogInfo("AfterPaintListener in " + event.target.document.location.href); if (event.target.document != currentDoc) { // ignore paint events for subframes or old documents in the window. // Invalidation in subframes will cause invalidation in the toplevel document anyway. return; } + // true if rectA contains rectB + function Contains(rectA, rectB) { + return (rectA.left <= rectB.left && rectB.right <= rectA.right && rectA.top <= rectB.top && rectB.bottom <= rectA.bottom); + } + // true if some rect in rectList contains rect + function ContainedIn(rectList, rect) { + for (let i = 0; i < rectList.length; ++i) { + if (Contains(rectList[i], rect)) { + return true; + } + } + return false; + } + updateCanvasPending = true; for (let i = 0; i < event.clientRects.length; ++i) { let r = event.clientRects[i]; + if (ContainedIn(updateCanvasRects, r)) { + continue; + } // Copy the rect; it's content and we are chrome, which means if the // document goes away (and it can in some crashtests) our reference // to it will be turned into a dead wrapper that we can't acccess. updateCanvasRects.push({ left: r.left, top: r.top, right: r.right, bottom: r.bottom }); } if (waitingForAnAfterPaint) {