Bug 162532 - AuthorStyleSheets shouldn't trigger synchronous style resolutions
Summary: AuthorStyleSheets shouldn't trigger synchronous style resolutions
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2016-09-24 10:04 PDT by Antti Koivisto
Modified: 2016-09-25 06:34 PDT (History)
2 users (show)

See Also:

patch (31.42 KB, patch)
2016-09-24 10:29 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (37.35 KB, patch)
2016-09-24 11:50 PDT, Antti Koivisto
darin: review+
Details | Formatted Diff | Diff
patch (37.70 KB, patch)
2016-09-25 05:25 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2016-09-24 10:04:40 PDT
AuthorStyleSheets logic can be simplified. This should be done by the client if needed.
Comment 1 Antti Koivisto 2016-09-24 10:29:56 PDT
Created attachment 289746 [details]
Comment 2 Antti Koivisto 2016-09-24 11:50:46 PDT
Created attachment 289748 [details]
Comment 3 Darin Adler 2016-09-24 17:57:44 PDT
Comment on attachment 289748 [details]

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

> Source/WebCore/dom/AuthorStyleSheets.h:66
> +    enum class ChangeType { ActiveSet, ContentsOrInterpretation };
> +    WEBCORE_EXPORT void didChange(ChangeType);

Does this really need to be a single function call with an argument? It’s kind of wordy to call it that way. Maybe we should make this two different named functions. They can share code inside the class and we can use the ChangeType f we find it handy internally, but I suspect there is no real advantage to callers that this is an argument rather than a separate function.
Comment 4 Antti Koivisto 2016-09-25 04:38:58 PDT
Yeah, that was the plan though you right that I can as well do it in this patch.
Comment 5 Antti Koivisto 2016-09-25 05:25:40 PDT
Created attachment 289776 [details]
Comment 6 WebKit Commit Bot 2016-09-25 06:34:43 PDT
Comment on attachment 289776 [details]

Clearing flags on attachment: 289776

Committed r206361: <http://trac.webkit.org/changeset/206361>
Comment 7 WebKit Commit Bot 2016-09-25 06:34:47 PDT
All reviewed patches have been landed.  Closing bug.