| Summary: | AX: De-virtualize AXCoreObject::isDetachedFromParent | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tyler Wilcock <tyler_w> | ||||
| Component: | Accessibility | Assignee: | Tyler Wilcock <tyler_w> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Other | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Tyler Wilcock
2023-05-07 16:02:32 PDT
Created attachment 466266 [details]
Patch
(In reply to Tyler Wilcock from comment #2) > Created attachment 466266 [details] > Patch --- a/Source/WebCore/accessibility/AccessibilityMockObject.cpp +++ b/Source/WebCore/accessibility/AccessibilityMockObject.cpp +void AccessibilityMockObject::setParent(AccessibilityObject* parent) +{ + m_parent = parent; + m_isDetachedFromParent = !parent; +} Do we even need to keep m_isDetachedFromParent? I'd think that we could tell whether has a parent or not just by checking m_parent. --- a/Source/WebCore/accessibility/AccessibilityObjectInterface.h +++ b/Source/WebCore/accessibility/AccessibilityObjectInterface.h - virtual bool isDetachedFromParent() = 0; + // Intentionally non-virtual because this is called in hot paths. + bool isDetachedFromParent() const { return m_isDetachedFromParent; } Again, don't think we need m_isDetachedFromParent, check for the parent instead. |