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

Side by Side Diff: Source/core/css/StyleSheetContents.cpp

Issue 22572005: Remove all uses of the ASCIILiteral class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rm it from wtf Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/MediaList.cpp ('k') | Source/core/dom/DOMException.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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 // This prevents an attacker playing games by injecting CSS strings into HTM L, XML, JSON, etc. etc. 283 // This prevents an attacker playing games by injecting CSS strings into HTM L, XML, JSON, etc. etc.
284 if (!hasValidMIMEType && !hasSyntacticallyValidCSSHeader()) { 284 if (!hasValidMIMEType && !hasSyntacticallyValidCSSHeader()) {
285 bool isCrossOriginCSS = !securityOrigin || !securityOrigin->canRequest(b aseURL()); 285 bool isCrossOriginCSS = !securityOrigin || !securityOrigin->canRequest(b aseURL());
286 if (isCrossOriginCSS) { 286 if (isCrossOriginCSS) {
287 clearRules(); 287 clearRules();
288 return; 288 return;
289 } 289 }
290 } 290 }
291 if (m_parserContext.needsSiteSpecificQuirks && isStrictParserMode(m_parserCo ntext.mode)) { 291 if (m_parserContext.needsSiteSpecificQuirks && isStrictParserMode(m_parserCo ntext.mode)) {
292 // Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>. 292 // Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>.
293 DEFINE_STATIC_LOCAL(const String, mediaWikiKHTMLFixesStyleSheet, (ASCIIL iteral("/* KHTML fix stylesheet */\n/* work around the horizontal scrollbars */\ n#column-content { margin-left: 0; }\n\n"))); 293 DEFINE_STATIC_LOCAL(const String, mediaWikiKHTMLFixesStyleSheet, ("/* KH TML fix stylesheet */\n/* work around the horizontal scrollbars */\n#column-cont ent { margin-left: 0; }\n\n"));
294 // There are two variants of KHTMLFixes.css. One is equal to mediaWikiKH TMLFixesStyleSheet, 294 // There are two variants of KHTMLFixes.css. One is equal to mediaWikiKH TMLFixesStyleSheet,
295 // while the other lacks the second trailing newline. 295 // while the other lacks the second trailing newline.
296 if (baseURL().string().endsWith("/KHTMLFixes.css") && !sheetText.isNull( ) && mediaWikiKHTMLFixesStyleSheet.startsWith(sheetText) 296 if (baseURL().string().endsWith("/KHTMLFixes.css") && !sheetText.isNull( ) && mediaWikiKHTMLFixesStyleSheet.startsWith(sheetText)
297 && sheetText.length() >= mediaWikiKHTMLFixesStyleSheet.length() - 1) 297 && sheetText.length() >= mediaWikiKHTMLFixesStyleSheet.length() - 1)
298 clearRules(); 298 clearRules();
299 } 299 }
300 } 300 }
301 301
302 bool StyleSheetContents::parseString(const String& sheetText) 302 bool StyleSheetContents::parseString(const String& sheetText)
303 { 303 {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 m_isInMemoryCache = false; 500 m_isInMemoryCache = false;
501 } 501 }
502 502
503 void StyleSheetContents::shrinkToFit() 503 void StyleSheetContents::shrinkToFit()
504 { 504 {
505 m_importRules.shrinkToFit(); 505 m_importRules.shrinkToFit();
506 m_childRules.shrinkToFit(); 506 m_childRules.shrinkToFit();
507 } 507 }
508 508
509 } 509 }
OLDNEW
« no previous file with comments | « Source/core/css/MediaList.cpp ('k') | Source/core/dom/DOMException.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698