Bug 182815 - Support scrolling for non-editable web-selection and start autoscroll when near screen edges
Summary: Support scrolling for non-editable web-selection and start autoscroll when ne...
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: 2018-02-14 15:56 PST by Megan Gardner
Modified: 2018-02-15 19:09 PST (History)
5 users (show)

See Also:


Attachments
Patch (11.95 KB, patch)
2018-02-14 16:04 PST, Megan Gardner
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews121 for ios-simulator-wk2 (11.30 MB, application/zip)
2018-02-14 17:41 PST, EWS Watchlist
no flags Details
Patch (11.49 KB, patch)
2018-02-14 18:08 PST, Megan Gardner
no flags Details | Formatted Diff | Diff
Patch (11.45 KB, patch)
2018-02-15 14:34 PST, Megan Gardner
no flags Details | Formatted Diff | Diff
Patch (11.48 KB, patch)
2018-02-15 15:07 PST, Megan Gardner
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Megan Gardner 2018-02-14 15:56:51 PST
Switch to UIWKTextInteractionAssistant for non-editable web-selection and allow for autoscroll
Comment 1 Megan Gardner 2018-02-14 16:04:19 PST
Created attachment 333855 [details]
Patch
Comment 2 EWS Watchlist 2018-02-14 17:41:58 PST
Comment on attachment 333855 [details]
Patch

Attachment 333855 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/6509104

New failing tests:
editing/pasteboard/copy-element-with-conflicting-background-color-from-rule.html
fast/forms/textfield-no-linebreak.html
editing/execCommand/enabling-and-selection-2.html
editing/pasteboard/copy-standalone-image.html
fast/css-grid-layout/grid-simplified-layout-positioned.html
fast/forms/textarea/textarea-placeholder-paint-order-2.html
fast/forms/input-placeholder-paint-order-2.html
fast/css/caret-color-auto.html
Comment 3 EWS Watchlist 2018-02-14 17:41:59 PST
Created attachment 333863 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 4 Megan Gardner 2018-02-14 18:08:44 PST
Created attachment 333864 [details]
Patch
Comment 5 Tim Horton 2018-02-15 12:43:53 PST
Comment on attachment 333864 [details]
Patch

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

> Source/WebCore/page/ios/EventHandlerIOS.mm:589
> +    FloatPoint edgeDistanceThreashold;

“Threashold"

> Source/WebCore/page/ios/EventHandlerIOS.mm:591
> +    edgeDistanceThreashold.setX(screenRect.width() / 10);
> +    edgeDistanceThreashold.setY(screenRect.height() / 10);

I think this could be

FloatPoint edgeDistanceThreshold = toFloatPoint(screenRect.size());
edgeDistanceThreshold.scale(1. / 10);

if you wanted to repeat yourself less. I’m sure there are similar ways to use FloatPoint/Size/etc. to make the rest of the code less wordy, but w/e.

> Source/WebCore/page/ios/EventHandlerIOS.mm:629
> +    FloatRect unobscuredContetRect = protectedFrame->view()->unobscuredContentRect();

Contet
Comment 6 Megan Gardner 2018-02-15 14:34:16 PST
Created attachment 333946 [details]
Patch
Comment 7 Megan Gardner 2018-02-15 15:07:09 PST
Created attachment 333954 [details]
Patch
Comment 8 Tim Horton 2018-02-15 16:36:08 PST
Comment on attachment 333954 [details]
Patch

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

> Source/WebCore/page/ios/EventHandlerIOS.mm:591
> +    FloatPoint edgeDistanceThreashold = toFloatPoint(screenRect.size());

Still threashold????

> Source/WebCore/page/ios/EventHandlerIOS.mm:592
> +    edgeDistanceThreashold.scale(1. / 10);

Maybe reconsider the 10% part? It seems weird that the threshold will be wildly different between iPad Pro and a small iPhone.

> Source/WebCore/page/ios/EventHandlerIOS.mm:633
> +    // This will need to be revisited if delegatedScrolling is updated

Updated? I don’t think we need this comment.

> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:1828
> +    else if (!m_assistedNode) {

Probably can just be an else.
Comment 9 Radar WebKit Bug Importer 2018-02-15 19:08:36 PST
<rdar://problem/37592636>
Comment 10 Megan Gardner 2018-02-15 19:09:00 PST
https://trac.webkit.org/r228549