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

Side by Side Diff: third_party/WebKit/Source/core/dom/StyleEngine.cpp

Issue 2177163002: Allow <link rel=stylesheet> in a connected shadow tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split tests Created 4 years, 4 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 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 184 }
185 185
186 resolverChanged(updateMode); 186 resolverChanged(updateMode);
187 } 187 }
188 188
189 void StyleEngine::addStyleSheetCandidateNode(Node* node) 189 void StyleEngine::addStyleSheetCandidateNode(Node* node)
190 { 190 {
191 if (!node->isConnected() || document().isDetached()) 191 if (!node->isConnected() || document().isDetached())
192 return; 192 return;
193 193
194 TreeScope& treeScope = isStyleElement(*node) ? node->treeScope() : *m_docume nt;
195 DCHECK(!isXSLStyleSheet(*node)); 194 DCHECK(!isXSLStyleSheet(*node));
195 TreeScope& treeScope = node->treeScope();
196 TreeScopeStyleSheetCollection* collection = ensureStyleSheetCollectionFor(tr eeScope); 196 TreeScopeStyleSheetCollection* collection = ensureStyleSheetCollectionFor(tr eeScope);
197 DCHECK(collection); 197 DCHECK(collection);
198 collection->addStyleSheetCandidateNode(node); 198 collection->addStyleSheetCandidateNode(node);
199 199
200 markTreeScopeDirty(treeScope); 200 markTreeScopeDirty(treeScope);
201 if (treeScope != m_document) 201 if (treeScope != m_document)
202 m_activeTreeScopes.add(&treeScope); 202 m_activeTreeScopes.add(&treeScope);
203 } 203 }
204 204
205 void StyleEngine::removeStyleSheetCandidateNode(Node* node) 205 void StyleEngine::removeStyleSheetCandidateNode(Node* node)
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 829
830 DEFINE_TRACE_WRAPPERS(StyleEngine) 830 DEFINE_TRACE_WRAPPERS(StyleEngine)
831 { 831 {
832 for (auto sheet : m_injectedAuthorStyleSheets) { 832 for (auto sheet : m_injectedAuthorStyleSheets) {
833 visitor->traceWrappers(sheet); 833 visitor->traceWrappers(sheet);
834 } 834 }
835 visitor->traceWrappers(m_documentStyleSheetCollection); 835 visitor->traceWrappers(m_documentStyleSheetCollection);
836 } 836 }
837 837
838 } // namespace blink 838 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698