| 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/CSSTokenizerInputStream.h" | 5 #include "core/css/parser/CSSTokenizerInputStream.h" |
| 6 | 6 |
| 7 #include "core/html/parser/HTMLParserIdioms.h" | 7 #include "core/html/parser/HTMLParserIdioms.h" |
| 8 #include "core/html/parser/InputStreamPreprocessor.h" | 8 #include "core/html/parser/InputStreamPreprocessor.h" |
| 9 #include "wtf/text/StringToNumber.h" | 9 #include "wtf/text/StringToNumber.h" |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 if (start < end) { | 47 if (start < end) { |
| 48 if (m_string->is8Bit()) | 48 if (m_string->is8Bit()) |
| 49 result = charactersToDouble(m_string->characters8() + m_offset + sta
rt, end - start, &isResultOK); | 49 result = charactersToDouble(m_string->characters8() + m_offset + sta
rt, end - start, &isResultOK); |
| 50 else | 50 else |
| 51 result = charactersToDouble(m_string->characters16() + m_offset + st
art, end - start, &isResultOK); | 51 result = charactersToDouble(m_string->characters16() + m_offset + st
art, end - start, &isResultOK); |
| 52 } | 52 } |
| 53 // FIXME: It looks like callers ensure we have a valid number | 53 // FIXME: It looks like callers ensure we have a valid number |
| 54 return isResultOK ? result : 0.0; | 54 return isResultOK ? result : 0.0; |
| 55 } | 55 } |
| 56 | 56 |
| 57 StringView CSSTokenizerInputStream::rangeAt(unsigned start, unsigned length) con
st | |
| 58 { | |
| 59 DCHECK(start + length <= m_stringLength); | |
| 60 return StringView(m_string.get(), start, length); | |
| 61 } | |
| 62 | |
| 63 } // namespace blink | 57 } // namespace blink |
| OLD | NEW |