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

Side by Side Diff: sky/engine/core/html/parser/MarkupTokenizerInlines.h

Issue 722723003: Re-land 714393002 after fixing android build. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/dom/ElementData.h ('k') | sky/engine/platform/Length.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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) 2010 Google, Inc. All Rights Reserved. 4 * Copyright (C) 2010 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 while (*expectedCharacters) 53 while (*expectedCharacters)
54 source.advanceAndASSERTIgnoringCase(*expectedCharacters++); 54 source.advanceAndASSERTIgnoringCase(*expectedCharacters++);
55 } 55 }
56 56
57 inline void advanceStringAndASSERT(SegmentedString& source, const char* expected Characters) 57 inline void advanceStringAndASSERT(SegmentedString& source, const char* expected Characters)
58 { 58 {
59 while (*expectedCharacters) 59 while (*expectedCharacters)
60 source.advanceAndASSERT(*expectedCharacters++); 60 source.advanceAndASSERT(*expectedCharacters++);
61 } 61 }
62 62
63 #if COMPILER(MSVC)
64 // We need to disable the "unreachable code" warning because we want to assert
65 // that some code points aren't reached in the state machine.
66 #pragma warning(disable: 4702)
67 #endif
68
69 #define BEGIN_STATE(prefix, stateName) case prefix::stateName: stateName: 63 #define BEGIN_STATE(prefix, stateName) case prefix::stateName: stateName:
70 #define END_STATE() ASSERT_NOT_REACHED(); break; 64 #define END_STATE() ASSERT_NOT_REACHED(); break;
71 65
72 // We use this macro when the HTML5 spec says "reconsume the current input 66 // We use this macro when the HTML5 spec says "reconsume the current input
73 // character in the <mumble> state." 67 // character in the <mumble> state."
74 #define RECONSUME_IN(prefix, stateName) \ 68 #define RECONSUME_IN(prefix, stateName) \
75 do { \ 69 do { \
76 m_state = prefix::stateName; \ 70 m_state = prefix::stateName; \
77 goto stateName; \ 71 goto stateName; \
78 } while (false) 72 } while (false)
(...skipping 18 matching lines...) Expand all
97 m_state = prefix::stateName; \ 91 m_state = prefix::stateName; \
98 if (source.isEmpty() || !m_inputStreamPreprocessor.peek(source)) \ 92 if (source.isEmpty() || !m_inputStreamPreprocessor.peek(source)) \
99 return haveBufferedCharacterToken(); \ 93 return haveBufferedCharacterToken(); \
100 cc = m_inputStreamPreprocessor.nextInputCharacter(); \ 94 cc = m_inputStreamPreprocessor.nextInputCharacter(); \
101 goto stateName; \ 95 goto stateName; \
102 } while (false) 96 } while (false)
103 97
104 } 98 }
105 99
106 #endif // MarkupTokenizerInlines_h 100 #endif // MarkupTokenizerInlines_h
OLDNEW
« no previous file with comments | « sky/engine/core/dom/ElementData.h ('k') | sky/engine/platform/Length.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698