Changeset 90809 in webkit
- Timestamp:
- Jul 11, 2011 11:26:04 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r90807 r90809 1 2011-07-11 Zeng Huiqing <huiqing.zeng@intel.com> 2 3 Optimize HTMLInputElement::updateCheckedRadioButtons 4 https://bugs.webkit.org/show_bug.cgi?id=62840 5 6 Reviewed by Kent Tamura. 7 8 No new tests. 9 10 * dom/Document.h: 11 (WebCore::Document::getFormElements): 12 * html/HTMLInputElement.cpp: 13 (WebCore::HTMLInputElement::updateCheckedRadioButtons): 14 (WebCore::HTMLInputElement::setChecked): 15 1 16 2011-06-23 Pratik Solanki <psolanki@apple.com> 2 17 -
trunk/Source/WebCore/dom/Document.h
r90517 r90809 219 219 virtual ~Document(); 220 220 221 typedef ListHashSet<Element*, 64> FormElementListHashSet; 222 const FormElementListHashSet* getFormElements() const { return &m_formElementsWithState; } 223 221 224 MediaQueryMatcher* mediaQueryMatcher(); 222 225 … … 1227 1230 StyleSheetCandidateListHashSet m_styleSheetCandidateNodes; // All of the nodes that could potentially provide stylesheets to the document (<link>, <style>, <?xml-stylesheet>) 1228 1231 1229 typedef ListHashSet<Element*, 64> FormElementListHashSet;1230 1232 FormElementListHashSet m_formElementsWithState; 1231 1233 typedef ListHashSet<RefPtr<FormAssociatedElement>, 32> FormAssociatedElementListHashSet; -
trunk/Source/WebCore/html/HTMLInputElement.cpp
r90763 r90809 190 190 } 191 191 } else { 192 // FIXME: Traversing the document is inefficient. 193 for (Node* node = document()->body(); node; node = node->traverseNextNode()) { 194 if (!node->isElementNode()) 195 continue; 196 Element* element = static_cast<Element*>(node); 192 typedef Document::FormElementListHashSet::const_iterator Iterator; 193 Iterator end = document()->getFormElements()->end(); 194 for (Iterator it = document()->getFormElements()->begin(); it != end; ++it) { 195 Element* element = *it; 197 196 if (element->formControlName() != name()) 198 197 continue; … … 889 888 m_isChecked = nowChecked; 890 889 setNeedsStyleRecalc(); 891 892 updateCheckedRadioButtons();890 if (isRadioButton()) 891 updateCheckedRadioButtons(); 893 892 setNeedsValidityCheck(); 894 893
Note: See TracChangeset
for help on using the changeset viewer.