| Index: third_party/WebKit/Source/core/html/HTMLLabelElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp b/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp
|
| index 191e9c178e957426f41061892417ab03a85f7cd1..546d8a5c743d9a119096aff2623967e4fe71cd76 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp
|
| @@ -69,6 +69,9 @@ LabelableElement* HTMLLabelElement::control() const {
|
| return nullptr;
|
| }
|
|
|
| + if (!isInTreeScope())
|
| + return nullptr;
|
| +
|
| if (Element* element = treeScope().getElementById(controlId)) {
|
| if (isLabelableElement(*element) &&
|
| toLabelableElement(*element).supportLabels()) {
|
|
|