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

Side by Side Diff: Source/core/page/EventHandler.cpp

Issue 557613002: Remove a part of type checking predicates of HTMLInputElement. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/DragController.cpp ('k') | Source/core/page/PageSerializer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 12 matching lines...) Expand all
23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28 #include "config.h" 28 #include "config.h"
29 #include "core/page/EventHandler.h" 29 #include "core/page/EventHandler.h"
30 30
31 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 31 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
32 #include "core/HTMLNames.h" 32 #include "core/HTMLNames.h"
33 #include "core/InputTypeNames.h"
33 #include "core/SVGNames.h" 34 #include "core/SVGNames.h"
34 #include "core/clipboard/DataObject.h" 35 #include "core/clipboard/DataObject.h"
35 #include "core/clipboard/DataTransfer.h" 36 #include "core/clipboard/DataTransfer.h"
36 #include "core/dom/Document.h" 37 #include "core/dom/Document.h"
37 #include "core/dom/DocumentMarkerController.h" 38 #include "core/dom/DocumentMarkerController.h"
38 #include "core/dom/Fullscreen.h" 39 #include "core/dom/Fullscreen.h"
39 #include "core/dom/NodeRenderingTraversal.h" 40 #include "core/dom/NodeRenderingTraversal.h"
40 #include "core/dom/TouchList.h" 41 #include "core/dom/TouchList.h"
41 #include "core/dom/shadow/ShadowRoot.h" 42 #include "core/dom/shadow/ShadowRoot.h"
42 #include "core/editing/Editor.h" 43 #include "core/editing/Editor.h"
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 969
969 static LocalFrame* subframeForHitTestResult(const MouseEventWithHitTestResults& hitTestResult) 970 static LocalFrame* subframeForHitTestResult(const MouseEventWithHitTestResults& hitTestResult)
970 { 971 {
971 if (!hitTestResult.isOverWidget()) 972 if (!hitTestResult.isOverWidget())
972 return 0; 973 return 0;
973 return subframeForTargetNode(hitTestResult.targetNode()); 974 return subframeForTargetNode(hitTestResult.targetNode());
974 } 975 }
975 976
976 static bool isSubmitImage(Node* node) 977 static bool isSubmitImage(Node* node)
977 { 978 {
978 return isHTMLInputElement(node) && toHTMLInputElement(node)->isImageButton() ; 979 return isHTMLInputElement(node) && toHTMLInputElement(node)->type() == Input TypeNames::image;
979 } 980 }
980 981
981 bool EventHandler::useHandCursor(Node* node, bool isOverLink) 982 bool EventHandler::useHandCursor(Node* node, bool isOverLink)
982 { 983 {
983 if (!node) 984 if (!node)
984 return false; 985 return false;
985 986
986 return ((isOverLink || isSubmitImage(node)) && !node->hasEditableStyle()); 987 return ((isOverLink || isSubmitImage(node)) && !node->hasEditableStyle());
987 } 988 }
988 989
(...skipping 2892 matching lines...) Expand 10 before | Expand all | Expand 10 after
3881 unsigned EventHandler::accessKeyModifiers() 3882 unsigned EventHandler::accessKeyModifiers()
3882 { 3883 {
3883 #if OS(MACOSX) 3884 #if OS(MACOSX)
3884 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3885 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3885 #else 3886 #else
3886 return PlatformEvent::AltKey; 3887 return PlatformEvent::AltKey;
3887 #endif 3888 #endif
3888 } 3889 }
3889 3890
3890 } // namespace blink 3891 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/DragController.cpp ('k') | Source/core/page/PageSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698