[webkit-reviews] review denied: [Bug 239852] ARIA reflection for Element attributes : [Attachment 458795] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 4 09:33:52 PDT 2022

Ryosuke Niwa <rniwa at webkit.org> has denied  review:
Bug 239852: ARIA reflection for Element attributes

Attachment 458795: Patch


--- Comment #29 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 458795
  --> https://bugs.webkit.org/attachment.cgi?id=458795

View in context: https://bugs.webkit.org/attachment.cgi?id=458795&action=review

> Source/WebCore/dom/Element.cpp:2007
> +	       if (element && isDescendantOfShadowIncludingAncestors(*element))
> +		   return element;

This check isn't right. We need to be checking that the root node of element
matches the root node of this element.
Not necessarily that the shadow root matches that of this element.
r- because of this.

> Source/WebCore/dom/Element.cpp:2032
> +    if (!id.isNull() && &treeScope() == &element->treeScope() &&
treeScope().getElementById(id) == element)

We need to check that we're inside a tree scope, or more precisely share the
same root node.
treeScope() of a disconnected node is Document so this check will work even if
both nodes aren't connected.
That is, when both nodes are disconnected, this check will succeed even if they
don't share the same root node.
r- because of this.

More information about the webkit-reviews mailing list