Title: [176477] trunk/Source
- Revision
- 176477
- Author
- [email protected]
- Date
- 2014-11-21 15:38:19 -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 Anders Carlsson.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
(-[WKActionMenuController _defaultMenuItemsForMailtoLink]): Deleted.
* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _defaultMenuItemsForMailtoLink]):
(-[WebActionMenuController _defaultMenuItemsForDataDetectedText]):
Use DataDetectors SPI instead of an explicit blacklist.
* platform/spi/mac/DataDetectorsSPI.h:
Add some DataDetectors SPI.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (176476 => 176477)
--- trunk/Source/WebCore/ChangeLog 2014-11-21 23:29:08 UTC (rev 176476)
+++ trunk/Source/WebCore/ChangeLog 2014-11-21 23:38:19 UTC (rev 176477)
@@ -1,3 +1,14 @@
+2014-11-21 Tim Horton <[email protected]>
+
+ 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 Anders Carlsson.
+
+ * platform/spi/mac/DataDetectorsSPI.h:
+ Add some DataDetectors SPI.
+
2014-11-21 Jer Noble <[email protected]>
[Mac] Random crashes inside media libraries when creating then destroying media quickly.
Modified: trunk/Source/WebCore/platform/spi/mac/DataDetectorsSPI.h (176476 => 176477)
--- trunk/Source/WebCore/platform/spi/mac/DataDetectorsSPI.h 2014-11-21 23:29:08 UTC (rev 176476)
+++ trunk/Source/WebCore/platform/spi/mac/DataDetectorsSPI.h 2014-11-21 23:38:19 UTC (rev 176477)
@@ -67,7 +67,7 @@
@property NSRect highlightFrame;
@property (retain) NSArray *allResults;
@property (retain) __attribute__((NSObject)) DDResultRef mainResult;
-@property (assign) BOOL forActionMenuContent;
+@property (assign) BOOL altMode;
- (DDActionContext *)contextForView:(NSView *)view altMode:(BOOL)altMode interactionStartedHandler:(void (^)(void))interactionStartedHandler interactionChangedHandler:(void (^)(void))interactionChangedHandler interactionStoppedHandler:(void (^)(void))interactionStoppedHandler;
@@ -86,5 +86,6 @@
+ (BOOL)shouldUseActionsWithContext:(DDActionContext *)context;
+ (void)didUseActions;
+- (BOOL)hasActionsForResult:(DDResultRef)result actionContext:(DDActionContext *)actionContext;
@end
Modified: trunk/Source/WebKit/mac/ChangeLog (176476 => 176477)
--- trunk/Source/WebKit/mac/ChangeLog 2014-11-21 23:29:08 UTC (rev 176476)
+++ trunk/Source/WebKit/mac/ChangeLog 2014-11-21 23:38:19 UTC (rev 176477)
@@ -1,6 +1,19 @@
2014-11-21 Tim Horton <[email protected]>
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 Anders Carlsson.
+
+ * WebView/WebActionMenuController.mm:
+ (-[WebActionMenuController _defaultMenuItemsForMailtoLink]):
+ (-[WebActionMenuController _defaultMenuItemsForDataDetectedText]):
+ Use DataDetectors SPI instead of an explicit blacklist.
+
+2014-11-21 Tim Horton <[email protected]>
+
+ REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
https://bugs.webkit.org/show_bug.cgi?id=138960
<rdar://problem/19056715>
Modified: trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm (176476 => 176477)
--- trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm 2014-11-21 23:29:08 UTC (rev 176476)
+++ trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm 2014-11-21 23:38:19 UTC (rev 176477)
@@ -309,7 +309,7 @@
return @[ ];
RetainPtr<DDActionContext> actionContext = [[getDDActionContextClass() alloc] init];
- [actionContext setForActionMenuContent:YES];
+ [actionContext setAltMode:YES];
// FIXME: Should this show a yellow highlight?
[actionContext setHighlightFrame:elementBoundingBoxInWindowCoordinatesFromNode(node)];
@@ -572,13 +572,12 @@
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 @[ ];
+ [actionContext setAltMode:YES];
+ if ([[getDDActionsManagerClass() sharedManager] respondsToSelector:@selector(hasActionsForResult:actionContext:)]) {
+ if (![[getDDActionsManagerClass() sharedManager] hasActionsForResult:[actionContext mainResult] actionContext:actionContext.get()])
+ return @[ ];
+ }
-
// FIXME: We should hide/show the yellow highlight here.
_currentActionContext = [actionContext contextForView:_webView altMode:YES interactionStartedHandler:^() {
} interactionChangedHandler:^() {
Modified: trunk/Source/WebKit2/ChangeLog (176476 => 176477)
--- trunk/Source/WebKit2/ChangeLog 2014-11-21 23:29:08 UTC (rev 176476)
+++ trunk/Source/WebKit2/ChangeLog 2014-11-21 23:38:19 UTC (rev 176477)
@@ -1,5 +1,18 @@
2014-11-21 Tim Horton <[email protected]>
+ 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 Anders Carlsson.
+
+ * UIProcess/mac/WKActionMenuController.mm:
+ (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
+ (-[WKActionMenuController _defaultMenuItemsForMailtoLink]): Deleted.
+ Use DataDetectors SPI instead of an explicit blacklist.
+
+2014-11-21 Tim Horton <[email protected]>
+
Crashes while encoding a TextIndicator with no contentImageWithHighlight
https://bugs.webkit.org/show_bug.cgi?id=138984
<rdar://problem/19063717>
Modified: trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm (176476 => 176477)
--- trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm 2014-11-21 23:29:08 UTC (rev 176476)
+++ trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm 2014-11-21 23:38:19 UTC (rev 176477)
@@ -635,11 +635,11 @@
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 @[ ];
+ actionContext.altMode = YES;
+ if ([[getDDActionsManagerClass() sharedManager] respondsToSelector:@selector(hasActionsForResult:actionContext:)]) {
+ if (![[getDDActionsManagerClass() sharedManager] hasActionsForResult:actionContext.mainResult actionContext:actionContext])
+ return @[ ];
+ }
// Ref our WebPageProxy for use in the blocks below.
RefPtr<WebPageProxy> page = _page;
@@ -755,7 +755,7 @@
// FIXME: Should this show a yellow highlight?
RetainPtr<DDActionContext> actionContext = [[getDDActionContextClass() alloc] init];
- [actionContext setForActionMenuContent:YES];
+ [actionContext setAltMode:YES];
[actionContext setHighlightFrame:[_wkView.window convertRectToScreen:[_wkView convertRect:hitTestResult->elementBoundingBox() toView:nil]]];
return [[getDDActionsManagerClass() sharedManager] menuItemsForTargetURL:hitTestResult->absoluteLinkURL() actionContext:actionContext.get()];
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes