Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2926efc345cb480e02a8abb18086eaaf8a431ca8
      
https://github.com/WebKit/WebKit/commit/2926efc345cb480e02a8abb18086eaaf8a431ca8
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-10-08 (Thu, 08 Oct 2026)

  Changed paths:
    M Source/WebCore/accessibility/AXObjectCache.cpp
    M Source/WebCore/dom/Position.cpp

  Log Message:
  -----------
  parentEditingBoundary() recomputes the anchor node's editability on every 
ancestor step
https://bugs.webkit.org/show_bug.cgi?id=326647
rdar://189382825

Reviewed by Chris Dumez.

Position::parentEditingBoundary() walks up the ancestor chain until it finds a 
parent
whose editability differs from the anchor node's. The anchor's 
hasEditableStyle() value
never changes during the walk, but it was evaluated again on every iteration, 
doubling
the number of computeEditability() calls. For nodes in a shadow tree, each of 
those calls
itself walks the ancestors via 
HTMLElement::editabilityFromContentEditableAttr().

Hoist the anchor's editability out of the loop. Apply the same change to the 
copy of
this function in AXObjectCache.

No behavior change; the loop does not mutate the DOM or style.

* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::parentEditingBoundary):
* Source/WebCore/dom/Position.cpp:
(WebCore::Position::parentEditingBoundary const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to