Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: third_party/WebKit/Source/core/html/imports/HTMLImportTreeRoot.cpp

Issue 2242743002: Make custom elements work in HTML imports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve most comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/html/imports/HTMLImportTreeRoot.h" 5 #include "core/html/imports/HTMLImportTreeRoot.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/StyleEngine.h" 8 #include "core/dom/StyleEngine.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/html/imports/HTMLImportChild.h" 10 #include "core/html/imports/HTMLImportChild.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 { 80 {
81 for (size_t i = 0; i < m_imports.size(); ++i) { 81 for (size_t i = 0; i < m_imports.size(); ++i) {
82 HTMLImportChild* candidate = m_imports[i].get(); 82 HTMLImportChild* candidate = m_imports[i].get();
83 if (equalIgnoringFragmentIdentifier(candidate->url(), url)) 83 if (equalIgnoringFragmentIdentifier(candidate->url(), url))
84 return candidate; 84 return candidate;
85 } 85 }
86 86
87 return nullptr; 87 return nullptr;
88 } 88 }
89 89
90 HTMLImportChild* HTMLImportTreeRoot::find(const Document& document) const
dominicc (has gone to gerrit) 2016/08/22 08:07:36 Per above, don't think you need this.
kochi 2016/08/22 12:02:00 Removed!
91 {
92 for (size_t i = 0; i < m_imports.size(); ++i) {
93 HTMLImportChild* candidate = m_imports[i].get();
94 if (candidate->document() == document)
95 return candidate;
96 }
97 return nullptr;
98 }
99
90 void HTMLImportTreeRoot::recalcTimerFired(TimerBase*) 100 void HTMLImportTreeRoot::recalcTimerFired(TimerBase*)
91 { 101 {
92 DCHECK(m_document); 102 DCHECK(m_document);
93 HTMLImport::recalcTreeState(this); 103 HTMLImport::recalcTreeState(this);
94 } 104 }
95 105
96 DEFINE_TRACE(HTMLImportTreeRoot) 106 DEFINE_TRACE(HTMLImportTreeRoot)
97 { 107 {
98 visitor->trace(m_document); 108 visitor->trace(m_document);
99 visitor->trace(m_imports); 109 visitor->trace(m_imports);
100 HTMLImport::trace(visitor); 110 HTMLImport::trace(visitor);
101 } 111 }
102 112
103 } // namespace blink 113 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698