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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSStyleSheet.cpp

Issue 2017053003: Remove StringBuilder::appendLiteral. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. Created 4 years, 6 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 * (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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 if (m_childRuleCSSOMWrappers[index]) 323 if (m_childRuleCSSOMWrappers[index])
324 m_childRuleCSSOMWrappers[index]->setParentStyleSheet(0); 324 m_childRuleCSSOMWrappers[index]->setParentStyleSheet(0);
325 m_childRuleCSSOMWrappers.remove(index); 325 m_childRuleCSSOMWrappers.remove(index);
326 } 326 }
327 } 327 }
328 328
329 int CSSStyleSheet::addRule(const String& selector, const String& style, int inde x, ExceptionState& exceptionState) 329 int CSSStyleSheet::addRule(const String& selector, const String& style, int inde x, ExceptionState& exceptionState)
330 { 330 {
331 StringBuilder text; 331 StringBuilder text;
332 text.append(selector); 332 text.append(selector);
333 text.appendLiteral(" { "); 333 text.append(" { ");
334 text.append(style); 334 text.append(style);
335 if (!style.isEmpty()) 335 if (!style.isEmpty())
336 text.append(' '); 336 text.append(' ');
337 text.append('}'); 337 text.append('}');
338 insertRule(text.toString(), index, exceptionState); 338 insertRule(text.toString(), index, exceptionState);
339 339
340 // As per Microsoft documentation, always return -1. 340 // As per Microsoft documentation, always return -1.
341 return -1; 341 return -1;
342 } 342 }
343 343
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 visitor->trace(m_mediaQueries); 440 visitor->trace(m_mediaQueries);
441 visitor->trace(m_ownerNode); 441 visitor->trace(m_ownerNode);
442 visitor->trace(m_ownerRule); 442 visitor->trace(m_ownerRule);
443 visitor->trace(m_mediaCSSOMWrapper); 443 visitor->trace(m_mediaCSSOMWrapper);
444 visitor->trace(m_childRuleCSSOMWrappers); 444 visitor->trace(m_childRuleCSSOMWrappers);
445 visitor->trace(m_ruleListCSSOMWrapper); 445 visitor->trace(m_ruleListCSSOMWrapper);
446 StyleSheet::trace(visitor); 446 StyleSheet::trace(visitor);
447 } 447 }
448 448
449 } // namespace blink 449 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSStyleRule.cpp ('k') | third_party/WebKit/Source/core/css/CSSSupportsRule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698