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

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

Issue 2835183002: Provide a method to remove inserted style sheet (Closed)
Patch Set: rebase Created 3 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/StyleEngine.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 std::make_pair(css_sheet, master_engine.RuleSetForSheet(*css_sheet))); 87 std::make_pair(css_sheet, master_engine.RuleSetForSheet(*css_sheet)));
88 } 88 }
89 } 89 }
90 90
91 void DocumentStyleSheetCollection::CollectStyleSheets( 91 void DocumentStyleSheetCollection::CollectStyleSheets(
92 StyleEngine& master_engine, 92 StyleEngine& master_engine,
93 DocumentStyleSheetCollector& collector) { 93 DocumentStyleSheetCollector& collector) {
94 for (auto& sheet : 94 for (auto& sheet :
95 GetDocument().GetStyleEngine().InjectedAuthorStyleSheets()) { 95 GetDocument().GetStyleEngine().InjectedAuthorStyleSheets()) {
96 collector.AppendActiveStyleSheet(std::make_pair( 96 collector.AppendActiveStyleSheet(std::make_pair(
97 sheet, GetDocument().GetStyleEngine().RuleSetForSheet(*sheet))); 97 sheet.second,
98 GetDocument().GetStyleEngine().RuleSetForSheet(*sheet.second)));
98 } 99 }
99 CollectStyleSheetsFromCandidates(master_engine, collector); 100 CollectStyleSheetsFromCandidates(master_engine, collector);
100 if (CSSStyleSheet* inspector_sheet = 101 if (CSSStyleSheet* inspector_sheet =
101 GetDocument().GetStyleEngine().InspectorStyleSheet()) { 102 GetDocument().GetStyleEngine().InspectorStyleSheet()) {
102 collector.AppendActiveStyleSheet(std::make_pair( 103 collector.AppendActiveStyleSheet(std::make_pair(
103 inspector_sheet, 104 inspector_sheet,
104 GetDocument().GetStyleEngine().RuleSetForSheet(*inspector_sheet))); 105 GetDocument().GetStyleEngine().RuleSetForSheet(*inspector_sheet)));
105 } 106 }
106 } 107 }
107 108
(...skipping 18 matching lines...) Expand all
126 continue; 127 continue;
127 if (!candidate.CanBeActivated( 128 if (!candidate.CanBeActivated(
128 GetDocument().GetStyleEngine().PreferredStylesheetSetName())) 129 GetDocument().GetStyleEngine().PreferredStylesheetSetName()))
129 continue; 130 continue;
130 viewport_resolver.CollectViewportRulesFromAuthorSheet( 131 viewport_resolver.CollectViewportRulesFromAuthorSheet(
131 *ToCSSStyleSheet(sheet)); 132 *ToCSSStyleSheet(sheet));
132 } 133 }
133 } 134 }
134 135
135 } // namespace blink 136 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/StyleEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698