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

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

Issue 2443933002: Move TreeBoundaryCrossingScopes to StyleEngine. (Closed)
Patch Set: Created 4 years, 1 month 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 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 StyleSheetChange change; 73 StyleSheetChange change;
74 analyzeStyleSheetChange(updateMode, collection->activeAuthorStyleSheets(), 74 analyzeStyleSheetChange(updateMode, collection->activeAuthorStyleSheets(),
75 change); 75 change);
76 76
77 if (StyleResolver* styleResolver = engine.resolver()) { 77 if (StyleResolver* styleResolver = engine.resolver()) {
78 if (change.styleResolverUpdateType != Additive) { 78 if (change.styleResolverUpdateType != Additive) {
79 // We should not destroy StyleResolver when we find any stylesheet update 79 // We should not destroy StyleResolver when we find any stylesheet update
80 // in a shadow tree. In this case, we will reset rulesets created from 80 // in a shadow tree. In this case, we will reset rulesets created from
81 // style elements in the shadow tree. 81 // style elements in the shadow tree.
82 styleResolver->resetAuthorStyle(treeScope()); 82 engine.resetAuthorStyle(treeScope());
83 styleResolver->removePendingAuthorStyleSheets(m_activeAuthorStyleSheets); 83 styleResolver->removePendingAuthorStyleSheets(m_activeAuthorStyleSheets);
84 styleResolver->lazyAppendAuthorStyleSheets( 84 styleResolver->lazyAppendAuthorStyleSheets(
85 0, collection->activeAuthorStyleSheets()); 85 0, collection->activeAuthorStyleSheets());
86 } else { 86 } else {
87 styleResolver->lazyAppendAuthorStyleSheets( 87 styleResolver->lazyAppendAuthorStyleSheets(
88 m_activeAuthorStyleSheets.size(), 88 m_activeAuthorStyleSheets.size(),
89 collection->activeAuthorStyleSheets()); 89 collection->activeAuthorStyleSheets());
90 } 90 }
91 } 91 }
92 if (change.requiresFullStyleRecalc) 92 if (change.requiresFullStyleRecalc)
93 toShadowRoot(treeScope().rootNode()) 93 toShadowRoot(treeScope().rootNode())
94 .host() 94 .host()
95 .setNeedsStyleRecalc(SubtreeStyleChange, 95 .setNeedsStyleRecalc(SubtreeStyleChange,
96 StyleChangeReasonForTracing::create( 96 StyleChangeReasonForTracing::create(
97 StyleChangeReason::ActiveStylesheetsUpdate)); 97 StyleChangeReason::ActiveStylesheetsUpdate));
98 98
99 collection->swap(*this); 99 collection->swap(*this);
100 collection->dispose(); 100 collection->dispose();
101 } 101 }
102 102
103 } // namespace blink 103 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.cpp ('k') | third_party/WebKit/Source/core/dom/StyleEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698