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 "config.h" | 5 #include "config.h" |
6 #include "core/css/parser/CSSTokenizerInputStream.h" | 6 #include "core/css/parser/CSSTokenizerInputStream.h" |
7 | 7 |
8 #include "core/css/parser/CSSParserValues.h" | 8 #include "core/css/parser/CSSParserString.h" |
9 #include "core/html/parser/InputStreamPreprocessor.h" | 9 #include "core/html/parser/InputStreamPreprocessor.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 CSSTokenizerInputStream::CSSTokenizerInputStream(String input) | 13 CSSTokenizerInputStream::CSSTokenizerInputStream(String input) |
14 : m_offset(0) | 14 : m_offset(0) |
15 , m_stringLength(input.length()) | 15 , m_stringLength(input.length()) |
16 , m_string(input.impl()) | 16 , m_string(input.impl()) |
17 { | 17 { |
18 } | 18 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 ASSERT(start + length <= m_stringLength); | 51 ASSERT(start + length <= m_stringLength); |
52 CSSParserString result; | 52 CSSParserString result; |
53 if (m_string->is8Bit()) | 53 if (m_string->is8Bit()) |
54 result.init(m_string->characters8() + start, length); | 54 result.init(m_string->characters8() + start, length); |
55 else | 55 else |
56 result.init(m_string->characters16() + start, length); | 56 result.init(m_string->characters16() + start, length); |
57 return result; | 57 return result; |
58 } | 58 } |
59 | 59 |
60 } // namespace blink | 60 } // namespace blink |
OLD | NEW |