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

Side by Side Diff: Source/WebCore/html/HTMLSelectElement.cpp

Issue 13888009: Mouse press should focus on any types of form controls. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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/WebCore/html/HTMLSelectElement.h ('k') | Source/WebCore/html/HTMLTextAreaElement.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) 2010 Nokia Corporation and/or its subsidiary(-ies). 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 * (C) 1999 Antti Koivisto (koivisto@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * 10 *
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 HTMLFormControlElementWithState::parseAttribute(name, value); 316 HTMLFormControlElementWithState::parseAttribute(name, value);
317 } 317 }
318 318
319 bool HTMLSelectElement::isKeyboardFocusable(KeyboardEvent* event) const 319 bool HTMLSelectElement::isKeyboardFocusable(KeyboardEvent* event) const
320 { 320 {
321 if (renderer()) 321 if (renderer())
322 return isFocusable(); 322 return isFocusable();
323 return HTMLFormControlElementWithState::isKeyboardFocusable(event); 323 return HTMLFormControlElementWithState::isKeyboardFocusable(event);
324 } 324 }
325 325
326 bool HTMLSelectElement::isMouseFocusable() const
327 {
328 if (renderer())
329 return isFocusable();
330 return HTMLFormControlElementWithState::isMouseFocusable();
331 }
332
333 bool HTMLSelectElement::canSelectAll() const 326 bool HTMLSelectElement::canSelectAll() const
334 { 327 {
335 return !usesMenuList(); 328 return !usesMenuList();
336 } 329 }
337 330
338 RenderObject* HTMLSelectElement::createRenderer(RenderArena* arena, RenderStyle* ) 331 RenderObject* HTMLSelectElement::createRenderer(RenderArena* arena, RenderStyle* )
339 { 332 {
340 if (usesMenuList()) 333 if (usesMenuList())
341 return new (arena) RenderMenuList(this); 334 return new (arena) RenderMenuList(this);
342 return new (arena) RenderListBox(this); 335 return new (arena) RenderListBox(this);
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1555 const Vector<HTMLElement*>& items = listItems(); 1548 const Vector<HTMLElement*>& items = listItems();
1556 for (unsigned i = 0; i < items.size(); ++i) { 1549 for (unsigned i = 0; i < items.size(); ++i) {
1557 if (items[i]->hasTagName(optionTag)) 1550 if (items[i]->hasTagName(optionTag))
1558 ++options; 1551 ++options;
1559 } 1552 }
1560 1553
1561 return options; 1554 return options;
1562 } 1555 }
1563 1556
1564 } // namespace 1557 } // namespace
OLDNEW
« no previous file with comments | « Source/WebCore/html/HTMLSelectElement.h ('k') | Source/WebCore/html/HTMLTextAreaElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698