Summary: | Stack allocate StyleResolver state | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antti Koivisto <koivisto> | ||||||||
Component: | CSS | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | allan.jensen, cdumez, commit-queue, darin, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, macpherson, menard, webkit-bug-importer, zalan | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Antti Koivisto
2019-11-09 15:10:48 PST
Created attachment 383228 [details]
patch
Created attachment 383231 [details]
patch
Created attachment 383232 [details]
patch
Comment on attachment 383232 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=383232&action=review > Source/WebCore/css/StyleResolver.cpp:465 > +std::unique_ptr<RenderStyle> StyleResolver::defaultStyleForElement(const Element* element) It's sad that we need to pass in a raw pointer just to figure out if it is an svg element. > It's sad that we need to pass in a raw pointer just to figure out if it is
> an svg element.
Bit silly yes. There is still lots of room for improvement here.
Comment on attachment 383232 [details] patch Clearing flags on attachment: 383232 Committed r252313: <https://trac.webkit.org/changeset/252313> All reviewed patches have been landed. Closing bug. Comment on attachment 383232 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=383232&action=review > Source/WebCore/style/StyleBuilderState.h:48 > + RefPtr<const Element> element = nullptr; I think the "= nullptr" here is a no-op since any RefPtr starts out as nullptr. |