Closed Bug 1267908 Opened 8 years ago Closed 8 years ago

Don't call flushApzRepaints if reftest-no-flush is specied in reftest

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: hiro, Unassigned)

Details

Attachments

(1 file)

flushApzRepaints() leads SchedulePaint() [1].  So we should avoid calling flushApzRepaints() is reftest-no-flush is specified.

[1] https://hg.mozilla.org/mozilla-central/annotate/fc15477ce628599519cb0055f52cc195d640dc94/gfx/layers/apz/util/APZCCallbackHelper.cpp#l825
https://treeherder.mozilla.org/#/jobs?repo=try&revision=0bf3e779d7a3

I did not know that crashtest has no contentRootElement there.
See bug 1235002 comment #5 and bug 1235002 comment #6 to know why I noticed this problem.
Comment on attachment 8745942 [details]
MozReview Request: Bug 1267908 - Don't call flushApzRepaints if reftest-no-flush is specified. r?kats

https://reviewboard.mozilla.org/r/49193/#review46065

::: layout/tools/reftest/reftest-content.js:588
(Diff revision 1)
>              };
>              os.addObserver(flushWaiter, "apz-repaints-flushed", false);
>  
>              var willSnapshot = (gCurrentTestType != TYPE_SCRIPT) &&
>                                 (gCurrentTestType != TYPE_LOAD);
> -            if (willSnapshot && windowUtils().flushApzRepaints()) {
> +            if ((!contentRootElement ||

This looks fine in terms of correctness but for clarity I would prefer seeing a local var like this :

var noflush = !(contentRootElement && contentRootElement.classList.contains("reftest-no-flush"));

And then using that in the if condition.
Attachment #8745942 - Flags: review?(bugmail.mozilla) → review+
Comment on attachment 8745942 [details]
MozReview Request: Bug 1267908 - Don't call flushApzRepaints if reftest-no-flush is specified. r?kats

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/49193/diff/1-2/
Thank you, kats!
https://hg.mozilla.org/mozilla-central/rev/2f70d42e5a4c
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: