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

Side by Side Diff: sky/engine/core/css/StyleSheetContents.cpp

Issue 809513003: Remove dead methods from CSSStyleSheet and StyleSheetContents. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « sky/engine/core/css/StyleSheetContents.h ('k') | sky/engine/core/dom/Document.cpp » ('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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 if (rule->isMediaRule()) 54 if (rule->isMediaRule())
55 setHasMediaQueries(); 55 setHasMediaQueries();
56 m_childRules.append(rule); 56 m_childRules.append(rule);
57 } 57 }
58 58
59 void StyleSheetContents::setHasMediaQueries() 59 void StyleSheetContents::setHasMediaQueries()
60 { 60 {
61 m_hasMediaQueries = true; 61 m_hasMediaQueries = true;
62 } 62 }
63 63
64 StyleRuleBase* StyleSheetContents::ruleAt(unsigned index) const
65 {
66 ASSERT_WITH_SECURITY_IMPLICATION(index < ruleCount());
67 return m_childRules[index].get();
68 }
69
70 unsigned StyleSheetContents::ruleCount() const
71 {
72 return m_childRules.size();
73 }
74
75 bool StyleSheetContents::parseString(const String& sheetText) 64 bool StyleSheetContents::parseString(const String& sheetText)
76 { 65 {
77 CSSParserContext context(parserContext(), UseCounter::getFrom(this)); 66 CSSParserContext context(parserContext(), UseCounter::getFrom(this));
78 BisonCSSParser p(context); 67 BisonCSSParser p(context);
79 p.parseSheet(this, sheetText); 68 p.parseSheet(this, sheetText);
80 return true; 69 return true;
81 } 70 }
82 71
83 void StyleSheetContents::registerClient(CSSStyleSheet* sheet) 72 void StyleSheetContents::registerClient(CSSStyleSheet* sheet)
84 { 73 {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // Clearing the ruleSet means we need to recreate the styleResolver data str uctures. 113 // Clearing the ruleSet means we need to recreate the styleResolver data str uctures.
125 // See the StyleResolver calls in ScopedStyleResolver::addRulesFromSheet. 114 // See the StyleResolver calls in ScopedStyleResolver::addRulesFromSheet.
126 for (RawPtr<CSSStyleSheet> client : m_clients) { 115 for (RawPtr<CSSStyleSheet> client : m_clients) {
127 if (Document* document = client->ownerDocument()) 116 if (Document* document = client->ownerDocument())
128 document->styleEngine()->clearResolver(); 117 document->styleEngine()->clearResolver();
129 } 118 }
130 m_ruleSet.clear(); 119 m_ruleSet.clear();
131 } 120 }
132 121
133 } 122 }
OLDNEW
« no previous file with comments | « sky/engine/core/css/StyleSheetContents.h ('k') | sky/engine/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698