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

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

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global Created 3 years, 10 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/CSSSyntaxDescriptor.h" 5 #include "core/css/CSSSyntaxDescriptor.h"
6 6
7 #include "core/animation/CSSColorInterpolationType.h" 7 #include "core/animation/CSSColorInterpolationType.h"
8 #include "core/animation/CSSValueInterpolationType.h" 8 #include "core/animation/CSSValueInterpolationType.h"
9 #include "core/css/CSSCustomPropertyDeclaration.h" 9 #include "core/css/CSSCustomPropertyDeclaration.h"
10 #include "core/css/CSSURIValue.h" 10 #include "core/css/CSSURIValue.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 93
94 CSSSyntaxDescriptor::CSSSyntaxDescriptor(String input) { 94 CSSSyntaxDescriptor::CSSSyntaxDescriptor(String input) {
95 size_t offset = 0; 95 size_t offset = 0;
96 consumeWhitespace(input, offset); 96 consumeWhitespace(input, offset);
97 97
98 if (consumeCharacterAndWhitespace(input, '*', offset)) { 98 if (consumeCharacterAndWhitespace(input, '*', offset)) {
99 if (offset != input.length()) 99 if (offset != input.length())
100 return; 100 return;
101 m_syntaxComponents.push_back( 101 m_syntaxComponents.push_back(
102 CSSSyntaxComponent(CSSSyntaxType::TokenStream, emptyString(), false)); 102 CSSSyntaxComponent(CSSSyntaxType::TokenStream, emptyString, false));
103 return; 103 return;
104 } 104 }
105 105
106 do { 106 do {
107 CSSSyntaxType type; 107 CSSSyntaxType type;
108 String ident; 108 String ident;
109 bool success; 109 bool success;
110 110
111 if (input[offset] == '<') { 111 if (input[offset] == '<') {
112 success = consumeSyntaxType(input, offset, type); 112 success = consumeSyntaxType(input, offset, type);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 NOTREACHED(); 250 NOTREACHED();
251 break; 251 break;
252 } 252 }
253 } 253 }
254 interpolationTypes.push_back( 254 interpolationTypes.push_back(
255 WTF::makeUnique<CSSValueInterpolationType>(property)); 255 WTF::makeUnique<CSSValueInterpolationType>(property));
256 return interpolationTypes; 256 return interpolationTypes;
257 } 257 }
258 258
259 } // namespace blink 259 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.h ('k') | third_party/WebKit/Source/core/css/FontFace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698