Title: [198311] trunk/Source/WebCore
- Revision
- 198311
- Author
- [email protected]
- Date
- 2016-03-16 17:56:33 -0700 (Wed, 16 Mar 2016)
Log Message
Recognize mailto and tel url as data detector links.
https://bugs.webkit.org/show_bug.cgi?id=155569
rdar://problem/24836185
Reviewed by Sam Weinig.
When we check if the element is a data detector link,
we should return true also for URLs with mailto: and tel: scheme.
* editing/cocoa/DataDetection.mm:
(WebCore::DataDetection::isDataDetectorLink):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (198310 => 198311)
--- trunk/Source/WebCore/ChangeLog 2016-03-17 00:13:30 UTC (rev 198310)
+++ trunk/Source/WebCore/ChangeLog 2016-03-17 00:56:33 UTC (rev 198311)
@@ -1,3 +1,17 @@
+2016-03-16 Enrica Casucci <[email protected]>
+
+ Recognize mailto and tel url as data detector links.
+ https://bugs.webkit.org/show_bug.cgi?id=155569
+ rdar://problem/24836185
+
+ Reviewed by Sam Weinig.
+
+ When we check if the element is a data detector link,
+ we should return true also for URLs with mailto: and tel: scheme.
+
+ * editing/cocoa/DataDetection.mm:
+ (WebCore::DataDetection::isDataDetectorLink):
+
2016-03-16 Zalan Bujtas <[email protected]>
Subpixel rendering: Directly composited image layers need pixelsnapping.
Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (198310 => 198311)
--- trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-03-17 00:13:30 UTC (rev 198310)
+++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-03-17 00:56:33 UTC (rev 198311)
@@ -57,7 +57,14 @@
bool DataDetection::isDataDetectorLink(Element* element)
{
- return element->getAttribute(dataDetectorsURLScheme) == "true";
+ // FIXME: We should be able to ask this from DataDetectorsCore when rdar://problem/25206062 is fixed.
+ if (!is<HTMLAnchorElement>(*element))
+ return false;
+
+ if (element->getAttribute(dataDetectorsURLScheme) == "true")
+ return true;
+ URL url = ""
+ return url.protocolIs("mailto") || url.protocolIs("tel");
}
bool DataDetection::requiresExtendedContext(Element* element)
@@ -76,7 +83,7 @@
UNUSED_PARAM(element);
return false;
#else
- // FIXME: We should also compute the DDResultRef and check the result category.
+ // FIXME: We should be able to retrieve this information from DataDetectorsCore when rdar://problem/25169133 is fixed.
if (!is<HTMLAnchorElement>(*element))
return false;
if (element->getAttribute(dataDetectorsURLScheme) != "true")
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes