[webkit-reviews] review granted: [Bug 229779] Rewrite long press and drag tests to be more robust. : [Attachment 437084] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 1 16:49:32 PDT 2021


Wenson Hsieh <wenson_hsieh at apple.com> has granted Megan Gardner
<megan_gardner at apple.com>'s request for review:
Bug 229779: Rewrite long press and drag tests to be more robust.
https://bugs.webkit.org/show_bug.cgi?id=229779

Attachment 437084: Patch

https://bugs.webkit.org/attachment.cgi?id=437084&action=review




--- Comment #2 from Wenson Hsieh <wenson_hsieh at apple.com> ---
Comment on attachment 437084
  --> https://bugs.webkit.org/attachment.cgi?id=437084
Patch

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

> Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm:407
> +	       NSNumber *touchX = touch[HIDEventXKey] == [NSNull null] ? 0 :
touch[HIDEventXKey];

Nit - `0` should be `nil`

> Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm:408
> +	       NSNumber *touchY = touch[HIDEventYKey] == [NSNull null] ? 0 :
touch[HIDEventYKey];

Ditto.

>
LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-righ
t-to-change-selected-text.html:16
> +	   

Nit - stray whitespace.

>
LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-righ
t-to-change-selected-text.html:73
> +    

Ditto.

>
LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-up-t
o-change-selected-text.html:16
> +	   

Ditto.

>
LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-up-t
o-change-selected-text.html:70
> +    

Ditto.

> LayoutTests/resources/ui-helper.js:822
> +    static  midPointOfRect(rect) {

Nit - it looks like there are two spaces between `static` and `midPointOfRect`.

I'd also write this like `return { x: rect.left + (rect.width / 2), y: rect.top
+ (rect.height / 2) };`


More information about the webkit-reviews mailing list