Bug 199662 - [iOS] REGRESSION(r244851): Revealing caret sometimes fails when content inset is used
Summary: [iOS] REGRESSION(r244851): Revealing caret sometimes fails when content inset...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-07-09 23:47 PDT by Ryosuke Niwa
Modified: 2019-07-11 16:30 PDT (History)
4 users (show)

See Also:


Attachments
Fixes the bug (5.10 KB, patch)
2019-07-09 23:53 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Patch for landing (5.49 KB, patch)
2019-07-10 13:30 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2019-07-09 23:47:42 PDT
When WKWebView's content inset is used, we sometimes fail to reveal the caret as the user types.

<rdar://problem/52103924>
Comment 1 Ryosuke Niwa 2019-07-09 23:53:04 PDT
Created attachment 373825 [details]
Fixes the bug
Comment 2 Simon Fraser (smfr) 2019-07-10 11:47:15 PDT
Comment on attachment 373825 [details]
Fixes the bug

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

> Source/WebCore/rendering/RenderLayer.cpp:2685
>              LayoutRect viewRect = frameView.visualViewportRectExpandedByContentInsets();
>  
> +            maxScrollPosition = frameView.scrollPositionFromOffset(ScrollPosition(frameView.totalContentsSize() - flooredIntSize(viewRect.size())));

We need to clean this up so that webcore code doesn't have to get muddied with inset complexity.
Comment 3 Ryosuke Niwa 2019-07-10 13:29:56 PDT
Filed https://bugs.webkit.org/show_bug.cgi?id=199682
and https://bugs.webkit.org/show_bug.cgi?id=199683

Will add links as comments.
Comment 4 Ryosuke Niwa 2019-07-10 13:30:48 PDT
Created attachment 373861 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2019-07-10 14:12:54 PDT
Comment on attachment 373861 [details]
Patch for landing

Clearing flags on attachment: 373861

Committed r247327: <https://trac.webkit.org/changeset/247327>
Comment 6 WebKit Commit Bot 2019-07-10 14:14:04 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Ryosuke Niwa 2019-07-11 16:30:16 PDT
Fixed the test in https://trac.webkit.org/changeset/247373.