Bug 235844 - Collapsed ranges return zero rects in DocumentContext
Summary: Collapsed ranges return zero rects in DocumentContext
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Megan Gardner
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-01-28 16:57 PST by Megan Gardner
Modified: 2022-01-31 15:13 PST (History)
3 users (show)

See Also:


Attachments
Patch (5.42 KB, patch)
2022-01-28 17:03 PST, Megan Gardner
no flags Details | Formatted Diff | Diff
Patch for landing (5.64 KB, patch)
2022-01-31 14:14 PST, Megan Gardner
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Megan Gardner 2022-01-28 16:57:36 PST
Collapsed ranges return zero rects in DocumentContext
Comment 1 Megan Gardner 2022-01-28 17:03:01 PST
Created attachment 450291 [details]
Patch
Comment 2 Tim Horton 2022-01-31 11:20:47 PST
Comment on attachment 450291 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=450291&action=review

> Source/WebKit/ChangeLog:12
> +        This results in an understandable zero rect for the absolute bounding rects for that character,
> +        which is not really representative of what the bounding rect is. For these situations, we should

Some reference back to the change you made that broke this would be good. ("Before revision X, we did A; afterwards, we did B, but that's a problem because C" instead of this form that only captures C). You and I know the context right now, but it's going to be quickly lost if not recorded here.

> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:4576
> +                    absoluteBoundingBox = VisiblePosition(makeDeprecatedLegacyPosition(iterator.range().start)).absoluteCaretBounds();

is it really right to be adding new `makeDeprecatedLegacyPosition`?
Comment 3 Megan Gardner 2022-01-31 14:14:46 PST
Created attachment 450461 [details]
Patch for landing
Comment 4 EWS 2022-01-31 15:12:53 PST
Committed r288849 (246610@main): <https://commits.webkit.org/246610@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 450461 [details].
Comment 5 Radar WebKit Bug Importer 2022-01-31 15:13:14 PST
<rdar://problem/88297028>