Changeset 117590 in webkit


Ignore:
Timestamp:
May 18, 2012 7:26:08 AM (12 years ago)
Author:
yi.4.shen@nokia.com
Message:

REGRESSION (r102553): Smart links do not work
https://bugs.webkit.org/show_bug.cgi?id=85463

Source/WebCore:

Reviewed by NOBODY Ryosuke Niwa.

To fix the regression of smart links, we need to check TextCheckingTypeLink option in
Editor::markAndReplaceFor().

Test: editing/inserting/typing-space-to-trigger-smart-link.html

  • editing/Editor.cpp:

(WebCore::Editor::markAndReplaceFor):

Tools:

Reviewed by Ryosuke Niwa.

Add LayoutTestController::setAutomaticLinkDetectionEnabled().

  • DumpRenderTree/LayoutTestController.cpp:

(setAutomaticLinkDetectionEnabledCallback):
(LayoutTestController::staticFunctions):

  • DumpRenderTree/LayoutTestController.h:

(LayoutTestController):

  • DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp:

(LayoutTestController::setAutomaticLinkDetectionEnabled): Not implemented.

  • DumpRenderTree/chromium/LayoutTestController.cpp:

(LayoutTestController::setAutomaticLinkDetectionEnabled): Not implemented.

  • DumpRenderTree/chromium/LayoutTestController.h:

(LayoutTestController):

  • DumpRenderTree/efl/LayoutTestControllerEfl.cpp:

(LayoutTestController::setAutomaticLinkDetectionEnabled): Not implemented.

  • DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:

(LayoutTestController::setAutomaticLinkDetectionEnabled): Not implemented.

  • DumpRenderTree/mac/LayoutTestControllerMac.mm:

(LayoutTestController::setAutomaticLinkDetectionEnabled): Set automatic link detection enabled.

  • DumpRenderTree/qt/LayoutTestControllerQt.cpp:

(LayoutTestController::setAutomaticLinkDetectionEnabled): Not implemented.

  • DumpRenderTree/qt/LayoutTestControllerQt.h:

(LayoutTestController):

  • DumpRenderTree/win/LayoutTestControllerWin.cpp:

(LayoutTestController::setAutomaticLinkDetectionEnabled): Not implemented.

  • DumpRenderTree/wx/LayoutTestControllerWx.cpp:

(LayoutTestController::setAutomaticLinkDetectionEnabled): Not implemented.

LayoutTests:

Reviewed by Ryosuke Niwa.

Add a new test for testing the smart link.

  • editing/inserting/typing-space-to-trigger-smart-link-expected.txt: Added.
  • editing/inserting/typing-space-to-trigger-smart-link.html: Added.
  • platform/chromium/test_expectations.txt:
  • platform/efl/test_expectations.txt:
  • platform/gtk/test_expectations.txt:
  • platform/qt/Skipped:
  • platform/qt/test_expectations.txt:
  • platform/win/Skipped:
Location:
trunk
Files:
2 added
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r117588 r117590  
     12012-05-18  Yi Shen  <yi.4.shen@nokia.com>
     2
     3        REGRESSION (r102553): Smart links do not work
     4        https://bugs.webkit.org/show_bug.cgi?id=85463
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Add a new test for testing the smart link.
     9
     10        * editing/inserting/typing-space-to-trigger-smart-link-expected.txt: Added.
     11        * editing/inserting/typing-space-to-trigger-smart-link.html: Added.
     12        * platform/chromium/test_expectations.txt:
     13        * platform/efl/test_expectations.txt:
     14        * platform/gtk/test_expectations.txt:
     15        * platform/qt/Skipped:
     16        * platform/qt/test_expectations.txt:
     17        * platform/win/Skipped:
     18
    1192012-05-18  Csaba Osztrogonác  <ossy@webkit.org>
    220
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r117583 r117590  
    17811781BUGWK SKIP : http/tests/appcache/origin-usage.html = FAIL
    17821782
     1783// LayoutTestController::setAutomaticLinkDetectionEnabled isn't implemented
     1784BUGWK85463 SKIP : editing/inserting/typing-space-to-trigger-smart-link.html = FAIL
     1785
    17831786// Failures from WebKit merge 51711:51724
    17841787BUGCR32003 : fast/js/string-property-deletion.html = TEXT
  • trunk/LayoutTests/platform/efl/test_expectations.txt

    r117583 r117590  
    463463// Requires rebaseline after https://bugs.webkit.org/show_bug.cgi?id=85405
    464464BUGWK85405 : tables/mozilla/bugs/bug10296-1.html = TEXT
     465
     466// EFL's LayoutTestController does not implement setAutomaticLinkDetectionEnabled
     467BUGWK85463 SKIP : editing/inserting/typing-space-to-trigger-smart-link.html = FAIL
  • trunk/LayoutTests/platform/gtk/test_expectations.txt

    r117583 r117590  
    170170BUGWKGTK SKIP : fast/events/drag-dataTransferItemList.html = FAIL
    171171BUGWKGTK SKIP : fast/events/drag-dataTransferItemList-file-handling.html = FAIL
     172
     173// setAutomaticLinkDetectionEnabled is not yet implemented.
     174BUGWK85463 SKIP : editing/inserting/typing-space-to-trigger-smart-link.html = FAIL
    172175
    173176// Custom MIME type support in DataTransfer is not yet implemented.
  • trunk/LayoutTests/platform/qt/Skipped

    r117588 r117590  
    24562456# https://bugs.webkit.org/show_bug.cgi?id=86445
    24572457fast/multicol/split-in-top-margin.html
     2458
     2459# LayoutTestController::setAutomaticLinkDetectionEnabled isn't implemented
     2460editing/inserting/typing-space-to-trigger-smart-link.html
  • trunk/LayoutTests/platform/qt/test_expectations.txt

    r117477 r117590  
    7676// Requires rebaseline after https://bugs.webkit.org/show_bug.cgi?id=85405
    7777BUGWK85405 : tables/mozilla/bugs/bug10296-1.html = TEXT
     78
     79// LayoutTestController::setAutomaticLinkDetectionEnabled isn't implemented
     80BUGWK85463 SKIP : editing/inserting/typing-space-to-trigger-smart-link.html = FAIL
  • trunk/LayoutTests/platform/win/Skipped

    r117477 r117590  
    653653http/tests/xmlhttprequest/upload-progress-events.html
    654654http/tests/xmlhttprequest/upload-onprogress-event.html
     655
     656// LayoutTestController::setAutomaticLinkDetectionEnabled isn't implemented
     657editing/inserting/typing-space-to-trigger-smart-link.html
    655658
    656659################################################################################
  • trunk/Source/WebCore/ChangeLog

    r117587 r117590  
     12012-05-18  Yi Shen  <yi.4.shen@nokia.com>
     2
     3        REGRESSION (r102553): Smart links do not work
     4        https://bugs.webkit.org/show_bug.cgi?id=85463
     5
     6        Reviewed by NOBODY Ryosuke Niwa.
     7
     8        To fix the regression of smart links, we need to check TextCheckingTypeLink option in
     9        Editor::markAndReplaceFor().
     10
     11        Test: editing/inserting/typing-space-to-trigger-smart-link.html
     12
     13        * editing/Editor.cpp:
     14        (WebCore::Editor::markAndReplaceFor):
     15
    1162012-05-18  Alexander Pavlov  <apavlov@chromium.org>
    217
  • trunk/Source/WebCore/editing/Editor.cpp

    r117574 r117590  
    19971997    bool shouldMarkSpelling = textCheckingOptions & TextCheckingTypeSpelling;
    19981998    bool shouldMarkGrammar = textCheckingOptions & TextCheckingTypeGrammar;
     1999    bool shouldMarkLink = textCheckingOptions & TextCheckingTypeLink;
    19992000    bool shouldPerformReplacement = textCheckingOptions & TextCheckingTypeReplacement;
    20002001    bool shouldShowCorrectionPanel = textCheckingOptions & TextCheckingTypeShowCorrectionPanel;
     
    20812082                continue;
    20822083
    2083             if (!(shouldPerformReplacement || shouldShowCorrectionPanel) || !doReplacement)
     2084            if (!(shouldPerformReplacement || shouldShowCorrectionPanel || shouldMarkLink) || !doReplacement)
    20842085                continue;
    20852086
  • trunk/Tools/ChangeLog

    r117589 r117590  
     12012-05-18  Yi Shen  <yi.4.shen@nokia.com>
     2
     3        REGRESSION (r102553): Smart links do not work
     4        https://bugs.webkit.org/show_bug.cgi?id=85463
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Add LayoutTestController::setAutomaticLinkDetectionEnabled().
     9
     10        * DumpRenderTree/LayoutTestController.cpp:
     11        (setAutomaticLinkDetectionEnabledCallback):
     12        (LayoutTestController::staticFunctions):
     13        * DumpRenderTree/LayoutTestController.h:
     14        (LayoutTestController):
     15        * DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp:
     16        (LayoutTestController::setAutomaticLinkDetectionEnabled): Not implemented.
     17        * DumpRenderTree/chromium/LayoutTestController.cpp:
     18        (LayoutTestController::setAutomaticLinkDetectionEnabled): Not implemented.
     19        * DumpRenderTree/chromium/LayoutTestController.h:
     20        (LayoutTestController):
     21        * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
     22        (LayoutTestController::setAutomaticLinkDetectionEnabled): Not implemented.
     23        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
     24        (LayoutTestController::setAutomaticLinkDetectionEnabled): Not implemented.
     25        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
     26        (LayoutTestController::setAutomaticLinkDetectionEnabled): Set automatic link detection enabled.
     27        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
     28        (LayoutTestController::setAutomaticLinkDetectionEnabled): Not implemented.
     29        * DumpRenderTree/qt/LayoutTestControllerQt.h:
     30        (LayoutTestController):
     31        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
     32        (LayoutTestController::setAutomaticLinkDetectionEnabled): Not implemented.
     33        * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
     34        (LayoutTestController::setAutomaticLinkDetectionEnabled): Not implemented.
     35
    1362012-05-18  Thiago Marcos P. Santos  <thiago.santos@intel.com>
    237
  • trunk/Tools/DumpRenderTree/LayoutTestController.cpp

    r117460 r117590  
    17301730    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
    17311731    controller->setSmartInsertDeleteEnabled(JSValueToBoolean(context, arguments[0]));
     1732    return JSValueMakeUndefined(context);
     1733}
     1734
     1735static JSValueRef setAutomaticLinkDetectionEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
     1736{
     1737    if (argumentCount < 1)
     1738        return JSValueMakeUndefined(context);
     1739
     1740    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
     1741    controller->setAutomaticLinkDetectionEnabled(JSValueToBoolean(context, arguments[0]));
    17321742    return JSValueMakeUndefined(context);
    17331743}
     
    23822392        { "setIconDatabaseEnabled", setIconDatabaseEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    23832393        { "setJavaScriptProfilingEnabled", setJavaScriptProfilingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     2394        { "setAutomaticLinkDetectionEnabled", setAutomaticLinkDetectionEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    23842395        { "setMainFrameIsFirstResponder", setMainFrameIsFirstResponderCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    23852396        { "setMinimumTimerInterval", setMinimumTimerIntervalCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
  • trunk/Tools/DumpRenderTree/LayoutTestController.h

    r117460 r117590  
    102102    void setJavaScriptProfilingEnabled(bool profilingEnabled);
    103103    void setJavaScriptCanAccessClipboard(bool flag);
     104    void setAutomaticLinkDetectionEnabled(bool flag);
    104105    void setMainFrameIsFirstResponder(bool flag);
    105106    void setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma);
  • trunk/Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp

    r117460 r117590  
    889889    notImplemented();
    890890}
     891
     892void LayoutTestController::setAutomaticLinkDetectionEnabled(bool)
     893{
     894    notImplemented();
     895}
  • trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp

    r117460 r117590  
    22172217}
    22182218
     2219void LayoutTestController::setAutomaticLinkDetectionEnabled(bool)
     2220{
     2221    // Not Implemented
     2222}
     2223
    22192224void LayoutTestController::setTextDirection(const CppArgumentList& arguments, CppVariant* result)
    22202225{
  • trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h

    r117460 r117590  
    430430
    431431    void selectionAsMarkup(const CppArgumentList&, CppVariant*);
     432
     433    // Switch the link detection.
     434    void setAutomaticLinkDetectionEnabled(bool);
    432435
    433436#if ENABLE(POINTER_LOCK)
  • trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp

    r117561 r117590  
    850850        ewk_view_visibility_state_set(browser->mainView(), EWK_PAGE_VISIBILITY_STATE_PREVIEW, false);
    851851}
     852
     853void LayoutTestController::setAutomaticLinkDetectionEnabled(bool)
     854{
     855    notImplemented();
     856}
  • trunk/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp

    r117460 r117590  
    10291029    // FIXME: Implement this.
    10301030}
     1031
     1032void LayoutTestController::setAutomaticLinkDetectionEnabled(bool)
     1033{
     1034    // FIXME: Implement this.
     1035}
  • trunk/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm

    r117460 r117590  
    621621}
    622622
     623void LayoutTestController::setAutomaticLinkDetectionEnabled(bool enabled)
     624{
     625    [[mainFrame webView] setAutomaticLinkDetectionEnabled:enabled];
     626}
     627
    623628void LayoutTestController::setTabKeyCyclesThroughElements(bool cycles)
    624629{
  • trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp

    r117460 r117590  
    975975}
    976976
     977void LayoutTestController::setAutomaticLinkDetectionEnabled(bool)
     978{
     979    // FIXME: Implement this.
     980}
     981
    977982QString LayoutTestController::layerTreeAsText()
    978983{
  • trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.h

    r117460 r117590  
    241241    void resetPageVisibility();
    242242
     243    void setAutomaticLinkDetectionEnabled(bool);
     244
    243245    // Empty stub method to keep parity with object model exposed by global LayoutTestController.
    244246    void abortModal() {}
  • trunk/Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp

    r117460 r117590  
    15291529    // FIXME: Implement this.
    15301530}
     1531
     1532void LayoutTestController::setAutomaticLinkDetectionEnabled(bool)
     1533{
     1534    // FIXME: Implement this.
     1535}
  • trunk/Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp

    r117460 r117590  
    648648    // FIXME: Implement this.
    649649}
     650
     651void LayoutTestController::setAutomaticLinkDetectionEnabled(bool)
     652{
     653    // FIXME: Implement this.
     654}
Note: See TracChangeset for help on using the changeset viewer.