[Webkit-unassigned] [Bug 225102] Share style resolvers between author shadow trees without style sheets
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Apr 29 09:36:06 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=225102
Sam Weinig <sam at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sam at webkit.org
Attachment #427338|review? |review+
Flags| |
--- Comment #5 from Sam Weinig <sam at webkit.org> ---
Comment on attachment 427338
--> https://bugs.webkit.org/attachment.cgi?id=427338
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).
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210429/f88e490c/attachment.htm>
More information about the webkit-unassigned
mailing list