| Summary: | Add check if referenced element is SVG for clip-path | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Nikos Mouchtaris <nmouchtaris> | ||||||||||||
| Component: | New Bugs | Assignee: | Nikos Mouchtaris <nmouchtaris> | ||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||
| Severity: | Normal | CC: | changseok, esprehn+autocc, ews-watchlist, glenn, kondapallykalyan, ntim, pdr, simon.fraser, webkit-bug-importer | ||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||
| Hardware: | Unspecified | ||||||||||||||
| OS: | Unspecified | ||||||||||||||
| Bug Depends on: | 240190 | ||||||||||||||
| Bug Blocks: | |||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Nikos Mouchtaris
2022-05-04 16:37:37 PDT
Created attachment 458834 [details]
Patch
Created attachment 458835 [details]
Patch
Created attachment 458847 [details]
Patch
Created attachment 458898 [details]
Patch
Comment on attachment 458898 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=458898&action=review > Source/WebCore/rendering/PathOperation.cpp:51 > + if (!m_element) > + return nullptr; > return m_element.get(); This doesn't do anything. m_element.get() will already return null. Created attachment 458901 [details]
Patch
(In reply to Simon Fraser (smfr) from comment #5) > Comment on attachment 458898 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=458898&action=review > > > Source/WebCore/rendering/PathOperation.cpp:51 > > + if (!m_element) > > + return nullptr; > > return m_element.get(); > > This doesn't do anything. m_element.get() will already return null. Fixed. Committed r293870 (250331@main): <https://commits.webkit.org/250331@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 458901 [details]. Comment on attachment 458901 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=458901&action=review > Source/WebCore/style/StyleBuilderConverter.h:632 > + if (is<SVGElement>(target.element.get())) > + return ReferencePathOperation::create(cssURLValue, fragment, downcast<SVGElement>(target.element.get())); > + return ReferencePathOperation::create(cssURLValue, fragment, nullptr); This seems like a good usecase for dynamicDowncast: return ReferencePathOperation::create(cssURLValue, fragment, dynamicDowncast<SVGElement>(target.element.get())); It will be null if it's not a SVGElement. Comment on attachment 458901 [details]
Patch
Sorry, accidentally obsoleted by putting the wrong bug number in commit message.
|