[webkit-changes] [WebKit/WebKit] 48936a: Text Selection on flex and grid box items does not...
EWS
noreply at github.com
Sat Sep 17 20:43:57 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 48936aafec37b3b17c182f210f46e65bf6df9ba9
https://github.com/WebKit/WebKit/commit/48936aafec37b3b17c182f210f46e65bf6df9ba9
Author: Ahmad Saleem <ahmad.saleem792 at gmail.com>
Date: 2022-09-17 (Sat, 17 Sep 2022)
Changed paths:
A LayoutTests/fast/text/flexbox-selection-gap-painting-expected.html
A LayoutTests/fast/text/flexbox-selection-gap-painting.html
A LayoutTests/fast/text/grid-selection-gap-painting-expected.html
A LayoutTests/fast/text/grid-selection-gap-painting.html
M Source/WebCore/rendering/RenderBlock.cpp
Log Message:
-----------
Text Selection on flex and grid box items does not work as expected
Text Selection on flex and grid box items does not work as expected
https://bugs.webkit.org/show_bug.cgi?id=119878
Reviewed by Alan Bujtas.
Merge & Extend for Grid - https://src.chromium.org/viewvc/blink?view=revision&revision=171810
Webkit paints "selection gaps" that extend the selection to the bounds of the selection root.
If the selection spans two flex or grid items, and the selection root is the RenderBody, the selection gap for the first item is painted on top of the second item, obscuring its text.
By making each flex or grid item a selection root, the selection gap is painted only up to the bounds of the flex item. This is the logic we use for table cells and positioned objects.
* Source/WebCore/rendering/RenderBlock.cpp:
(RednerBlock::isSelectionRoot) - Added isFlexItemIncludingDeprecated and isGridItem to behave similar for Selection paint as Table
* LayoutTests/fast/text/flexbox-selection-gap-painting.html: Added Test
* LayoutTests/fast/text/flexbox-selection-gap-painting-expected.html: Added Test Expectations
* LayoutTests/fast/text/grid-selection-gap-painting.html: Added Test
* LayoutTests/fast/text/grid-selection-gap-painting-expected.html: Added Test Expectations
Canonical link: https://commits.webkit.org/254602@main
More information about the webkit-changes
mailing list