Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cfef85306eb05c3a25cc2748e80840928b86e016
      
https://github.com/WebKit/WebKit/commit/cfef85306eb05c3a25cc2748e80840928b86e016
  Author: Andres Gonzalez <[email protected]>
  Date:   2024-02-12 (Mon, 12 Feb 2024)

  Changed paths:
    M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
    M Source/WebCore/accessibility/AccessibilityScrollView.cpp

  Log Message:
  -----------
  AX: Replace is<T> downcast<T> with dynamicDowncast<T> uncheckedDowncast<T> 
when appropriate (part 1).
https://bugs.webkit.org/show_bug.cgi?id=269199
<rdar://problem/122804785>

Reviewed by Tyler Wilcock.

This is a follow up to https://commits.webkit.org/272296@main.

is<T> followed by downcast<T> has a performance impact since it type-checks 
twice. In those cases, the code can be written using dynamicDonwcast<T>. In 
other cases where we are certain that the downcast is returning the correct 
type, we should use uncheckedDowncast. This patch makes these changes in some 
of the accessibility core code. More similar changes in subsequent patches. 
this patch also includes some code cleanup and more adoption of smart pointer 
to replace raw pointers.

* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::firstChildInContinuation):
(WebCore::firstChildConsideringContinuation):
(WebCore::lastChildConsideringContinuation):
(WebCore::startOfContinuations):
(WebCore::endOfContinuations):
(WebCore::AccessibilityRenderObject::previousSibling const):
(WebCore::AccessibilityRenderObject::nextSibling const):
(WebCore::nextContinuation):
(WebCore::AccessibilityRenderObject::parentObject const):
(WebCore::AccessibilityRenderObject::anchorElement const):
(WebCore::AccessibilityRenderObject::textUnderElement const):
(WebCore::AccessibilityRenderObject::boundingBoxRect const):
(WebCore::AccessibilityRenderObject::elementPath const):
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):
(WebCore::AccessibilityRenderObject::layoutCount const):
(WebCore::AccessibilityRenderObject::selectedText const):
(WebCore::AccessibilityRenderObject::selectedTextRange const):
(WebCore::AccessibilityRenderObject::insertionPointLineNumber const):
(WebCore::AccessibilityRenderObject::setSelectedTextRange):
(WebCore::AccessibilityRenderObject::documentLinks):
(WebCore::AccessibilityRenderObject::widgetForAttachmentView const):
(WebCore::AccessibilityRenderObject::visiblePositionForIndex const):
(WebCore::AccessibilityRenderObject::indexForVisiblePosition const):
(WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange const):
(WebCore::AccessibilityRenderObject::accessibilityHitTest const):
(WebCore::AccessibilityRenderObject::addImageMapChildren):
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
(WebCore::AccessibilityRenderObject::markerRenderer const):
(WebCore::AccessibilityRenderObject::secureFieldValue const):
* Source/WebCore/accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::AccessibilityScrollView):
(WebCore::AccessibilityScrollView::addChildScrollbar):
(WebCore::AccessibilityScrollView::documentFrameView const):
(WebCore::AccessibilityScrollView::parentObject const):

Canonical link: https://commits.webkit.org/274522@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to