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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLTokenizer.cpp

Issue 2717303002: Considering HTMLTokenizer state in HTMLSourceTracker (Closed)
Patch Set: Considering HTMLTokenizer state in HTMLSourceTracker Created 3 years, 9 months 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 | « third_party/WebKit/Source/core/html/parser/HTMLTokenizer.h ('k') | no next file » | 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 const String& string) { 54 const String& string) {
55 if (vector.size() != string.length()) 55 if (vector.size() != string.length())
56 return false; 56 return false;
57 57
58 if (!string.length()) 58 if (!string.length())
59 return true; 59 return true;
60 60
61 return equal(string.impl(), vector.data(), vector.size()); 61 return equal(string.impl(), vector.data(), vector.size());
62 } 62 }
63 63
64 static inline bool isEndTagBufferingState(HTMLTokenizer::State state) {
65 switch (state) {
66 case HTMLTokenizer::RCDATAEndTagOpenState:
67 case HTMLTokenizer::RCDATAEndTagNameState:
68 case HTMLTokenizer::RAWTEXTEndTagOpenState:
69 case HTMLTokenizer::RAWTEXTEndTagNameState:
70 case HTMLTokenizer::ScriptDataEndTagOpenState:
71 case HTMLTokenizer::ScriptDataEndTagNameState:
72 case HTMLTokenizer::ScriptDataEscapedEndTagOpenState:
73 case HTMLTokenizer::ScriptDataEscapedEndTagNameState:
74 return true;
75 default:
76 return false;
77 }
78 }
79
80 #define HTML_BEGIN_STATE(stateName) BEGIN_STATE(HTMLTokenizer, stateName) 64 #define HTML_BEGIN_STATE(stateName) BEGIN_STATE(HTMLTokenizer, stateName)
81 #define HTML_RECONSUME_IN(stateName) RECONSUME_IN(HTMLTokenizer, stateName) 65 #define HTML_RECONSUME_IN(stateName) RECONSUME_IN(HTMLTokenizer, stateName)
82 #define HTML_ADVANCE_TO(stateName) ADVANCE_TO(HTMLTokenizer, stateName) 66 #define HTML_ADVANCE_TO(stateName) ADVANCE_TO(HTMLTokenizer, stateName)
83 #define HTML_SWITCH_TO(stateName) SWITCH_TO(HTMLTokenizer, stateName) 67 #define HTML_SWITCH_TO(stateName) SWITCH_TO(HTMLTokenizer, stateName)
84 68
85 HTMLTokenizer::HTMLTokenizer(const HTMLParserOptions& options) 69 HTMLTokenizer::HTMLTokenizer(const HTMLParserOptions& options)
86 : m_inputStreamPreprocessor(this), m_options(options) { 70 : m_inputStreamPreprocessor(this), m_options(options) {
87 reset(); 71 reset();
88 } 72 }
89 73
(...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after
1581 } 1565 }
1582 1566
1583 return true; 1567 return true;
1584 } 1568 }
1585 1569
1586 inline void HTMLTokenizer::parseError() { 1570 inline void HTMLTokenizer::parseError() {
1587 DVLOG(1) << "Not implemented."; 1571 DVLOG(1) << "Not implemented.";
1588 } 1572 }
1589 1573
1590 } // namespace blink 1574 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/HTMLTokenizer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698