Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0c29e60b7f0a3238a625297d8c6a6c6b57ec1bb7
      
https://github.com/WebKit/WebKit/commit/0c29e60b7f0a3238a625297d8c6a6c6b57ec1bb7
  Author: Wenson Hsieh <[email protected]>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    A 
LayoutTests/fast/element-targeting/target-container-with-anonymous-sibling-expected.txt
    A 
LayoutTests/fast/element-targeting/target-container-with-anonymous-sibling.html
    M LayoutTests/resources/ui-helper.js
    M Source/WebCore/page/ElementTargetingController.cpp

  Log Message:
  -----------
  [Remote Inspection] `elementAndAncestorsAreOnlyRenderedChildren` sometimes 
yields false positives
https://bugs.webkit.org/show_bug.cgi?id=276503
rdar://131535241

Reviewed by Megan Gardner and Abrar Rahman Protyasha.

`elementAndAncestorsAreOnlyRenderedChildren` is currently incorrect in the case 
where a parent
renderer has anonymous renderers as children, for which `element()` is null. 
This causes us to
(falsely) assume that certain elements are only children in the render tree 
(along with all of their
ancestors), and avoid surfacing them as target candidates.

Fix this by refactoring the function, such that it doesn't ignore anonymous 
renderers.

* 
LayoutTests/fast/element-targeting/target-container-with-anonymous-sibling-expected.txt:
 Added.
* 
LayoutTests/fast/element-targeting/target-container-with-anonymous-sibling.html:
 Added.
* LayoutTests/resources/ui-helper.js:
(window.UIHelper.adjustVisibilityForFrontmostTarget):
* Source/WebCore/page/ElementTargetingController.cpp:
(WebCore::elementAndAncestorsAreOnlyRenderedChildren):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to