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

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

Issue 16081007: Introduce toHTMLInputElement(Node*), and use it. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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/Chrome.cpp ('k') | Source/core/rendering/HitTestResult.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 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 1040
1041 Widget* widget = toRenderWidget(renderer)->widget(); 1041 Widget* widget = toRenderWidget(renderer)->widget();
1042 if (!widget || !widget->isFrameView()) 1042 if (!widget || !widget->isFrameView())
1043 return 0; 1043 return 0;
1044 1044
1045 return toFrameView(widget)->frame(); 1045 return toFrameView(widget)->frame();
1046 } 1046 }
1047 1047
1048 static bool isSubmitImage(Node* node) 1048 static bool isSubmitImage(Node* node)
1049 { 1049 {
1050 return node && node->hasTagName(inputTag) && static_cast<HTMLInputElement*>( node)->isImageButton(); 1050 return node && node->hasTagName(inputTag) && toHTMLInputElement(node)->isIma geButton();
1051 } 1051 }
1052 1052
1053 // Returns true if the node's editable block is not current focused for editing 1053 // Returns true if the node's editable block is not current focused for editing
1054 static bool nodeIsNotBeingEdited(Node* node, Frame* frame) 1054 static bool nodeIsNotBeingEdited(Node* node, Frame* frame)
1055 { 1055 {
1056 return frame->selection()->rootEditableElement() != node->rootEditableElemen t(); 1056 return frame->selection()->rootEditableElement() != node->rootEditableElemen t();
1057 } 1057 }
1058 1058
1059 bool EventHandler::useHandCursor(Node* node, bool isOverLink, bool shiftKey) 1059 bool EventHandler::useHandCursor(Node* node, bool isOverLink, bool shiftKey)
1060 { 1060 {
(...skipping 2816 matching lines...) Expand 10 before | Expand all | Expand 10 after
3877 unsigned EventHandler::accessKeyModifiers() 3877 unsigned EventHandler::accessKeyModifiers()
3878 { 3878 {
3879 #if OS(DARWIN) 3879 #if OS(DARWIN)
3880 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3880 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3881 #else 3881 #else
3882 return PlatformEvent::AltKey; 3882 return PlatformEvent::AltKey;
3883 #endif 3883 #endif
3884 } 3884 }
3885 3885
3886 } // namespace WebCore 3886 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/Chrome.cpp ('k') | Source/core/rendering/HitTestResult.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698