[webkit-reviews] review granted: [Bug 218007] REGRESSION(r266295): DOMSelection's addRange and containsNode behave incorrectly when selection crosses shadow boundaries : [Attachment 412185] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Oct 23 10:35:57 PDT 2020
Ryosuke Niwa <rniwa at webkit.org> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 218007: REGRESSION(r266295): DOMSelection's addRange and containsNode
behave incorrectly when selection crosses shadow boundaries
https://bugs.webkit.org/show_bug.cgi?id=218007
Attachment 412185: Patch
https://bugs.webkit.org/attachment.cgi?id=412185&action=review
--- Comment #10 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 412185
--> https://bugs.webkit.org/attachment.cgi?id=412185
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=412185&action=review
> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:965
> - if (isPointInRange(*range, makeBoundaryPoint(end)))
> + if (contains<ComposedTree>(*range, makeBoundaryPoint(end)))
I think this code will look better if it were
range->contains<ComposedTree>(makeBoundaryPoint(end)) instead.
> Source/WebCore/dom/SimpleRange.h:72
> +template<TreeType> bool contains(const SimpleRange&, const Node&);
> +
> +template<TreeType> bool intersects(const SimpleRange&, const SimpleRange&);
> +template<TreeType> bool intersects(const SimpleRange&, const Node&);
I think these two functions are probably better off being member functions of
SimpleRange.
> LayoutTests/editing/selection/selections-across-trees.html:27
> +
Can we also check that focusNode is still nodeInSlot?
More information about the webkit-reviews
mailing list