[webkit-changes] [WebKit/WebKit] cedfed: Remove some downcasting in Element
Anne van Kesteren
noreply at github.com
Wed Jan 17 12:39:20 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cedfed3cd60b577ee81c25328e0fa1dd7cf53f3c
https://github.com/WebKit/WebKit/commit/cedfed3cd60b577ee81c25328e0fa1dd7cf53f3c
Author: Anne van Kesteren <annevk at annevk.nl>
Date: 2024-01-17 (Wed, 17 Jan 2024)
Changed paths:
M Source/WebCore/dom/Element.cpp
Log Message:
-----------
Remove some downcasting in Element
https://bugs.webkit.org/show_bug.cgi?id=267585
Reviewed by Chris Dumez.
Instead of shouldObtainBoundsFromSVGModel() that returns a boolean,
have elementWithSVGLayoutBox() that returns a RefPtr. Deduplicates
downcasting and clarifies the code.
* Source/WebCore/dom/Element.cpp:
(WebCore::elementWithSVGLayoutBox):
(WebCore::Element::boundsInRootViewSpace):
(WebCore::Element::absoluteEventBounds):
(WebCore::Element::getClientRects):
(WebCore::Element::boundingAbsoluteRectWithoutLayout const):
(WebCore::shouldObtainBoundsFromSVGModel): Deleted.
Canonical link: https://commits.webkit.org/273137@main
More information about the webkit-changes
mailing list