Bug 87162

Summary: WTR needs an implementation of setAutomaticLinkDetectionEnabled
Product: WebKit Reporter: Jessie Berlin <jberlin>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ddkilzer, jbedard, max.hong.shen, rniwa, webkit-bug-importer, zan
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Jessie Berlin 2012-05-22 13:50:43 PDT
It was added in http://trac.webkit.org/changeset/117590 for DRT, but not for WTR.
Comment 1 Radar WebKit Bug Importer 2012-05-22 13:51:48 PDT
<rdar://problem/11508445>
Comment 2 Ryosuke Niwa 2014-04-27 12:03:31 PDT
I don't think this is a regression.
Comment 3 Martin Robinson 2015-05-07 19:14:32 PDT
*** Bug 99069 has been marked as a duplicate of this bug. ***
Comment 4 Jonathan Bedard 2016-08-09 15:38:58 PDT
Note that while investigating, https://bugs.webkit.org/show_bug.cgi?id=160713 was uncovered.  Note that despite some of the comments in various configuration files, the two tests which call setAutomaticLinkDetectionEnabled and are still failing are doing so through a different mechanism than the ones corrected here.
Comment 5 Jonathan Bedard 2016-08-09 15:46:51 PDT
Created attachment 285683 [details]
Patch
Comment 6 Jonathan Bedard 2016-08-10 13:29:32 PDT
Created attachment 285752 [details]
Patch
Comment 7 Jonathan Bedard 2016-08-10 13:30:42 PDT
Note that it is only Mac that implements the underlying functionality setAutomaticLinkDetectionEnabled is designed to test.
Comment 8 Darin Adler 2016-08-20 19:54:22 PDT
Comment on attachment 285752 [details]
Patch

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

> Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:310
> +    if (static_cast<bool>(enabled) == TextChecker::state().isAutomaticLinkDetectionEnabled)

static_cast<bool>(enabled) is wrong here; just "enabled" will do

> Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:315
> +    fputs("Automatic link detection undefined for this platform\n", stderr);

It’s not appropriate to write directly to stderr from this class.

> Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:52
> +    WK_EXPORT void WKBundleSetAutomaticLinkDetectionEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled);

This should not be indented. Please match the lines above and below this.
Comment 9 Jonathan Bedard 2016-08-22 10:35:33 PDT
Created attachment 286605 [details]
Patch
Comment 10 Jonathan Bedard 2016-08-22 14:06:44 PDT
Comment on attachment 286605 [details]
Patch

Requesting commit queue.  The gtk-wk2 failure is unrelated to this patch.
Comment 11 WebKit Commit Bot 2016-08-27 18:29:29 PDT
Comment on attachment 286605 [details]
Patch

Clearing flags on attachment: 286605

Committed r205094: <http://trac.webkit.org/changeset/205094>
Comment 12 WebKit Commit Bot 2016-08-27 18:29:35 PDT
All reviewed patches have been landed.  Closing bug.