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

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

Issue 11363189: Merge 133860 - User can change a disabled select (drop down box) (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « LayoutTests/fast/forms/select/select-disabled-expected.txt ('k') | no next file » | 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 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 event->setDefaultHandled(); 1433 event->setDefaultHandled();
1434 } 1434 }
1435 } 1435 }
1436 } 1436 }
1437 1437
1438 void HTMLSelectElement::defaultEventHandler(Event* event) 1438 void HTMLSelectElement::defaultEventHandler(Event* event)
1439 { 1439 {
1440 if (!renderer()) 1440 if (!renderer())
1441 return; 1441 return;
1442 1442
1443 if (disabled()) {
1444 HTMLFormControlElementWithState::defaultEventHandler(event);
1445 return;
1446 }
1447
1443 if (usesMenuList()) 1448 if (usesMenuList())
1444 menuListDefaultEventHandler(event); 1449 menuListDefaultEventHandler(event);
1445 else 1450 else
1446 listBoxDefaultEventHandler(event); 1451 listBoxDefaultEventHandler(event);
1447 if (event->defaultHandled()) 1452 if (event->defaultHandled())
1448 return; 1453 return;
1449 1454
1450 if (event->type() == eventNames().keypressEvent && event->isKeyboardEvent()) { 1455 if (event->type() == eventNames().keypressEvent && event->isKeyboardEvent()) {
1451 KeyboardEvent* keyboardEvent = static_cast<KeyboardEvent*>(event); 1456 KeyboardEvent* keyboardEvent = static_cast<KeyboardEvent*>(event);
1452 if (!keyboardEvent->ctrlKey() && !keyboardEvent->altKey() && !keyboardEv ent->metaKey() && isPrintableChar(keyboardEvent->charCode())) { 1457 if (!keyboardEvent->ctrlKey() && !keyboardEvent->altKey() && !keyboardEv ent->metaKey() && isPrintableChar(keyboardEvent->charCode())) {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 const Vector<HTMLElement*>& items = listItems(); 1596 const Vector<HTMLElement*>& items = listItems();
1592 for (unsigned i = 0; i < items.size(); ++i) { 1597 for (unsigned i = 0; i < items.size(); ++i) {
1593 if (items[i]->hasTagName(optionTag)) 1598 if (items[i]->hasTagName(optionTag))
1594 ++options; 1599 ++options;
1595 } 1600 }
1596 1601
1597 return options; 1602 return options;
1598 } 1603 }
1599 1604
1600 } // namespace 1605 } // namespace
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/select/select-disabled-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698