[webkit-changes] [WebKit/WebKit] 4cf2bc: Selection rects for Live Text for images with vert...
Richard Robinson
noreply at github.com
Wed Apr 19 21:19:49 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4cf2bc3696e0fc7a634c1f73a2ba9d42bfa0d298
https://github.com/WebKit/WebKit/commit/4cf2bc3696e0fc7a634c1f73a2ba9d42bfa0d298
Author: Richard Robinson <richard_robinson2 at apple.com>
Date: 2023-04-19 (Wed, 19 Apr 2023)
Changed paths:
M Source/WebCore/rendering/RenderObject.cpp
M Source/WebKit/UIProcess/ios/WKTextSelectionRect.mm
Log Message:
-----------
Selection rects for Live Text for images with vertical writing mode are sometimes incorrect
https://bugs.webkit.org/show_bug.cgi?id=255625
rdar://106205724
Reviewed by Wenson Hsieh and Megan Gardner.
For Live Text, always use `UseIndivudalQuads` so that non-rectilinear selections always work.
* Source/WebCore/rendering/RenderObject.cpp:
(WebCore::adjustLineHeightOfSelectionGeometries):
(WebCore::RenderObject::collectSelectionGeometriesInternal):
(WebCore::coalesceSelectionGeometryWithAdjacentQuadsIfPossible):
(WebCore::RenderObject::collectSelectionGeometries):
Ensure that adjacent rects are coalesced if they overlap.
* Source/WebKit/UIProcess/ios/WKTextSelectionRect.mm:
(-[WKTextSelectionRectCustomHandleInfo initWithFloatQuad:isHorizontal:]):
(-[WKTextSelectionRectCustomHandleInfo bottomLeft]):
(-[WKTextSelectionRectCustomHandleInfo topLeft]):
(-[WKTextSelectionRectCustomHandleInfo bottomRight]):
(-[WKTextSelectionRectCustomHandleInfo topRight]):
(-[WKTextSelectionRect _customHandleInfo]):
(-[WKTextSelectionRect isVertical]):
(-[WKTextSelectionRectCustomHandleInfo initWithFloatQuad:]): Deleted.
Work around UIKit issues with the selection handle by changing the quad points.
Canonical link: https://commits.webkit.org/263159@main
More information about the webkit-changes
mailing list