Bug 87162 - WTR needs an implementation of setAutomaticLinkDetectionEnabled
Summary: WTR needs an implementation of setAutomaticLinkDetectionEnabled
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 99069 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-22 13:50 PDT by Jessie Berlin
Modified: 2016-08-27 18:29 PDT (History)
7 users (show)

See Also:


Attachments
Patch (12.70 KB, patch)
2016-08-09 15:46 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (11.63 KB, patch)
2016-08-10 13:29 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (11.48 KB, patch)
2016-08-22 10:35 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.