Bug 138685

Summary: Adjust the WKBundlePageOverlay Data Detectors SPI
Product: WebKit Reporter: Tim Horton <thorton>
Component: New BugsAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, bdakin, buildbot, commit-queue, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch andersca: review+

Description Tim Horton 2014-11-12 22:20:12 PST
Adjust the WKBundlePageOverlay Data Detectors SPI
Comment 1 Tim Horton 2014-11-12 22:20:40 PST
Created attachment 241468 [details]
Patch
Comment 2 WebKit Commit Bot 2014-11-12 22:22:48 PST
Attachment 241468 [details] did not pass style-queue:


ERROR: Source/WebKit2/WebProcess/WebPage/WebPageOverlay.cpp:122:  Declaration has space between type name and * in DDActionContext *WebPageOverlay  [whitespace/declaration] [3]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPageOverlay.h:83:  The parameter name "range" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 2 in 10 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Anders Carlsson 2014-11-13 11:50:52 PST
Comment on attachment 241468 [details]
Patch

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

> Source/WebKit2/UIProcess/mac/WKActionMenuController.mm:588
> +        RefPtr<WebPageProxy> retainedPage = _page;

I'd just call this "page", and add a comment specifying what it's used for.

> Source/WebKit2/WebProcess/WebPage/WebPage.messages.in:403
> +    DataDetectorsPresentedUI()

DidPresentUI.

> Source/WebKit2/WebProcess/WebPage/WebPage.messages.in:404
> +    DataDetectorsChangedUI()

DidChangeUI.

> Source/WebKit2/WebProcess/WebPage/WebPage.messages.in:405
> +    DataDetectorsHidUI()

DidHideUI.

> Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:1099
> +        if (DDActionContext *actionContext = webOverlay->actionContextForResultAtPoint(locationInContentCoordinates, mainResultRange)) {

Can this use a continue instead of a big nested if statement?
Comment 4 Tim Horton 2014-11-13 13:21:13 PST
http://trac.webkit.org/changeset/176086