Summary: | Factor PseudoElement creation calls into a single Element::ensurePseudoElement(pseudoId) method | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antoine Quint <graouts> | ||||||||
Component: | CSS | Assignee: | Antoine Quint <graouts> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | cdumez, cmarcelo, esprehn+autocc, ews-watchlist, glenn, graouts, kangil.han, koivisto, kondapallykalyan, pdr, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=207290 | ||||||||||
Attachments: |
|
Description
Antoine Quint
2020-04-14 07:24:38 PDT
Created attachment 396414 [details]
Patch
Comment on attachment 396414 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=396414&action=review > Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:-123 > - current.setBeforePseudoElement(newPseudoElement.releaseNonNull()); > - else > - current.setAfterPseudoElement(newPseudoElement.releaseNonNull()); You can probably make these private now. > Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:113 > + current.ensurePseudoElement(pseudoId); pseudoElement = Comment on attachment 396414 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=396414&action=review > Source/WebCore/dom/Element.cpp:3484 > +PseudoElement* Element::ensurePseudoElement(PseudoId pseudoId) I think this should return a reference. The assert could be a release assert. Created attachment 396428 [details]
Patch
(In reply to Antti Koivisto from comment #2) > Comment on attachment 396414 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=396414&action=review > > > Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:-123 > > - current.setBeforePseudoElement(newPseudoElement.releaseNonNull()); > > - else > > - current.setAfterPseudoElement(newPseudoElement.releaseNonNull()); > > You can probably make these private now. I think we can remove them altogether. > > Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:113 > > + current.ensurePseudoElement(pseudoId); > > pseudoElement = Err… yeah! (In reply to Antti Koivisto from comment #3) > Comment on attachment 396414 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=396414&action=review > > > Source/WebCore/dom/Element.cpp:3484 > > +PseudoElement* Element::ensurePseudoElement(PseudoId pseudoId) > > I think this should return a reference. The assert could be a release > assert. Will do. Created attachment 396432 [details]
Patch
Committed r260088: <https://trac.webkit.org/changeset/260088> |