Diff
Modified: trunk/LayoutTests/ChangeLog (117589 => 117590)
--- trunk/LayoutTests/ChangeLog 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/LayoutTests/ChangeLog 2012-05-18 14:26:08 UTC (rev 117590)
@@ -1,3 +1,21 @@
+2012-05-18 Yi Shen <[email protected]>
+
+ REGRESSION (r102553): Smart links do not work
+ https://bugs.webkit.org/show_bug.cgi?id=85463
+
+ 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:
+
2012-05-18 Csaba Osztrogonác <[email protected]>
[Qt] Unreviewed gardening, skipped list cleanup.
Added: trunk/LayoutTests/editing/inserting/typing-space-to-trigger-smart-link-expected.txt (0 => 117590)
--- trunk/LayoutTests/editing/inserting/typing-space-to-trigger-smart-link-expected.txt (rev 0)
+++ trunk/LayoutTests/editing/inserting/typing-space-to-trigger-smart-link-expected.txt 2012-05-18 14:26:08 UTC (rev 117590)
@@ -0,0 +1,2 @@
+The www.foo.com should be underlined and there is an anchor node created for it.
+PASS: the anchor for 'www.foo.com' has been created.
Added: trunk/LayoutTests/editing/inserting/typing-space-to-trigger-smart-link.html (0 => 117590)
--- trunk/LayoutTests/editing/inserting/typing-space-to-trigger-smart-link.html (rev 0)
+++ trunk/LayoutTests/editing/inserting/typing-space-to-trigger-smart-link.html 2012-05-18 14:26:08 UTC (rev 117590)
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function runTest()
+{
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.setAutomaticLinkDetectionEnabled(true);
+ }
+
+ var targetDiv = document.getElementById('test');
+ var targetText = targetDiv.firstChild;
+ window.getSelection().setPosition(targetText, 15);
+ pressKey(" ");
+ document.getElementById('log').textContent = targetDiv.innerHTML;
+ var expectedContents = "The <a href="" should be underlined and there is an anchor node created for it.";
+ if (expectedContents == targetDiv.innerHTML)
+ document.getElementById('log').textContent = "PASS: the anchor for 'www.foo.com' has been created."
+ else
+ document.getElementById('log').textContent = "Failed: the expected content was '" + expectedContents + "', but the actual result was '" + targetDiv.innerHTML + "'."
+
+ if (window.layoutTestController)
+ layoutTestController.setAutomaticLinkDetectionEnabled(false);
+}
+
+function pressKey(key)
+{
+ if (window.KeyEvent) {
+ var ev = document.createEvent("KeyboardEvent");
+ ev.initKeyEvent("keypress", true, true, window, 0,0,0,0, 0, key.charCodeAt(0));
+ document.body.dispatchEvent(ev);
+ } else {
+ var ev = document.createEvent("TextEvent");
+ ev.initTextEvent('textInput', true, true, null, key.charAt(0));
+ document.body.dispatchEvent(ev);
+ }
+}
+</script>
+</head>
+<body>
+<div id="test" contenteditable>The www.foo.comshould be underlined and there is an anchor node created for it.</div>
+<pre id="log"></pre>
+</body>
+<script>
+runTest()
+</script>
+</html>
Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (117589 => 117590)
--- trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-05-18 14:26:08 UTC (rev 117590)
@@ -1780,6 +1780,9 @@
// LayoutTestController::applicationCacheDiskUsageForOrigin isn't implemented - https://bugs.webkit.org/show_bug.cgi?id=57127
BUGWK SKIP : http/tests/appcache/origin-usage.html = FAIL
+// LayoutTestController::setAutomaticLinkDetectionEnabled isn't implemented
+BUGWK85463 SKIP : editing/inserting/typing-space-to-trigger-smart-link.html = FAIL
+
// Failures from WebKit merge 51711:51724
BUGCR32003 : fast/js/string-property-deletion.html = TEXT
Modified: trunk/LayoutTests/platform/efl/test_expectations.txt (117589 => 117590)
--- trunk/LayoutTests/platform/efl/test_expectations.txt 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/LayoutTests/platform/efl/test_expectations.txt 2012-05-18 14:26:08 UTC (rev 117590)
@@ -462,3 +462,6 @@
// Requires rebaseline after https://bugs.webkit.org/show_bug.cgi?id=85405
BUGWK85405 : tables/mozilla/bugs/bug10296-1.html = TEXT
+
+// EFL's LayoutTestController does not implement setAutomaticLinkDetectionEnabled
+BUGWK85463 SKIP : editing/inserting/typing-space-to-trigger-smart-link.html = FAIL
Modified: trunk/LayoutTests/platform/gtk/test_expectations.txt (117589 => 117590)
--- trunk/LayoutTests/platform/gtk/test_expectations.txt 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/LayoutTests/platform/gtk/test_expectations.txt 2012-05-18 14:26:08 UTC (rev 117590)
@@ -170,6 +170,9 @@
BUGWKGTK SKIP : fast/events/drag-dataTransferItemList.html = FAIL
BUGWKGTK SKIP : fast/events/drag-dataTransferItemList-file-handling.html = FAIL
+// setAutomaticLinkDetectionEnabled is not yet implemented.
+BUGWK85463 SKIP : editing/inserting/typing-space-to-trigger-smart-link.html = FAIL
+
// Custom MIME type support in DataTransfer is not yet implemented.
BUGWKGTK SKIP : editing/pasteboard/clipboard-customData.html = FAIL
BUGWKGTK SKIP : fast/events/drag-customData.html = FAIL
Modified: trunk/LayoutTests/platform/qt/Skipped (117589 => 117590)
--- trunk/LayoutTests/platform/qt/Skipped 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/LayoutTests/platform/qt/Skipped 2012-05-18 14:26:08 UTC (rev 117590)
@@ -2455,3 +2455,6 @@
# [Qt][GTK] New fast/multicol/split-in-top-margin.html fails
# https://bugs.webkit.org/show_bug.cgi?id=86445
fast/multicol/split-in-top-margin.html
+
+# LayoutTestController::setAutomaticLinkDetectionEnabled isn't implemented
+editing/inserting/typing-space-to-trigger-smart-link.html
Modified: trunk/LayoutTests/platform/qt/test_expectations.txt (117589 => 117590)
--- trunk/LayoutTests/platform/qt/test_expectations.txt 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/LayoutTests/platform/qt/test_expectations.txt 2012-05-18 14:26:08 UTC (rev 117590)
@@ -75,3 +75,6 @@
// Requires rebaseline after https://bugs.webkit.org/show_bug.cgi?id=85405
BUGWK85405 : tables/mozilla/bugs/bug10296-1.html = TEXT
+
+// LayoutTestController::setAutomaticLinkDetectionEnabled isn't implemented
+BUGWK85463 SKIP : editing/inserting/typing-space-to-trigger-smart-link.html = FAIL
Modified: trunk/LayoutTests/platform/win/Skipped (117589 => 117590)
--- trunk/LayoutTests/platform/win/Skipped 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/LayoutTests/platform/win/Skipped 2012-05-18 14:26:08 UTC (rev 117590)
@@ -653,6 +653,9 @@
http/tests/xmlhttprequest/upload-progress-events.html
http/tests/xmlhttprequest/upload-onprogress-event.html
+// LayoutTestController::setAutomaticLinkDetectionEnabled isn't implemented
+editing/inserting/typing-space-to-trigger-smart-link.html
+
################################################################################
######################### Start list of r41995 failures ########################
################################################################################
Modified: trunk/Source/WebCore/ChangeLog (117589 => 117590)
--- trunk/Source/WebCore/ChangeLog 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/Source/WebCore/ChangeLog 2012-05-18 14:26:08 UTC (rev 117590)
@@ -1,3 +1,18 @@
+2012-05-18 Yi Shen <[email protected]>
+
+ REGRESSION (r102553): Smart links do not work
+ https://bugs.webkit.org/show_bug.cgi?id=85463
+
+ 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):
+
2012-05-18 Alexander Pavlov <[email protected]>
Web Inspector: empty CSS Declaration is generated by clicking the left space of 'user agent stylesheet' on Styles sidebar of Elements panel
Modified: trunk/Source/WebCore/editing/Editor.cpp (117589 => 117590)
--- trunk/Source/WebCore/editing/Editor.cpp 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/Source/WebCore/editing/Editor.cpp 2012-05-18 14:26:08 UTC (rev 117590)
@@ -1996,6 +1996,7 @@
bool shouldMarkSpelling = textCheckingOptions & TextCheckingTypeSpelling;
bool shouldMarkGrammar = textCheckingOptions & TextCheckingTypeGrammar;
+ bool shouldMarkLink = textCheckingOptions & TextCheckingTypeLink;
bool shouldPerformReplacement = textCheckingOptions & TextCheckingTypeReplacement;
bool shouldShowCorrectionPanel = textCheckingOptions & TextCheckingTypeShowCorrectionPanel;
bool shouldCheckForCorrection = shouldShowCorrectionPanel || (textCheckingOptions & TextCheckingTypeCorrection);
@@ -2080,7 +2081,7 @@
if (result->type == TextCheckingTypeLink && selectionOffset > resultLocation + resultLength + 1)
continue;
- if (!(shouldPerformReplacement || shouldShowCorrectionPanel) || !doReplacement)
+ if (!(shouldPerformReplacement || shouldShowCorrectionPanel || shouldMarkLink) || !doReplacement)
continue;
String replacedString = plainText(rangeToReplace.get());
Modified: trunk/Tools/ChangeLog (117589 => 117590)
--- trunk/Tools/ChangeLog 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/Tools/ChangeLog 2012-05-18 14:26:08 UTC (rev 117590)
@@ -1,3 +1,38 @@
+2012-05-18 Yi Shen <[email protected]>
+
+ REGRESSION (r102553): Smart links do not work
+ https://bugs.webkit.org/show_bug.cgi?id=85463
+
+ 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.
+
2012-05-18 Thiago Marcos P. Santos <[email protected]>
[EFL] Add shortcut to dump Security Origin and Web Database information
Modified: trunk/Tools/DumpRenderTree/LayoutTestController.cpp (117589 => 117590)
--- trunk/Tools/DumpRenderTree/LayoutTestController.cpp 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/Tools/DumpRenderTree/LayoutTestController.cpp 2012-05-18 14:26:08 UTC (rev 117590)
@@ -1732,6 +1732,16 @@
return JSValueMakeUndefined(context);
}
+static JSValueRef setAutomaticLinkDetectionEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setAutomaticLinkDetectionEnabled(JSValueToBoolean(context, arguments[0]));
+ return JSValueMakeUndefined(context);
+}
+
static JSValueRef setSelectTrailingWhitespaceEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
if (argumentCount < 1)
@@ -2381,6 +2391,7 @@
{ "setHandlesAuthenticationChallenges", setHandlesAuthenticationChallengesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setIconDatabaseEnabled", setIconDatabaseEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setJavaScriptProfilingEnabled", setJavaScriptProfilingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setAutomaticLinkDetectionEnabled", setAutomaticLinkDetectionEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setMainFrameIsFirstResponder", setMainFrameIsFirstResponderCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setMinimumTimerInterval", setMinimumTimerIntervalCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setMockDeviceOrientation", setMockDeviceOrientationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
Modified: trunk/Tools/DumpRenderTree/LayoutTestController.h (117589 => 117590)
--- trunk/Tools/DumpRenderTree/LayoutTestController.h 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/Tools/DumpRenderTree/LayoutTestController.h 2012-05-18 14:26:08 UTC (rev 117590)
@@ -101,6 +101,7 @@
void setIconDatabaseEnabled(bool iconDatabaseEnabled);
void setJavaScriptProfilingEnabled(bool profilingEnabled);
void setJavaScriptCanAccessClipboard(bool flag);
+ void setAutomaticLinkDetectionEnabled(bool flag);
void setMainFrameIsFirstResponder(bool flag);
void setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma);
void setMockGeolocationError(int code, JSStringRef message);
Modified: trunk/Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp (117589 => 117590)
--- trunk/Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp 2012-05-18 14:26:08 UTC (rev 117590)
@@ -888,3 +888,8 @@
{
notImplemented();
}
+
+void LayoutTestController::setAutomaticLinkDetectionEnabled(bool)
+{
+ notImplemented();
+}
Modified: trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp (117589 => 117590)
--- trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp 2012-05-18 14:26:08 UTC (rev 117590)
@@ -2216,6 +2216,11 @@
}
}
+void LayoutTestController::setAutomaticLinkDetectionEnabled(bool)
+{
+ // Not Implemented
+}
+
void LayoutTestController::setTextDirection(const CppArgumentList& arguments, CppVariant* result)
{
result->setNull();
Modified: trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h (117589 => 117590)
--- trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h 2012-05-18 14:26:08 UTC (rev 117590)
@@ -430,6 +430,9 @@
void selectionAsMarkup(const CppArgumentList&, CppVariant*);
+ // Switch the link detection.
+ void setAutomaticLinkDetectionEnabled(bool);
+
#if ENABLE(POINTER_LOCK)
void didLosePointerLock(const CppArgumentList&, CppVariant*);
void setPointerLockWillFailSynchronously(const CppArgumentList&, CppVariant*);
Modified: trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp (117589 => 117590)
--- trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp 2012-05-18 14:26:08 UTC (rev 117590)
@@ -849,3 +849,8 @@
else if (newVisibility == "preview")
ewk_view_visibility_state_set(browser->mainView(), EWK_PAGE_VISIBILITY_STATE_PREVIEW, false);
}
+
+void LayoutTestController::setAutomaticLinkDetectionEnabled(bool)
+{
+ notImplemented();
+}
Modified: trunk/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp (117589 => 117590)
--- trunk/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp 2012-05-18 14:26:08 UTC (rev 117590)
@@ -1028,3 +1028,8 @@
{
// FIXME: Implement this.
}
+
+void LayoutTestController::setAutomaticLinkDetectionEnabled(bool)
+{
+ // FIXME: Implement this.
+}
Modified: trunk/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm (117589 => 117590)
--- trunk/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm 2012-05-18 14:26:08 UTC (rev 117590)
@@ -620,6 +620,11 @@
[[[mainFrame webView] preferences] setJavaScriptCanAccessClipboard:enabled];
}
+void LayoutTestController::setAutomaticLinkDetectionEnabled(bool enabled)
+{
+ [[mainFrame webView] setAutomaticLinkDetectionEnabled:enabled];
+}
+
void LayoutTestController::setTabKeyCyclesThroughElements(bool cycles)
{
[[mainFrame webView] setTabKeyCyclesThroughElements:cycles];
Modified: trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp (117589 => 117590)
--- trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp 2012-05-18 14:26:08 UTC (rev 117590)
@@ -974,6 +974,11 @@
// FIXME: Implement this.
}
+void LayoutTestController::setAutomaticLinkDetectionEnabled(bool)
+{
+ // FIXME: Implement this.
+}
+
QString LayoutTestController::layerTreeAsText()
{
return DumpRenderTreeSupportQt::layerTreeAsText(m_drt->webPage()->mainFrame());
Modified: trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.h (117589 => 117590)
--- trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.h 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.h 2012-05-18 14:26:08 UTC (rev 117590)
@@ -240,6 +240,8 @@
void setPageVisibility(const char*);
void resetPageVisibility();
+ void setAutomaticLinkDetectionEnabled(bool);
+
// Empty stub method to keep parity with object model exposed by global LayoutTestController.
void abortModal() {}
Modified: trunk/Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp (117589 => 117590)
--- trunk/Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp 2012-05-18 14:26:08 UTC (rev 117590)
@@ -1528,3 +1528,8 @@
{
// FIXME: Implement this.
}
+
+void LayoutTestController::setAutomaticLinkDetectionEnabled(bool)
+{
+ // FIXME: Implement this.
+}
Modified: trunk/Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp (117589 => 117590)
--- trunk/Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp 2012-05-18 14:16:29 UTC (rev 117589)
+++ trunk/Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp 2012-05-18 14:26:08 UTC (rev 117590)
@@ -647,3 +647,8 @@
{
// FIXME: Implement this.
}
+
+void LayoutTestController::setAutomaticLinkDetectionEnabled(bool)
+{
+ // FIXME: Implement this.
+}