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

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

Issue 788113002: Simplify HTMLStyleElement. (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/CSSTestHelper.cpp ('k') | sky/engine/core/css/parser/BisonCSSParser.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 * (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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 return m_childRules.size(); 104 return m_childRules.size();
105 } 105 }
106 106
107 void StyleSheetContents::clearRules() 107 void StyleSheetContents::clearRules()
108 { 108 {
109 m_childRules.clear(); 109 m_childRules.clear();
110 } 110 }
111 111
112 bool StyleSheetContents::parseString(const String& sheetText) 112 bool StyleSheetContents::parseString(const String& sheetText)
113 { 113 {
114 return parseStringAtPosition(sheetText, TextPosition::minimumPosition(), fal se);
115 }
116
117 bool StyleSheetContents::parseStringAtPosition(const String& sheetText, const Te xtPosition& startPosition, bool createdByParser)
118 {
119 CSSParserContext context(parserContext(), UseCounter::getFrom(this)); 114 CSSParserContext context(parserContext(), UseCounter::getFrom(this));
120 BisonCSSParser p(context); 115 BisonCSSParser p(context);
121 p.parseSheet(this, sheetText, startPosition, 0, createdByParser); 116 p.parseSheet(this, sheetText);
122
123 return true; 117 return true;
124 } 118 }
125 119
126 bool StyleSheetContents::hasSingleOwnerNode() const 120 bool StyleSheetContents::hasSingleOwnerNode() const
127 { 121 {
128 return hasOneClient(); 122 return hasOneClient();
129 } 123 }
130 124
131 Node* StyleSheetContents::singleOwnerNode() const 125 Node* StyleSheetContents::singleOwnerNode() const
132 { 126 {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 } 265 }
272 } 266 }
273 267
274 void StyleSheetContents::notifyRemoveFontFaceRule(const StyleRuleFontFace* fontF aceRule) 268 void StyleSheetContents::notifyRemoveFontFaceRule(const StyleRuleFontFace* fontF aceRule)
275 { 269 {
276 removeFontFaceRules(m_loadingClients, fontFaceRule); 270 removeFontFaceRules(m_loadingClients, fontFaceRule);
277 removeFontFaceRules(m_completedClients, fontFaceRule); 271 removeFontFaceRules(m_completedClients, fontFaceRule);
278 } 272 }
279 273
280 } 274 }
OLDNEW
« no previous file with comments | « sky/engine/core/css/CSSTestHelper.cpp ('k') | sky/engine/core/css/parser/BisonCSSParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698