Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/HTMLTemplateElement.cpp |
| diff --git a/third_party/WebKit/Source/core/html/HTMLTemplateElement.cpp b/third_party/WebKit/Source/core/html/HTMLTemplateElement.cpp |
| index d91e600906652e4841cea896870ab8790a0f90fe..a710b41f5db6302fa9a406e5dae2e38bd8a4b7c9 100644 |
| --- a/third_party/WebKit/Source/core/html/HTMLTemplateElement.cpp |
| +++ b/third_party/WebKit/Source/core/html/HTMLTemplateElement.cpp |
| @@ -46,10 +46,12 @@ DEFINE_NODE_FACTORY(HTMLTemplateElement) |
| HTMLTemplateElement::~HTMLTemplateElement() {} |
| DocumentFragment* HTMLTemplateElement::content() const { |
| - if (!content_) |
| + if (!content_) { |
| content_ = TemplateContentDocumentFragment::Create( |
| GetDocument().EnsureTemplateDocument(), |
| const_cast<HTMLTemplateElement*>(this)); |
| + content_->GetDocument().SetURL(GetDocument().Url()); |
|
fs
2017/04/25 09:13:45
Shouldn't this rather be handled when creating the
foolip
2017/04/25 09:23:44
The relevant bit of spec:
https://html.spec.whatwg
fs
2017/04/25 10:20:47
Right, https://dom.spec.whatwg.org/#interface-docu
foolip
2017/04/25 14:23:28
Do you mean "The Document() constructor, when invo
fs
2017/04/25 14:39:26
That may very well be the case. But shouldn't the
fs
2017/04/25 14:51:08
Found what I was looking for:
'Unless stated othe
|
| + } |
| return content_.Get(); |
| } |