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

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

Issue 1292653003: [bindings] Avoid using custom binding for HTMLOptionsCollection.length attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added new test Created 5 years, 4 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
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include "platform/PlatformMouseEvent.h" 62 #include "platform/PlatformMouseEvent.h"
63 #include "platform/text/PlatformLocale.h" 63 #include "platform/text/PlatformLocale.h"
64 64
65 using namespace WTF::Unicode; 65 using namespace WTF::Unicode;
66 66
67 namespace blink { 67 namespace blink {
68 68
69 using namespace HTMLNames; 69 using namespace HTMLNames;
70 70
71 // Upper limit agreed upon with representatives of Opera and Mozilla. 71 // Upper limit agreed upon with representatives of Opera and Mozilla.
72 static const unsigned maxSelectItems = 10000; 72 const unsigned HTMLSelectElement::maxSelectItems = 10000;
73 73
74 HTMLSelectElement::HTMLSelectElement(Document& document, HTMLFormElement* form) 74 HTMLSelectElement::HTMLSelectElement(Document& document, HTMLFormElement* form)
75 : HTMLFormControlElementWithState(selectTag, document, form) 75 : HTMLFormControlElementWithState(selectTag, document, form)
76 , m_typeAhead(this) 76 , m_typeAhead(this)
77 , m_size(0) 77 , m_size(0)
78 , m_lastOnChangeIndex(-1) 78 , m_lastOnChangeIndex(-1)
79 , m_activeSelectionAnchorIndex(-1) 79 , m_activeSelectionAnchorIndex(-1)
80 , m_activeSelectionEndIndex(-1) 80 , m_activeSelectionEndIndex(-1)
81 , m_isProcessingUserDrivenChange(false) 81 , m_isProcessingUserDrivenChange(false)
82 , m_multiple(false) 82 , m_multiple(false)
(...skipping 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after
1780 int focusedIndex = activeSelectionEndListIndex(); 1780 int focusedIndex = activeSelectionEndListIndex();
1781 if (focusedIndex < 0) 1781 if (focusedIndex < 0)
1782 focusedIndex = firstSelectableListIndex(); 1782 focusedIndex = firstSelectableListIndex();
1783 if (focusedIndex < 0) 1783 if (focusedIndex < 0)
1784 return nullptr; 1784 return nullptr;
1785 HTMLElement* focused = listItems()[focusedIndex]; 1785 HTMLElement* focused = listItems()[focusedIndex];
1786 return isHTMLOptionElement(focused) ? toHTMLOptionElement(focused) : nullptr ; 1786 return isHTMLOptionElement(focused) ? toHTMLOptionElement(focused) : nullptr ;
1787 } 1787 }
1788 1788
1789 } // namespace 1789 } // namespace
OLDNEW
« Source/core/html/HTMLOptionsCollection.cpp ('K') | « Source/core/html/HTMLSelectElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698