Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp |
| index a9e7d5cd80b3ae9db6a1ff58feab377d277472db..db82d7bbadc7ea20a9d938449f7c0f39c7d5e6be 100644 |
| --- a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp |
| +++ b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp |
| @@ -55,8 +55,10 @@ static String errorMessageForConstructorResult(Element* element, |
| if (element->parentNode()) |
| return "The result must not have a parent"; |
| // 6.1.7. If result's node document is not document, then throw a NotSupportedError. |
| - if (&element->document() != &document) |
| + if (&element->document() != &document |
|
dominicc (has gone to gerrit)
2016/08/22 01:46:36
Just noticed that you didn't respond to the C++ co
kochi
2016/08/22 07:37:34
Yeah, this one was only layout tests.
In the next
|
| + && element->document().contextDocument() != document.contextDocument()) { |
| return "The result must be in the same document"; |
| + } |
| // 6.1.8. If result's namespace is not the HTML namespace, then throw a NotSupportedError. |
| if (element->namespaceURI() != HTMLNames::xhtmlNamespaceURI) |
| return "The result must have HTML namespace"; |