Title: [205094] trunk
Revision
205094
Author
[email protected]
Date
2016-08-27 18:27:41 -0700 (Sat, 27 Aug 2016)

Log Message

WTR needs an implementation of setAutomaticLinkDetectionEnabled
https://bugs.webkit.org/show_bug.cgi?id=87162

Patch by Jonathan Bedard <[email protected]> on 2016-08-27
Source/WebKit2:

Reviewed by Darin Adler

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetAutomaticLinkDetectionEnabled): Added WKBundleSetAutomaticLinkDetectionEnabled definition.
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Added WKBundleSetAutomaticLinkDetectionEnabled declaration.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setAutomaticLinkDetectionEnabled): Added setAutomaticLinkDetectionEnabled definition.
* WebProcess/InjectedBundle/InjectedBundle.h: Added setAutomaticLinkDetectionEnabled declaration.
* WebProcess/WebProcess.h: Declared setTextCheckerState public.

Tools:

Reviewed by Darin Adler.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Added setAutomaticLinkDetectionEnabled binding.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting): Set automatic link detection to false by default.
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setAutomaticLinkDetectionEnabled): Added setAutomaticLinkDetectionEnabled definition.
* WebKitTestRunner/InjectedBundle/TestRunner.h: Added setAutomaticLinkDetectionEnabled declaration.

LayoutTests:

Reviewed by Darin Adler.

* platform/wk2/TestExpectations: Removed 2 now passing tests.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (205093 => 205094)


--- trunk/LayoutTests/ChangeLog	2016-08-28 00:40:24 UTC (rev 205093)
+++ trunk/LayoutTests/ChangeLog	2016-08-28 01:27:41 UTC (rev 205094)
@@ -1,3 +1,12 @@
+2016-08-27  Jonathan Bedard  <[email protected]>
+
+        WTR needs an implementation of setAutomaticLinkDetectionEnabled
+        https://bugs.webkit.org/show_bug.cgi?id=87162
+
+        Reviewed by Darin Adler.
+
+        * platform/wk2/TestExpectations: Removed 2 now passing tests.
+
 2016-08-27  Sam Weinig  <[email protected]>
 
         Remove more custom _javascript_ bindings

Modified: trunk/LayoutTests/platform/wk2/TestExpectations (205093 => 205094)


--- trunk/LayoutTests/platform/wk2/TestExpectations	2016-08-28 00:40:24 UTC (rev 205093)
+++ trunk/LayoutTests/platform/wk2/TestExpectations	2016-08-28 01:27:41 UTC (rev 205094)
@@ -251,11 +251,8 @@
 fast/block/lineboxcontain/block-glyphs.html
 fast/block/lineboxcontain/font.html
 
-# WTR needs an implementation of setAutomaticLinkDetectionEnabled.
-# https://bugs.webkit.org/show_bug.cgi?id=87162
-editing/inserting/smart-link-when-caret-is-moved-before-URL.html
+# Strange error in “Internals”
 editing/inserting/smart-quote-with-all-configurations.html
-editing/inserting/typing-space-to-trigger-smart-link.html
 
 # https://bugs.webkit.org/show_bug.cgi?id=115203
 # Downloaded file name tests fail because of incorrect custom policy delegate implementation

Modified: trunk/Source/WebKit2/ChangeLog (205093 => 205094)


--- trunk/Source/WebKit2/ChangeLog	2016-08-28 00:40:24 UTC (rev 205093)
+++ trunk/Source/WebKit2/ChangeLog	2016-08-28 01:27:41 UTC (rev 205094)
@@ -1,3 +1,18 @@
+2016-08-27  Jonathan Bedard  <[email protected]>
+
+        WTR needs an implementation of setAutomaticLinkDetectionEnabled
+        https://bugs.webkit.org/show_bug.cgi?id=87162
+
+        Reviewed by Darin Adler
+
+        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+        (WKBundleSetAutomaticLinkDetectionEnabled): Added WKBundleSetAutomaticLinkDetectionEnabled definition.
+        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Added WKBundleSetAutomaticLinkDetectionEnabled declaration.
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::setAutomaticLinkDetectionEnabled): Added setAutomaticLinkDetectionEnabled definition.
+        * WebProcess/InjectedBundle/InjectedBundle.h: Added setAutomaticLinkDetectionEnabled declaration.
+        * WebProcess/WebProcess.h: Declared setTextCheckerState public.
+
 2016-08-27  Carlos Garcia Campos  <[email protected]>
 
         [GTK][Threaded Compositor] Several flaky tests

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp (205093 => 205094)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp	2016-08-28 00:40:24 UTC (rev 205093)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp	2016-08-28 01:27:41 UTC (rev 205094)
@@ -155,6 +155,11 @@
     toImpl(bundleRef)->setJavaScriptCanAccessClipboard(toImpl(pageGroupRef), enabled);
 }
 
+void WKBundleSetAutomaticLinkDetectionEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
+{
+    toImpl(bundleRef)->setAutomaticLinkDetectionEnabled(toImpl(pageGroupRef), enabled);
+}
+
 void WKBundleSetPrivateBrowsingEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
 {
     toImpl(bundleRef)->setPrivateBrowsingEnabled(toImpl(pageGroupRef), enabled);

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h (205093 => 205094)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h	2016-08-28 00:40:24 UTC (rev 205093)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h	2016-08-28 01:27:41 UTC (rev 205094)
@@ -49,6 +49,7 @@
 WK_EXPORT void WKBundleSetFrameFlatteningEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetPluginsEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetJavaScriptCanAccessClipboard(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
+WK_EXPORT void WKBundleSetAutomaticLinkDetectionEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled);
 WK_EXPORT void WKBundleSetPrivateBrowsingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetPopupBlockingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetAuthorAndUserStylesEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (205093 => 205094)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2016-08-28 00:40:24 UTC (rev 205093)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2016-08-28 01:27:41 UTC (rev 205094)
@@ -31,6 +31,7 @@
 #include "InjectedBundleScriptWorld.h"
 #include "NotificationPermissionRequestManager.h"
 #include "SessionTracker.h"
+#include "TextChecker.h"
 #include "UserData.h"
 #include "WKAPICast.h"
 #include "WKBundleAPICast.h"
@@ -45,6 +46,7 @@
 #include "WebPreferencesStore.h"
 #include "WebProcess.h"
 #include "WebProcessCreationParameters.h"
+#include "WebProcessMessages.h"
 #include "WebProcessPoolMessages.h"
 #include "WebUserContentController.h"
 #include <_javascript_Core/APICast.h>
@@ -302,6 +304,16 @@
         (*iter)->settings().setJavaScriptCanAccessClipboard(enabled);
 }
 
+void InjectedBundle::setAutomaticLinkDetectionEnabled(WebPageGroupProxy* pageGroup, bool enabled)
+{
+#if USE(APPKIT)
+    if (enabled == TextChecker::state().isAutomaticLinkDetectionEnabled)
+        return;
+    TextChecker::setAutomaticLinkDetectionEnabled(enabled);
+    WebProcess::singleton().setTextCheckerState(TextChecker::state());
+#endif
+}
+
 void InjectedBundle::setPrivateBrowsingEnabled(WebPageGroupProxy* pageGroup, bool enabled)
 {
     if (enabled) {

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h (205093 => 205094)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h	2016-08-28 00:40:24 UTC (rev 205093)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h	2016-08-28 01:27:41 UTC (rev 205094)
@@ -106,6 +106,7 @@
     void setFrameFlatteningEnabled(WebPageGroupProxy*, bool);
     void setPluginsEnabled(WebPageGroupProxy*, bool);
     void setJavaScriptCanAccessClipboard(WebPageGroupProxy*, bool);
+    void setAutomaticLinkDetectionEnabled(WebPageGroupProxy*, bool enabled);
     void setPrivateBrowsingEnabled(WebPageGroupProxy*, bool);
     void setPopupBlockingEnabled(WebPageGroupProxy*, bool);
     void setAuthorAndUserStylesEnabled(WebPageGroupProxy*, bool);

Modified: trunk/Source/WebKit2/WebProcess/WebProcess.h (205093 => 205094)


--- trunk/Source/WebKit2/WebProcess/WebProcess.h	2016-08-28 00:40:24 UTC (rev 205093)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.h	2016-08-28 01:27:41 UTC (rev 205094)
@@ -149,6 +149,7 @@
 #endif
     
     const TextCheckerState& textCheckerState() const { return m_textCheckerState; }
+    void setTextCheckerState(const TextCheckerState&);
 
     void clearResourceCaches(ResourceCachesToClear = AllResourceCaches);
     
@@ -266,8 +267,6 @@
     
     void startMemorySampler(const SandboxExtension::Handle&, const String&, const double);
     void stopMemorySampler();
-
-    void setTextCheckerState(const TextCheckerState&);
     
     void getWebCoreStatistics(uint64_t callbackID);
     void garbageCollectJavaScriptObjects();

Modified: trunk/Tools/ChangeLog (205093 => 205094)


--- trunk/Tools/ChangeLog	2016-08-28 00:40:24 UTC (rev 205093)
+++ trunk/Tools/ChangeLog	2016-08-28 01:27:41 UTC (rev 205094)
@@ -1,3 +1,17 @@
+2016-08-27  Jonathan Bedard  <[email protected]>
+
+        WTR needs an implementation of setAutomaticLinkDetectionEnabled
+        https://bugs.webkit.org/show_bug.cgi?id=87162
+
+        Reviewed by Darin Adler.
+
+        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Added setAutomaticLinkDetectionEnabled binding.
+        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+        (WTR::InjectedBundle::beginTesting): Set automatic link detection to false by default.
+        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+        (WTR::TestRunner::setAutomaticLinkDetectionEnabled): Added setAutomaticLinkDetectionEnabled definition.
+        * WebKitTestRunner/InjectedBundle/TestRunner.h: Added setAutomaticLinkDetectionEnabled declaration.
+
 2016-08-27  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: Make localizedString.js diff and commit friendly (UTF16 -> UTF8)

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (205093 => 205094)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl	2016-08-28 00:40:24 UTC (rev 205093)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl	2016-08-28 01:27:41 UTC (rev 205094)
@@ -62,6 +62,7 @@
     void setAllowFileAccessFromFileURLs(boolean value);
     void setPluginsEnabled(boolean value);
     void setJavaScriptCanAccessClipboard(boolean value);
+    void setAutomaticLinkDetectionEnabled(boolean value);
     void setPrivateBrowsingEnabled(boolean value);
     void setPopupBlockingEnabled(boolean value);
     void setAuthorAndUserStylesEnabled(boolean value);

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp (205093 => 205094)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp	2016-08-28 00:40:24 UTC (rev 205093)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp	2016-08-28 01:27:41 UTC (rev 205094)
@@ -294,6 +294,7 @@
 
     WKBundleSetAllowUniversalAccessFromFileURLs(m_bundle, m_pageGroup, true);
     WKBundleSetJavaScriptCanAccessClipboard(m_bundle, m_pageGroup, true);
+    WKBundleSetAutomaticLinkDetectionEnabled(m_bundle, m_pageGroup, false);
     WKBundleSetPrivateBrowsingEnabled(m_bundle, m_pageGroup, false);
     WKBundleSetAuthorAndUserStylesEnabled(m_bundle, m_pageGroup, true);
     WKBundleSetFrameFlatteningEnabled(m_bundle, m_pageGroup, false);

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (205093 => 205094)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp	2016-08-28 00:40:24 UTC (rev 205093)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp	2016-08-28 01:27:41 UTC (rev 205094)
@@ -405,6 +405,12 @@
      WKBundleSetJavaScriptCanAccessClipboard(injectedBundle.bundle(), injectedBundle.pageGroup(), enabled);
 }
 
+void TestRunner::setAutomaticLinkDetectionEnabled(bool enabled)
+{
+    auto& injectedBundle = InjectedBundle::singleton();
+    WKBundleSetAutomaticLinkDetectionEnabled(injectedBundle.bundle(), injectedBundle.pageGroup(), enabled);
+}
+
 void TestRunner::setPrivateBrowsingEnabled(bool enabled)
 {
     auto& injectedBundle = InjectedBundle::singleton();

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (205093 => 205094)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h	2016-08-28 00:40:24 UTC (rev 205093)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h	2016-08-28 01:27:41 UTC (rev 205094)
@@ -109,6 +109,7 @@
     void setAllowFileAccessFromFileURLs(bool);
     void setPluginsEnabled(bool);
     void setJavaScriptCanAccessClipboard(bool);
+    void setAutomaticLinkDetectionEnabled(bool);
     void setPrivateBrowsingEnabled(bool);
     void setPopupBlockingEnabled(bool);
     void setAuthorAndUserStylesEnabled(bool);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to