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

Side by Side Diff: third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.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, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2013 Google Inc. All rights reserved. 9 * Copyright (C) 2013 Google Inc. All rights reserved.
10 * 10 *
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 : TreeScopeStyleSheetCollection(shadowRoot) 44 : TreeScopeStyleSheetCollection(shadowRoot)
45 { 45 {
46 } 46 }
47 47
48 void ShadowTreeStyleSheetCollection::collectStyleSheets(StyleEngine& engine, Sty leSheetCollection& collection) 48 void ShadowTreeStyleSheetCollection::collectStyleSheets(StyleEngine& engine, Sty leSheetCollection& collection)
49 { 49 {
50 for (Node* n : m_styleSheetCandidateNodes) { 50 for (Node* n : m_styleSheetCandidateNodes) {
51 StyleSheetCandidate candidate(*n); 51 StyleSheetCandidate candidate(*n);
52 DCHECK(!candidate.isXSL()); 52 DCHECK(!candidate.isXSL());
53 53
54 if (!candidate.isCSSStyle())
55 continue;
56
57 StyleSheet* sheet = candidate.sheet(); 54 StyleSheet* sheet = candidate.sheet();
58 if (!sheet) 55 if (!sheet)
59 continue; 56 continue;
60 57
61 collection.appendSheetForList(sheet); 58 collection.appendSheetForList(sheet);
62 if (candidate.canBeActivated(nullAtom)) 59 if (candidate.canBeActivated(nullAtom))
63 collection.appendActiveStyleSheet(toCSSStyleSheet(sheet)); 60 collection.appendActiveStyleSheet(toCSSStyleSheet(sheet));
64 } 61 }
65 } 62 }
66 63
(...skipping 16 matching lines...) Expand all
83 styleResolver->lazyAppendAuthorStyleSheets(m_activeAuthorStyleSheets .size(), collection.activeAuthorStyleSheets()); 80 styleResolver->lazyAppendAuthorStyleSheets(m_activeAuthorStyleSheets .size(), collection.activeAuthorStyleSheets());
84 } 81 }
85 } 82 }
86 if (change.requiresFullStyleRecalc) 83 if (change.requiresFullStyleRecalc)
87 toShadowRoot(treeScope().rootNode()).host().setNeedsStyleRecalc(SubtreeS tyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::ActiveStylesh eetsUpdate)); 84 toShadowRoot(treeScope().rootNode()).host().setNeedsStyleRecalc(SubtreeS tyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::ActiveStylesh eetsUpdate));
88 85
89 collection.swap(*this); 86 collection.swap(*this);
90 } 87 }
91 88
92 } // namespace blink 89 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp ('k') | third_party/WebKit/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698