Title: [176414] trunk/Source/WebKit2
- Revision
- 176414
- Author
- [email protected]
- Date
- 2014-11-20 14:10:58 -0800 (Thu, 20 Nov 2014)
Log Message
Don't use a TextIndicator BounceAndCrossfade transition if the selection highlight is never shown
https://bugs.webkit.org/show_bug.cgi?id=138919
<rdar://problem/19042207>
Reviewed by Beth Dakin.
* Shared/TextIndicator.h:
(WebKit::TextIndicator::presentationTransition):
(WebKit::TextIndicator::setPresentationTransition):
Add getter and setter pair.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
If the selection highlight will never be shown because there's only a single menu item,
use a normal bounce animation instead of bounce + crossfade.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (176413 => 176414)
--- trunk/Source/WebKit2/ChangeLog 2014-11-20 22:10:37 UTC (rev 176413)
+++ trunk/Source/WebKit2/ChangeLog 2014-11-20 22:10:58 UTC (rev 176414)
@@ -1,3 +1,21 @@
+2014-11-20 Tim Horton <[email protected]>
+
+ Don't use a TextIndicator BounceAndCrossfade transition if the selection highlight is never shown
+ https://bugs.webkit.org/show_bug.cgi?id=138919
+ <rdar://problem/19042207>
+
+ Reviewed by Beth Dakin.
+
+ * Shared/TextIndicator.h:
+ (WebKit::TextIndicator::presentationTransition):
+ (WebKit::TextIndicator::setPresentationTransition):
+ Add getter and setter pair.
+
+ * UIProcess/mac/WKActionMenuController.mm:
+ (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
+ If the selection highlight will never be shown because there's only a single menu item,
+ use a normal bounce animation instead of bounce + crossfade.
+
2014-11-20 Beth Dakin <[email protected]>
Invalid message WebPageProxy.DidPerformDictionaryLookup on Google stocks result
Modified: trunk/Source/WebKit2/Shared/TextIndicator.h (176413 => 176414)
--- trunk/Source/WebKit2/Shared/TextIndicator.h 2014-11-20 22:10:37 UTC (rev 176413)
+++ trunk/Source/WebKit2/Shared/TextIndicator.h 2014-11-20 22:10:58 UTC (rev 176414)
@@ -81,6 +81,10 @@
~TextIndicator();
WebCore::FloatRect selectionRectInWindowCoordinates() const { return m_data.selectionRectInWindowCoordinates; }
+
+ PresentationTransition presentationTransition() const { return m_data.presentationTransition; }
+ void setPresentationTransition(PresentationTransition transition) { m_data.presentationTransition = transition; }
+
WebCore::FloatRect frameRect() const;
Data data() const { return m_data; }
Modified: trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm (176413 => 176414)
--- trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm 2014-11-20 22:10:37 UTC (rev 176413)
+++ trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm 2014-11-20 22:10:58 UTC (rev 176414)
@@ -604,7 +604,10 @@
[_currentActionContext setHighlightFrame:[_wkView.window convertRectToScreen:[_wkView convertRect:_hitTestResult.detectedDataBoundingBox toView:nil]]];
- return [[getDDActionsManagerClass() sharedManager] menuItemsForResult:[_currentActionContext mainResult] actionContext:_currentActionContext.get()];
+ NSArray *menuItems = [[getDDActionsManagerClass() sharedManager] menuItemsForResult:[_currentActionContext mainResult] actionContext:_currentActionContext.get()];
+ if (menuItems.count == 1 && _hitTestResult.detectedDataTextIndicator)
+ _hitTestResult.detectedDataTextIndicator->setPresentationTransition(TextIndicator::PresentationTransition::Bounce);
+ return menuItems;
}
- (NSArray *)_defaultMenuItemsForText
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes