| Index: Source/core/dom/TreeScope.cpp
|
| diff --git a/Source/core/dom/TreeScope.cpp b/Source/core/dom/TreeScope.cpp
|
| index 4112bab5ee1987a5020da806983933e9a45dfa37..7d506d44655e391e95802bfc3d1e643add31dbf7 100644
|
| --- a/Source/core/dom/TreeScope.cpp
|
| +++ b/Source/core/dom/TreeScope.cpp
|
| @@ -267,8 +267,8 @@ HTMLLabelElement* TreeScope::labelElementForId(const AtomicString& forAttributeV
|
| // Populate the map on first access.
|
| m_labelsByForAttribute = adoptPtr(new DocumentOrderedMap);
|
| for (Element* element = ElementTraversal::firstWithin(rootNode()); element; element = ElementTraversal::next(element)) {
|
| - if (element->hasTagName(labelTag)) {
|
| - HTMLLabelElement* label = static_cast<HTMLLabelElement*>(element);
|
| + if (isHTMLLabelElement(element)) {
|
| + HTMLLabelElement* label = toHTMLLabelElement(element);
|
| const AtomicString& forValue = label->fastGetAttribute(forAttr);
|
| if (!forValue.isEmpty())
|
| addLabel(forValue, label);
|
| @@ -276,7 +276,7 @@ HTMLLabelElement* TreeScope::labelElementForId(const AtomicString& forAttributeV
|
| }
|
| }
|
|
|
| - return static_cast<HTMLLabelElement*>(m_labelsByForAttribute->getElementByLabelForAttribute(forAttributeValue.impl(), this));
|
| + return toHTMLLabelElement(m_labelsByForAttribute->getElementByLabelForAttribute(forAttributeValue.impl(), this));
|
| }
|
|
|
| DOMSelection* TreeScope::getSelection() const
|
|
|