Bug 195220 - [ContentChangeObserver] Check for pending style recalcs at the end of each timer run.
Summary: [ContentChangeObserver] Check for pending style recalcs at the end of each ti...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-01 12:17 PST by zalan
Modified: 2019-03-01 14:49 PST (History)
10 users (show)

See Also:


Attachments
Patch (10.97 KB, patch)
2019-03-01 13:00 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (11.45 KB, patch)
2019-03-01 13:28 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.