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

Side by Side Diff: Source/core/dom/Node.cpp

Issue 16194013: Mouse press should focus on any types of form controls. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase 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/dom/Node.h ('k') | Source/core/html/BaseChooserOnlyDateAndTimeInputType.h » ('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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 bool Node::isMouseFocusable() const 892 bool Node::isMouseFocusable() const
893 { 893 {
894 return isFocusable(); 894 return isFocusable();
895 } 895 }
896 896
897 Node* Node::focusDelegate() 897 Node* Node::focusDelegate()
898 { 898 {
899 return this; 899 return this;
900 } 900 }
901 901
902 bool Node::shouldHaveFocusAppearance() const
903 {
904 ASSERT(focused());
905 return true;
906 }
907
902 unsigned Node::nodeIndex() const 908 unsigned Node::nodeIndex() const
903 { 909 {
904 Node *_tempNode = previousSibling(); 910 Node *_tempNode = previousSibling();
905 unsigned count=0; 911 unsigned count=0;
906 for ( count=0; _tempNode; count++ ) 912 for ( count=0; _tempNode; count++ )
907 _tempNode = _tempNode->previousSibling(); 913 _tempNode = _tempNode->previousSibling();
908 return count; 914 return count;
909 } 915 }
910 916
911 template<unsigned type> 917 template<unsigned type>
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
2522 startNode = startNode->parentOrShadowHostNode(); 2528 startNode = startNode->parentOrShadowHostNode();
2523 2529
2524 if (startNode && startNode->renderer()) 2530 if (startNode && startNode->renderer())
2525 if (Frame* frame = document()->frame()) 2531 if (Frame* frame = document()->frame())
2526 frame->eventHandler()->defaultWheelEventHandler(startNode, wheel Event); 2532 frame->eventHandler()->defaultWheelEventHandler(startNode, wheel Event);
2527 } else if (event->type() == eventNames().webkitEditableContentChangedEvent) { 2533 } else if (event->type() == eventNames().webkitEditableContentChangedEvent) {
2528 dispatchInputEvent(); 2534 dispatchInputEvent();
2529 } 2535 }
2530 } 2536 }
2531 2537
2538 void Node::willCallDefaultEventHandler(const Event&)
2539 {
2540 }
2541
2532 bool Node::willRespondToMouseMoveEvents() 2542 bool Node::willRespondToMouseMoveEvents()
2533 { 2543 {
2534 if (isDisabledFormControl(this)) 2544 if (isDisabledFormControl(this))
2535 return false; 2545 return false;
2536 return hasEventListeners(eventNames().mousemoveEvent) || hasEventListeners(e ventNames().mouseoverEvent) || hasEventListeners(eventNames().mouseoutEvent); 2546 return hasEventListeners(eventNames().mousemoveEvent) || hasEventListeners(e ventNames().mouseoverEvent) || hasEventListeners(eventNames().mouseoutEvent);
2537 } 2547 }
2538 2548
2539 bool Node::willRespondToMouseClickEvents() 2549 bool Node::willRespondToMouseClickEvents()
2540 { 2550 {
2541 if (isDisabledFormControl(this)) 2551 if (isDisabledFormControl(this))
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
2735 node->showTreeForThis(); 2745 node->showTreeForThis();
2736 } 2746 }
2737 2747
2738 void showNodePath(const WebCore::Node* node) 2748 void showNodePath(const WebCore::Node* node)
2739 { 2749 {
2740 if (node) 2750 if (node)
2741 node->showNodePathForThis(); 2751 node->showNodePathForThis();
2742 } 2752 }
2743 2753
2744 #endif 2754 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/html/BaseChooserOnlyDateAndTimeInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698