Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6ae5324f17e72cfe158fd52daa83c7e9fc4f461f
https://github.com/WebKit/WebKit/commit/6ae5324f17e72cfe158fd52daa83c7e9fc4f461f
Author: Alan Baradlay <[email protected]>
Date: 2025-05-02 (Fri, 02 May 2025)
Changed paths:
M LayoutTests/fast/editing/selection-across-flex-grid-boundary-expected.html
M LayoutTests/fast/editing/selection-across-flex-grid-boundary.html
M LayoutTests/fast/misc/selection-gap-between-flex-items-expected.html
M LayoutTests/platform/ios/TestExpectations
M Source/WebCore/rendering/RenderBlock.cpp
Log Message:
-----------
REGRESSION (293958@main): Selection of table cells on MotionMark results page
extends to the right, obscuring other table content
https://bugs.webkit.org/show_bug.cgi?id=292435
<rdar://150458782>
Reviewed by Antti Koivisto.
In 293958@main selection _gap_ painting was expanded to flex and grid
containers.
It was meant to fix an issue with selection painting, where flex and grid
_items_ computed their selection rectangles
as if the gap between them would be painted. The absence of gap painting
resulted in oddly shaped selections.
Now flex and grid containers paint (selection) gaps between their items which
is exactly what we do on block content.
However it ended up producing overlapping selections in some places (e.g. MM
table).
We've been seeing such overlapping selections in block content too, but
293958@main made it more frequent (as now we do that for flex and grid).
In this patch,
1. instead of letting flex/grid containers paint selection gap between their
items (this is 293958@main)
2. let's paint selection on said items as if there was no gap painting at all
It essentially means we only paint selection over the content and not beyond
with the assumption of selection continues between flex/grid items.
* LayoutTests/fast/misc/selection-gap-between-flex-items-expected.html:
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::isSelectionRoot const):
(WebCore::RenderBlock::selectionGaps):
fast/editing/selection-across-flex-grid-boundary.html: the point of this test
case
is to demonstrate that 'before selection' text is not getting selected.
Canonical link: https://commits.webkit.org/294464@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