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

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

Issue 2390543002: Reflow comments in core/dom/. (Closed)
Patch Set: Reformat comments in core/dom/. Created 4 years, 2 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) 2006, 2007 Rob Buis 2 * Copyright (C) 2006, 2007 Rob Buis
3 * Copyright (C) 2008 Apple, Inc. All rights reserved. 3 * Copyright (C) 2008 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 Document& document = element.document(); 156 Document& document = element.document();
157 157
158 const ContentSecurityPolicy* csp = document.contentSecurityPolicy(); 158 const ContentSecurityPolicy* csp = document.contentSecurityPolicy();
159 bool passesContentSecurityPolicyChecks = 159 bool passesContentSecurityPolicyChecks =
160 shouldBypassMainWorldCSP(element) || 160 shouldBypassMainWorldCSP(element) ||
161 csp->allowStyleWithHash(text, ContentSecurityPolicy::InlineType::Block) || 161 csp->allowStyleWithHash(text, ContentSecurityPolicy::InlineType::Block) ||
162 csp->allowInlineStyle(document.url(), 162 csp->allowInlineStyle(document.url(),
163 element.fastGetAttribute(HTMLNames::nonceAttr), 163 element.fastGetAttribute(HTMLNames::nonceAttr),
164 m_startPosition.m_line, text); 164 m_startPosition.m_line, text);
165 165
166 // Clearing the current sheet may remove the cache entry so create the new she et first 166 // Clearing the current sheet may remove the cache entry so create the new
167 // sheet first
167 CSSStyleSheet* newSheet = nullptr; 168 CSSStyleSheet* newSheet = nullptr;
168 169
169 // If type is empty or CSS, this is a CSS style sheet. 170 // If type is empty or CSS, this is a CSS style sheet.
170 const AtomicString& type = this->type(); 171 const AtomicString& type = this->type();
171 if (isCSS(element, type) && passesContentSecurityPolicyChecks) { 172 if (isCSS(element, type) && passesContentSecurityPolicyChecks) {
172 MediaQuerySet* mediaQueries = MediaQuerySet::create(media()); 173 MediaQuerySet* mediaQueries = MediaQuerySet::create(media());
173 174
174 MediaQueryEvaluator screenEval("screen", true); 175 MediaQueryEvaluator screenEval("screen", true);
175 MediaQueryEvaluator printEval("print", true); 176 MediaQueryEvaluator printEval("print", true);
176 if (screenEval.eval(mediaQueries) || printEval.eval(mediaQueries)) { 177 if (screenEval.eval(mediaQueries) || printEval.eval(mediaQueries)) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 215
215 void StyleElement::startLoadingDynamicSheet(Document& document) { 216 void StyleElement::startLoadingDynamicSheet(Document& document) {
216 document.styleEngine().addPendingSheet(m_styleEngineContext); 217 document.styleEngine().addPendingSheet(m_styleEngineContext);
217 } 218 }
218 219
219 DEFINE_TRACE(StyleElement) { 220 DEFINE_TRACE(StyleElement) {
220 visitor->trace(m_sheet); 221 visitor->trace(m_sheet);
221 } 222 }
222 223
223 } // namespace blink 224 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/StaticRangeTest.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