Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7d49c3dbe9a81f3618f3deb67fe407c89ba47bfe
      
https://github.com/WebKit/WebKit/commit/7d49c3dbe9a81f3618f3deb67fe407c89ba47bfe
  Author: Alan Baradlay <[email protected]>
  Date:   2024-11-24 (Sun, 24 Nov 2024)

  Changed paths:
    A LayoutTests/fast/editing/selection-across-flex-grid-boundary-expected.html
    A LayoutTests/fast/editing/selection-across-flex-grid-boundary.html
    M Source/WebCore/rendering/RenderBlock.cpp

  Log Message:
  -----------
  marketwatch.com: `Image caption` (or alt text) selection trigger image 
selection
https://bugs.webkit.org/show_bug.cgi?id=283600
rdar://138995804

Reviewed by Antti Koivisto.

The extra selection we see here is the "gap" part of the selection triggered by 
an early return in RenderBlock::selectionGaps (see !isRenderBlockFlow() 
condition).
Due to this early return we fail to update the selection coordinates for flex 
and grid containers (namely lastLogicalTop) which makes us think they are part 
of the selection gap and we paint it accordingly.

We already fixed this long ago for tables by telling the selection paining code 
that they paint their own selection (see paintsOwnSelection)
This patch expands on this logic by including flex and grid containers too.

* LayoutTests/fast/editing/selection-across-flex-grid-boundary-expected.html: 
Added.
* LayoutTests/fast/editing/selection-across-flex-grid-boundary.html: Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-hidden-and-innertext-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-hidden-and-innertext-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-hidden-and-innertext.html:
 Added.
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::blockSelectionGaps):

Canonical link: https://commits.webkit.org/287033@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