| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/ | 3 * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/ |
| 4 * Copyright (C) 2013 Google, Inc. All Rights Reserved. | 4 * Copyright (C) 2013 Google, Inc. All Rights Reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #ifndef InputStreamPreprocessor_h | 28 #ifndef InputStreamPreprocessor_h |
| 29 #define InputStreamPreprocessor_h | 29 #define InputStreamPreprocessor_h |
| 30 | 30 |
| 31 #include "platform/text/SegmentedString.h" | 31 #include "platform/text/SegmentedString.h" |
| 32 #include "wtf/Allocator.h" |
| 32 #include "wtf/Noncopyable.h" | 33 #include "wtf/Noncopyable.h" |
| 33 | 34 |
| 34 namespace blink { | 35 namespace blink { |
| 35 | 36 |
| 36 const LChar kEndOfFileMarker = 0; | 37 const LChar kEndOfFileMarker = 0; |
| 37 | 38 |
| 38 // http://www.whatwg.org/specs/web-apps/current-work/#preprocessing-the-input-st
ream | 39 // http://www.whatwg.org/specs/web-apps/current-work/#preprocessing-the-input-st
ream |
| 39 template <typename Tokenizer> | 40 template <typename Tokenizer> |
| 40 class InputStreamPreprocessor { | 41 class InputStreamPreprocessor { |
| 42 DISALLOW_ALLOCATION(); |
| 41 WTF_MAKE_NONCOPYABLE(InputStreamPreprocessor); | 43 WTF_MAKE_NONCOPYABLE(InputStreamPreprocessor); |
| 42 public: | 44 public: |
| 43 InputStreamPreprocessor(Tokenizer* tokenizer) | 45 InputStreamPreprocessor(Tokenizer* tokenizer) |
| 44 : m_tokenizer(tokenizer) | 46 : m_tokenizer(tokenizer) |
| 45 { | 47 { |
| 46 reset(); | 48 reset(); |
| 47 } | 49 } |
| 48 | 50 |
| 49 ALWAYS_INLINE UChar nextInputCharacter() const { return m_nextInputCharacter
; } | 51 ALWAYS_INLINE UChar nextInputCharacter() const { return m_nextInputCharacter
; } |
| 50 | 52 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 131 |
| 130 // http://www.whatwg.org/specs/web-apps/current-work/#next-input-character | 132 // http://www.whatwg.org/specs/web-apps/current-work/#next-input-character |
| 131 UChar m_nextInputCharacter; | 133 UChar m_nextInputCharacter; |
| 132 bool m_skipNextNewLine; | 134 bool m_skipNextNewLine; |
| 133 }; | 135 }; |
| 134 | 136 |
| 135 } | 137 } |
| 136 | 138 |
| 137 #endif // InputStreamPreprocessor_h | 139 #endif // InputStreamPreprocessor_h |
| 138 | 140 |
| OLD | NEW |