Changeset 205094 in webkit


Ignore:
Timestamp:
Aug 27, 2016 6:27:41 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Jonathan Bedard <Jonathan Bedard> 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.
Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r205088 r205094  
     12016-08-27  Jonathan Bedard  <jbedard@apple.com>
     2
     3        WTR needs an implementation of setAutomaticLinkDetectionEnabled
     4        https://bugs.webkit.org/show_bug.cgi?id=87162
     5
     6        Reviewed by Darin Adler.
     7
     8        * platform/wk2/TestExpectations: Removed 2 now passing tests.
     9
    1102016-08-27  Sam Weinig  <sam@webkit.org>
    211
  • trunk/LayoutTests/platform/wk2/TestExpectations

    r204918 r205094  
    252252fast/block/lineboxcontain/font.html
    253253
    254 # WTR needs an implementation of setAutomaticLinkDetectionEnabled.
    255 # https://bugs.webkit.org/show_bug.cgi?id=87162
    256 editing/inserting/smart-link-when-caret-is-moved-before-URL.html
     254# Strange error in “Internals”
    257255editing/inserting/smart-quote-with-all-configurations.html
    258 editing/inserting/typing-space-to-trigger-smart-link.html
    259256
    260257# https://bugs.webkit.org/show_bug.cgi?id=115203
  • trunk/Source/WebKit2/ChangeLog

    r205075 r205094  
     12016-08-27  Jonathan Bedard  <jbedard@apple.com>
     2
     3        WTR needs an implementation of setAutomaticLinkDetectionEnabled
     4        https://bugs.webkit.org/show_bug.cgi?id=87162
     5
     6        Reviewed by Darin Adler
     7
     8        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     9        (WKBundleSetAutomaticLinkDetectionEnabled): Added WKBundleSetAutomaticLinkDetectionEnabled definition.
     10        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Added WKBundleSetAutomaticLinkDetectionEnabled declaration.
     11        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     12        (WebKit::InjectedBundle::setAutomaticLinkDetectionEnabled): Added setAutomaticLinkDetectionEnabled definition.
     13        * WebProcess/InjectedBundle/InjectedBundle.h: Added setAutomaticLinkDetectionEnabled declaration.
     14        * WebProcess/WebProcess.h: Declared setTextCheckerState public.
     15
    1162016-08-27  Carlos Garcia Campos  <cgarcia@igalia.com>
    217
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r202242 r205094  
    156156}
    157157
     158void WKBundleSetAutomaticLinkDetectionEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
     159{
     160    toImpl(bundleRef)->setAutomaticLinkDetectionEnabled(toImpl(pageGroupRef), enabled);
     161}
     162
    158163void WKBundleSetPrivateBrowsingEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
    159164{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h

    r191047 r205094  
    5050WK_EXPORT void WKBundleSetPluginsEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
    5151WK_EXPORT void WKBundleSetJavaScriptCanAccessClipboard(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
     52WK_EXPORT void WKBundleSetAutomaticLinkDetectionEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled);
    5253WK_EXPORT void WKBundleSetPrivateBrowsingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
    5354WK_EXPORT void WKBundleSetPopupBlockingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r204743 r205094  
    3232#include "NotificationPermissionRequestManager.h"
    3333#include "SessionTracker.h"
     34#include "TextChecker.h"
    3435#include "UserData.h"
    3536#include "WKAPICast.h"
     
    4647#include "WebProcess.h"
    4748#include "WebProcessCreationParameters.h"
     49#include "WebProcessMessages.h"
    4850#include "WebProcessPoolMessages.h"
    4951#include "WebUserContentController.h"
     
    303305}
    304306
     307void InjectedBundle::setAutomaticLinkDetectionEnabled(WebPageGroupProxy* pageGroup, bool enabled)
     308{
     309#if USE(APPKIT)
     310    if (enabled == TextChecker::state().isAutomaticLinkDetectionEnabled)
     311        return;
     312    TextChecker::setAutomaticLinkDetectionEnabled(enabled);
     313    WebProcess::singleton().setTextCheckerState(TextChecker::state());
     314#endif
     315}
     316
    305317void InjectedBundle::setPrivateBrowsingEnabled(WebPageGroupProxy* pageGroup, bool enabled)
    306318{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r204668 r205094  
    107107    void setPluginsEnabled(WebPageGroupProxy*, bool);
    108108    void setJavaScriptCanAccessClipboard(WebPageGroupProxy*, bool);
     109    void setAutomaticLinkDetectionEnabled(WebPageGroupProxy*, bool enabled);
    109110    void setPrivateBrowsingEnabled(WebPageGroupProxy*, bool);
    110111    void setPopupBlockingEnabled(WebPageGroupProxy*, bool);
  • trunk/Source/WebKit2/WebProcess/WebProcess.h

    r204985 r205094  
    150150   
    151151    const TextCheckerState& textCheckerState() const { return m_textCheckerState; }
     152    void setTextCheckerState(const TextCheckerState&);
    152153
    153154    void clearResourceCaches(ResourceCachesToClear = AllResourceCaches);
     
    267268    void startMemorySampler(const SandboxExtension::Handle&, const String&, const double);
    268269    void stopMemorySampler();
    269 
    270     void setTextCheckerState(const TextCheckerState&);
    271270   
    272271    void getWebCoreStatistics(uint64_t callbackID);
  • trunk/Tools/ChangeLog

    r205089 r205094  
     12016-08-27  Jonathan Bedard  <jbedard@apple.com>
     2
     3        WTR needs an implementation of setAutomaticLinkDetectionEnabled
     4        https://bugs.webkit.org/show_bug.cgi?id=87162
     5
     6        Reviewed by Darin Adler.
     7
     8        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Added setAutomaticLinkDetectionEnabled binding.
     9        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
     10        (WTR::InjectedBundle::beginTesting): Set automatic link detection to false by default.
     11        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
     12        (WTR::TestRunner::setAutomaticLinkDetectionEnabled): Added setAutomaticLinkDetectionEnabled definition.
     13        * WebKitTestRunner/InjectedBundle/TestRunner.h: Added setAutomaticLinkDetectionEnabled declaration.
     14
    1152016-08-27  Joseph Pecoraro  <pecoraro@apple.com>
    216
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl

    r204853 r205094  
    6363    void setPluginsEnabled(boolean value);
    6464    void setJavaScriptCanAccessClipboard(boolean value);
     65    void setAutomaticLinkDetectionEnabled(boolean value);
    6566    void setPrivateBrowsingEnabled(boolean value);
    6667    void setPopupBlockingEnabled(boolean value);
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp

    r203975 r205094  
    295295    WKBundleSetAllowUniversalAccessFromFileURLs(m_bundle, m_pageGroup, true);
    296296    WKBundleSetJavaScriptCanAccessClipboard(m_bundle, m_pageGroup, true);
     297    WKBundleSetAutomaticLinkDetectionEnabled(m_bundle, m_pageGroup, false);
    297298    WKBundleSetPrivateBrowsingEnabled(m_bundle, m_pageGroup, false);
    298299    WKBundleSetAuthorAndUserStylesEnabled(m_bundle, m_pageGroup, true);
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp

    r204853 r205094  
    406406}
    407407
     408void TestRunner::setAutomaticLinkDetectionEnabled(bool enabled)
     409{
     410    auto& injectedBundle = InjectedBundle::singleton();
     411    WKBundleSetAutomaticLinkDetectionEnabled(injectedBundle.bundle(), injectedBundle.pageGroup(), enabled);
     412}
     413
    408414void TestRunner::setPrivateBrowsingEnabled(bool enabled)
    409415{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

    r204853 r205094  
    110110    void setPluginsEnabled(bool);
    111111    void setJavaScriptCanAccessClipboard(bool);
     112    void setAutomaticLinkDetectionEnabled(bool);
    112113    void setPrivateBrowsingEnabled(bool);
    113114    void setPopupBlockingEnabled(bool);
Note: See TracChangeset for help on using the changeset viewer.