Bug 131493 - [iOS WebKit2] Support phraseboundary gesture recognizer for CJK
Summary: [iOS WebKit2] Support phraseboundary gesture recognizer for CJK
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Enrica Casucci
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-04-10 09:07 PDT by Enrica Casucci
Modified: 2014-04-10 13:14 PDT (History)
0 users

See Also:


Attachments
Patch (9.13 KB, patch)
2014-04-10 09:28 PDT, Enrica Casucci
benjamin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enrica Casucci 2014-04-10 09:07:26 PDT
This bugs tracks the work required to implement phrase boundary gesture for CJK keyboards.

<rdar://problem/16319583>
Comment 1 Enrica Casucci 2014-04-10 09:28:05 PDT
Created attachment 229053 [details]
Patch
Comment 2 Benjamin Poulain 2014-04-10 13:14:48 PDT
Comment on attachment 229053 [details]
Patch

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

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1492
> +            static const uint32_t kHitAreaWidth = 66;
> +            static const uint32_t kHitAreaHeight = 66;

They should not be static. (although I am curious if the compiler would optimize it out).

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1493
> +            FrameView* view = frame.view();

Let's use a reference to make Andreas happy.

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1506
> +            float deltaX = ABS(caretRect.x() + (caretRect.width() / 2) - point.x());
> +            float deltaYFromTheTop = ABS(caretRect.y() - point.y());
> +            float deltaYFromTheBottom = ABS(caretRect.y() + caretRect.height() - point.y());

Let's use the std abs.