| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/parser/CSSParserTokenRange.h" | 5 #include "core/css/parser/CSSParserTokenRange.h" |
| 6 | 6 |
| 7 #include "wtf/StaticConstructors.h" | 7 #include "platform/wtf/StaticConstructors.h" |
| 8 #include "wtf/text/StringBuilder.h" | 8 #include "platform/wtf/text/StringBuilder.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 DEFINE_GLOBAL(CSSParserToken, g_static_eof_token); | 12 DEFINE_GLOBAL(CSSParserToken, g_static_eof_token); |
| 13 | 13 |
| 14 void CSSParserTokenRange::InitStaticEOFToken() { | 14 void CSSParserTokenRange::InitStaticEOFToken() { |
| 15 new ((void*)&g_static_eof_token) CSSParserToken(kEOFToken); | 15 new ((void*)&g_static_eof_token) CSSParserToken(kEOFToken); |
| 16 } | 16 } |
| 17 | 17 |
| 18 CSSParserTokenRange CSSParserTokenRange::MakeSubRange( | 18 CSSParserTokenRange CSSParserTokenRange::MakeSubRange( |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // We're supposed to insert comments between certain pairs of token types | 61 // We're supposed to insert comments between certain pairs of token types |
| 62 // as per spec, but since this is currently only used for @supports CSSOM | 62 // as per spec, but since this is currently only used for @supports CSSOM |
| 63 // we just get these cases wrong and avoid the additional complexity. | 63 // we just get these cases wrong and avoid the additional complexity. |
| 64 StringBuilder builder; | 64 StringBuilder builder; |
| 65 for (const CSSParserToken* it = first_; it < last_; ++it) | 65 for (const CSSParserToken* it = first_; it < last_; ++it) |
| 66 it->Serialize(builder); | 66 it->Serialize(builder); |
| 67 return builder.ToString(); | 67 return builder.ToString(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 } // namespace blink | 70 } // namespace blink |
| OLD | NEW |