RESOLVED FIXED Bug 225102
Share style resolvers between author shadow trees without style sheets
https://bugs.webkit.org/show_bug.cgi?id=225102
Summary Share style resolvers between author shadow trees without style sheets
Antti Koivisto
Reported 2021-04-27 06:38:23 PDT
Just for UA shadow tree resolver for now.
Attachments
wip (5.11 KB, patch)
2021-04-27 06:39 PDT, Antti Koivisto
no flags
patch (13.66 KB, patch)
2021-04-28 10:17 PDT, Antti Koivisto
ews-feeder: commit-queue-
patch (17.01 KB, patch)
2021-04-29 03:19 PDT, Antti Koivisto
ews-feeder: commit-queue-
patch (15.97 KB, patch)
2021-04-29 05:11 PDT, Antti Koivisto
sam: review+
patch (24.12 KB, patch)
2021-04-30 03:40 PDT, Antti Koivisto
no flags
patch (24.12 KB, patch)
2021-04-30 03:58 PDT, Antti Koivisto
no flags
patch (24.38 KB, patch)
2021-04-30 03:59 PDT, Antti Koivisto
no flags
patch (24.55 KB, patch)
2021-04-30 04:04 PDT, Antti Koivisto
no flags
Antti Koivisto
Comment 1 2021-04-27 06:39:33 PDT
Antti Koivisto
Comment 2 2021-04-28 10:17:44 PDT
Antti Koivisto
Comment 3 2021-04-29 03:19:24 PDT
Antti Koivisto
Comment 4 2021-04-29 05:11:10 PDT
Sam Weinig
Comment 5 2021-04-29 09:36:06 PDT
Comment on attachment 427338 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=427338&action=review > Source/WebCore/ChangeLog:10 > + Prepare for sharing style resolvers (and all the related data) between shadow trees beyond > + the currently supported user agent shadow trees. This patch refactors the sharing code > + and adds support for sharing resolvers for author shadow trees without style sheets. How (if at all) do we test resolver sharing? Could we add some sort of dumping of the resolver state if we don't have a better way? > Source/WebCore/style/StyleResolver.h:144 > + bool wasShared() const { return m_wasShared; } > + void setWasShared() { m_wasShared = true; } If this is really meant to be only for shared between shadow trees (as I think the change log indicates), I think making the name a bit more verbose and/or adding a comment would be good. > Source/WebCore/style/StyleScope.cpp:537 > + Vector<RefPtr<CSSStyleSheet>> newStyleSheets; You could make this slight more efficient using a newStyleSheets.reserveInitialCapacity() here. > Source/WebCore/style/StyleScope.cpp:539 > + m_resolver->appendAuthorStyleSheets(newStyleSheets); Seems like unfortunate refchurn. Can we move newStyleSheets into appendAuthorStyleSheets (may require making a appendAuthorStyleSheets overload that takes an r-value).
Antti Koivisto
Comment 6 2021-04-29 10:02:23 PDT
> How (if at all) do we test resolver sharing? Could we add some sort of > dumping of the resolver state if we don't have a better way? Good point, I'll add some sort of testing thing to Internals.
Antti Koivisto
Comment 7 2021-04-30 03:40:11 PDT
Antti Koivisto
Comment 8 2021-04-30 03:58:04 PDT
Antti Koivisto
Comment 9 2021-04-30 03:59:39 PDT
Antti Koivisto
Comment 10 2021-04-30 04:04:20 PDT
EWS
Comment 11 2021-04-30 05:19:37 PDT
Committed r276836 (237187@main): <https://commits.webkit.org/237187@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 427408 [details].
Radar WebKit Bug Importer
Comment 12 2021-04-30 05:20:21 PDT
Note You need to log in before you can comment on or make changes to this bug.