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

Side by Side Diff: Source/core/html/TextFieldInputType.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/html/TextFieldInputType.h ('k') | Source/core/page/EventHandler.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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 { 67 {
68 if (m_innerSpinButton) 68 if (m_innerSpinButton)
69 m_innerSpinButton->removeSpinButtonOwner(); 69 m_innerSpinButton->removeSpinButtonOwner();
70 } 70 }
71 71
72 bool TextFieldInputType::isKeyboardFocusable(KeyboardEvent*) const 72 bool TextFieldInputType::isKeyboardFocusable(KeyboardEvent*) const
73 { 73 {
74 return element()->isFocusable(); 74 return element()->isFocusable();
75 } 75 }
76 76
77 bool TextFieldInputType::isMouseFocusable() const 77 bool TextFieldInputType::shouldShowFocusRingOnMouseFocus() const
78 { 78 {
79 return element()->isFocusable(); 79 return true;
80 } 80 }
81 81
82 bool TextFieldInputType::isTextField() const 82 bool TextFieldInputType::isTextField() const
83 { 83 {
84 return true; 84 return true;
85 } 85 }
86 86
87 static inline bool shouldIgnoreRequiredAttribute(const HTMLInputElement& input) 87 static inline bool shouldIgnoreRequiredAttribute(const HTMLInputElement& input)
88 { 88 {
89 if (!input.document()->settings() || !input.document()->settings()->needsSit eSpecificQuirks()) 89 if (!input.document()->settings() || !input.document()->settings()->needsSit eSpecificQuirks())
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 { 523 {
524 return !element()->isDisabledOrReadOnly(); 524 return !element()->isDisabledOrReadOnly();
525 } 525 }
526 526
527 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents() 527 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents()
528 { 528 {
529 return shouldSpinButtonRespondToMouseEvents() && element()->focused(); 529 return shouldSpinButtonRespondToMouseEvents() && element()->focused();
530 } 530 }
531 531
532 } // namespace WebCore 532 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/TextFieldInputType.h ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698