- Revision
- 176463
- Author
- timothy_hor...@apple.com
- Date
- 2014-11-21 12:28:15 -0800 (Fri, 21 Nov 2014)
Log Message
REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
https://bugs.webkit.org/show_bug.cgi?id=138960
<rdar://problem/19056715>
Reviewed by Beth Dakin.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _defaultMenuItemsForDataDetectedText]):
Blacklist contact results, because they don't have useful menus. If we
bail before setting up _currentActionContext, we'll still allow fallthrough
to ordinary text actions, avoiding mysterious failure when a contact is detected.
This doesn't break the case that r176351 was intended to fix,
because in that case we were detecting e.g. addresses.
* platform/spi/mac/DataDetectorsSPI.h:
Softlink some SPI.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (176462 => 176463)
--- trunk/Source/WebCore/ChangeLog 2014-11-21 20:18:29 UTC (rev 176462)
+++ trunk/Source/WebCore/ChangeLog 2014-11-21 20:28:15 UTC (rev 176463)
@@ -1,5 +1,16 @@
2014-11-21 Tim Horton <timothy_hor...@apple.com>
+ REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
+ https://bugs.webkit.org/show_bug.cgi?id=138960
+ <rdar://problem/19056715>
+
+ Reviewed by Beth Dakin.
+
+ * platform/spi/mac/DataDetectorsSPI.h:
+ Softlink some SPI.
+
+2014-11-21 Tim Horton <timothy_hor...@apple.com>
+
Move TextIndicator{Window} to WebCore
https://bugs.webkit.org/show_bug.cgi?id=138954
<rdar://problem/18992185>
Modified: trunk/Source/WebCore/platform/spi/mac/DataDetectorsSPI.h (176462 => 176463)
--- trunk/Source/WebCore/platform/spi/mac/DataDetectorsSPI.h 2014-11-21 20:18:29 UTC (rev 176462)
+++ trunk/Source/WebCore/platform/spi/mac/DataDetectorsSPI.h 2014-11-21 20:28:15 UTC (rev 176463)
@@ -55,6 +55,7 @@
SOFT_LINK(DataDetectorsCore, DDScannerScanQuery, DDScanQueryRef, (DDScannerRef scanner, DDScanQueryRef query), (scanner, query))
SOFT_LINK(DataDetectorsCore, DDScannerCopyResultsWithOptions, CFArrayRef, (DDScannerRef scanner, DDScannerCopyResultsOptions options), (scanner, options))
SOFT_LINK(DataDetectorsCore, DDResultGetRange, CFRange, (DDResultRef result), (result))
+SOFT_LINK(DataDetectorsCore, DDResultGetType, CFStringRef, (DDResultRef result), (result))
}
Modified: trunk/Source/WebKit/mac/ChangeLog (176462 => 176463)
--- trunk/Source/WebKit/mac/ChangeLog 2014-11-21 20:18:29 UTC (rev 176462)
+++ trunk/Source/WebKit/mac/ChangeLog 2014-11-21 20:28:15 UTC (rev 176463)
@@ -1,3 +1,20 @@
+2014-11-21 Tim Horton <timothy_hor...@apple.com>
+
+ REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
+ https://bugs.webkit.org/show_bug.cgi?id=138960
+ <rdar://problem/19056715>
+
+ Reviewed by Beth Dakin.
+
+ * WebView/WebActionMenuController.mm:
+ (-[WebActionMenuController _defaultMenuItemsForDataDetectedText]):
+ Blacklist contact results, because they don't have useful menus. If we
+ bail before setting up _currentActionContext, we'll still allow fallthrough
+ to ordinary text actions, avoiding mysterious failure when a contact is detected.
+
+ This doesn't break the case that r176351 was intended to fix,
+ because in that case we were detecting e.g. addresses.
+
2014-11-21 Anders Carlsson <ander...@apple.com>
Remove the Timer parameters from timer callbacks
Modified: trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm (176462 => 176463)
--- trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm 2014-11-21 20:18:29 UTC (rev 176462)
+++ trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm 2014-11-21 20:28:15 UTC (rev 176463)
@@ -572,6 +572,13 @@
if (!actionContext || !detectedDataRange)
return @[ ];
+ // Blacklist contact results, because they don't have useful menus. If we
+ // bail here, before setting up _currentActionContext, we'll still allow fallthrough
+ // to ordinary text actions, avoiding mysterious failure when a contact is detected.
+ if (CFEqual(DDResultGetType([actionContext mainResult]), CFSTR("Contact")))
+ return @[ ];
+
+
// FIXME: We should hide/show the yellow highlight here.
_currentActionContext = [actionContext contextForView:_webView altMode:YES interactionStartedHandler:^() {
} interactionChangedHandler:^() {
Modified: trunk/Source/WebKit2/ChangeLog (176462 => 176463)
--- trunk/Source/WebKit2/ChangeLog 2014-11-21 20:18:29 UTC (rev 176462)
+++ trunk/Source/WebKit2/ChangeLog 2014-11-21 20:28:15 UTC (rev 176463)
@@ -1,5 +1,22 @@
2014-11-21 Tim Horton <timothy_hor...@apple.com>
+ REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
+ https://bugs.webkit.org/show_bug.cgi?id=138960
+ <rdar://problem/19056715>
+
+ Reviewed by Beth Dakin.
+
+ * UIProcess/mac/WKActionMenuController.mm:
+ (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
+ Blacklist contact results, because they don't have useful menus. If we
+ bail before setting up _currentActionContext, we'll still allow fallthrough
+ to ordinary text actions, avoiding mysterious failure when a contact is detected.
+
+ This doesn't break the case that r176351 was intended to fix,
+ because in that case we were detecting e.g. addresses.
+
+2014-11-21 Tim Horton <timothy_hor...@apple.com>
+
Move TextIndicator{Window} to WebCore
https://bugs.webkit.org/show_bug.cgi?id=138954
<rdar://problem/18992185>
Modified: trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm (176462 => 176463)
--- trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm 2014-11-21 20:18:29 UTC (rev 176462)
+++ trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm 2014-11-21 20:28:15 UTC (rev 176463)
@@ -635,6 +635,12 @@
if (!actionContext)
return @[ ];
+ // Blacklist contact results, because they don't have useful menus. If we
+ // bail here, before setting up _currentActionContext, we'll still allow fallthrough
+ // to ordinary text actions, avoiding mysterious failure when a contact is detected.
+ if (CFEqual(DDResultGetType(actionContext.mainResult), CFSTR("Contact")))
+ return @[ ];
+
// Ref our WebPageProxy for use in the blocks below.
RefPtr<WebPageProxy> page = _page;
PageOverlay::PageOverlayID overlayID = _hitTestResult.detectedDataOriginatingPageOverlay;