Summary: | First character in each word-wrapped line has incorrect character rect when requested range spans multiple lines | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Daniel Bates <dbates> | ||||||||||||
Component: | Text | Assignee: | Daniel Bates <dbates> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | aakash_jain, cdumez, esprehn+autocc, ews-watchlist, glenn, kangil.han, kondapallykalyan, mmaxfield, pdr, ryanhaddad, webkit-bot-watchers-bugzilla, webkit-bug-importer, zalan | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | WebKit Local Build | ||||||||||||||
Hardware: | Unspecified | ||||||||||||||
OS: | Unspecified | ||||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=205883 | ||||||||||||||
Attachments: |
|
Description
Daniel Bates
2020-01-06 16:34:44 PST
Created attachment 386911 [details]
For Bots
Created attachment 386989 [details]
Patch and unit test
Comment on attachment 386989 [details] Patch and unit test View in context: https://bugs.webkit.org/attachment.cgi?id=386989&action=review > Source/WebCore/dom/Range.cpp:1152 > + absoluteTextRects(rects, useSelectionHeight, inFixed, { BoundingRectBehavior::IgnoreEmptyTextSelections }); I patched here because I was kinda thinking this is the behavior we want for all IPI and SPI: it makes us match NSLayoutManager behavior. But it's enough to fix just my particular bug by having <https://trac.webkit.org/browser/trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm?rev=254070#L4074> pass BoundingRectBehavior::IgnoreEmptyTextSelections. That is, Range::absoluteBoundingBox() could take an optional BoundingRectBehavior argument, default such that we do what we do now and just have WebPageIOS.mm's code pass BoundingRectBehavior::IgnoreEmptyTextSelections. Thoughts? Created attachment 386996 [details]
Addendum - keep current behavior of Range::absoluteBoundingBox, but fix up request document context code path
(In reply to Daniel Bates from comment #5) > Created attachment 386996 [details] > Addendum - keep current behavior of Range::absoluteBoundingBox, but fix up > request document context code path I can merge ^^^ into the patch if it would help make it easier to review this change. Created attachment 387011 [details]
To land
(In reply to Daniel Bates from comment #6) > (In reply to Daniel Bates from comment #5) > > Created attachment 386996 [details] > > Addendum - keep current behavior of Range::absoluteBoundingBox, but fix up > > request document context code path > > I can merge ^^^ into the patch if it would help make it easier to review > this change. Merge this in to the updated patch! Comment on attachment 387011 [details] To land Clearing flags on attachment: 387011 Committed r254144: <https://trac.webkit.org/changeset/254144> All reviewed patches have been landed. Closing bug. This seems to have broken the iOS build. Tracked in https://bugs.webkit.org/show_bug.cgi?id=205883 Relevant error: WebPageIOS.mm:4064:73: error: use of undeclared identifier 'BoundingRectBehavior' Reverted r254144 for reason: Broke the iOS build. Committed r254151: <https://trac.webkit.org/changeset/254151> Created attachment 387024 [details]
To land
Comment on attachment 387024 [details] To land Clearing flags on attachment: 387024 Committed r254153: <https://trac.webkit.org/changeset/254153> All reviewed patches have been landed. Closing bug. |