Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: third_party/WebKit/Source/core/editing/SelectionController.cpp

Issue 2539283002: Remove PlatformGestureEvent in favour of using WebGestureEvent (Closed)
Patch Set: Add missing copyright on new file Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
6 * Copyright (C) 2015 Google Inc. All rights reserved. 6 * Copyright (C) 2015 Google Inc. All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 Frame* focusFrame = m_frame->page()->focusController().focusedOrMainFrame(); 877 Frame* focusFrame = m_frame->page()->focusController().focusedOrMainFrame();
878 // Do not paste here if the focus was moved somewhere else. 878 // Do not paste here if the focus was moved somewhere else.
879 if (m_frame == focusFrame && 879 if (m_frame == focusFrame &&
880 m_frame->editor().behavior().supportsGlobalSelection()) 880 m_frame->editor().behavior().supportsGlobalSelection())
881 return m_frame->editor().createCommand("PasteGlobalSelection").execute(); 881 return m_frame->editor().createCommand("PasteGlobalSelection").execute();
882 882
883 return false; 883 return false;
884 } 884 }
885 885
886 bool SelectionController::handleGestureLongPress( 886 bool SelectionController::handleGestureLongPress(
887 const PlatformGestureEvent& gestureEvent, 887 const WebGestureEvent& gestureEvent,
888 const HitTestResult& hitTestResult) { 888 const HitTestResult& hitTestResult) {
889 if (!selection().isAvailable()) 889 if (!selection().isAvailable())
890 return false; 890 return false;
891 if (hitTestResult.isLiveLink()) 891 if (hitTestResult.isLiveLink())
892 return false; 892 return false;
893 893
894 Node* innerNode = hitTestResult.innerNode(); 894 Node* innerNode = hitTestResult.innerNode();
895 if (!innerNode) 895 if (!innerNode)
896 return false; 896 return false;
897 innerNode->document().updateStyleAndLayoutTree(); 897 innerNode->document().updateStyleAndLayoutTree();
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 return event.event().altKey() && event.isOverLink(); 1023 return event.event().altKey() && event.isOverLink();
1024 } 1024 }
1025 1025
1026 bool isExtendingSelection(const MouseEventWithHitTestResults& event) { 1026 bool isExtendingSelection(const MouseEventWithHitTestResults& event) {
1027 bool isMouseDownOnLinkOrImage = 1027 bool isMouseDownOnLinkOrImage =
1028 event.isOverLink() || event.hitTestResult().image(); 1028 event.isOverLink() || event.hitTestResult().image();
1029 return event.event().shiftKey() && !isMouseDownOnLinkOrImage; 1029 return event.event().shiftKey() && !isMouseDownOnLinkOrImage;
1030 } 1030 }
1031 1031
1032 } // namespace blink 1032 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/SelectionController.h ('k') | third_party/WebKit/Source/core/events/GestureEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698