Bug 195220

Summary: [ContentChangeObserver] Check for pending style recalcs at the end of each timer run.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, cdumez, commit-queue, dbates, esprehn+autocc, ews-watchlist, kangil.han, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description zalan 2019-03-01 12:17:55 PST
instead of relying on didScheduleStyleRecalc since style recalc scheduling can turn into sync style recalcs.
Comment 1 Radar WebKit Bug Importer 2019-03-01 12:33:42 PST
<rdar://problem/48518979>
Comment 2 zalan 2019-03-01 13:00:18 PST
Created attachment 363362 [details]
Patch
Comment 3 Simon Fraser (smfr) 2019-03-01 13:19:08 PST
Comment on attachment 363362 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=363362&action=review

> Source/WebCore/ChangeLog:10
> +        when in addition to this style recalc scheduling, something later (thouhg during the same timer firing) triggers a sync style recalc.

thouhg

> Source/WebCore/page/ios/ContentChangeObserver.cpp:99
> +    auto inDeterminedState = observedContentChange == WKContentVisibilityChange || (!countOfObservedDOMTimers() && observedContentChange == WKContentNoChange && !hasPendingStyleRecalc);  

hasDeterminedState
Comment 4 Simon Fraser (smfr) 2019-03-01 13:21:29 PST
Comment on attachment 363362 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=363362&action=review

> LayoutTests/fast/events/touch/ios/style-recalc-schedule-and-force-relalc.html:33
> +            document.body.offsetHeight;

Doesn't seem necessary.

> LayoutTests/fast/events/touch/ios/style-recalc-schedule-and-force-relalc.html:34
> +            testRunner.dumpAsText();

Normally we do this at the start

> LayoutTests/fast/events/touch/ios/style-recalc-schedule-and-force-relalc.html:37
> +    }, 100);

Fix this.
Comment 5 zalan 2019-03-01 13:28:11 PST
Created attachment 363364 [details]
Patch
Comment 6 WebKit Commit Bot 2019-03-01 14:49:00 PST
Comment on attachment 363364 [details]
Patch

Clearing flags on attachment: 363364

Committed r242290: <https://trac.webkit.org/changeset/242290>
Comment 7 WebKit Commit Bot 2019-03-01 14:49:02 PST
All reviewed patches have been landed.  Closing bug.