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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp

Issue 2145353002: HTML parser: Add show/toString() debug helper methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
index 7461e3f6a1d48f969a4440d277db8d7950be15de..eeb78031414d74fbce2f4d07947f5caf15b8edbf 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
@@ -2802,4 +2802,38 @@ void HTMLTreeBuilder::parseError(AtomicHTMLToken*)
{
}
+#ifndef NDEBUG
+const char* HTMLTreeBuilder::toString(HTMLTreeBuilder::InsertionMode mode)
+{
+ switch (mode) {
+#define DEFINE_STRINGIFY(mode) case mode: return #mode;
+ DEFINE_STRINGIFY(InitialMode)
+ DEFINE_STRINGIFY(BeforeHTMLMode)
+ DEFINE_STRINGIFY(BeforeHeadMode)
+ DEFINE_STRINGIFY(InHeadMode)
+ DEFINE_STRINGIFY(InHeadNoscriptMode)
+ DEFINE_STRINGIFY(AfterHeadMode)
+ DEFINE_STRINGIFY(TemplateContentsMode)
+ DEFINE_STRINGIFY(InBodyMode)
+ DEFINE_STRINGIFY(TextMode)
+ DEFINE_STRINGIFY(InTableMode)
+ DEFINE_STRINGIFY(InTableTextMode)
+ DEFINE_STRINGIFY(InCaptionMode)
+ DEFINE_STRINGIFY(InColumnGroupMode)
+ DEFINE_STRINGIFY(InTableBodyMode)
+ DEFINE_STRINGIFY(InRowMode)
+ DEFINE_STRINGIFY(InCellMode)
+ DEFINE_STRINGIFY(InSelectMode)
+ DEFINE_STRINGIFY(InSelectInTableMode)
+ DEFINE_STRINGIFY(AfterBodyMode)
+ DEFINE_STRINGIFY(InFramesetMode)
+ DEFINE_STRINGIFY(AfterFramesetMode)
+ DEFINE_STRINGIFY(AfterAfterBodyMode)
+ DEFINE_STRINGIFY(AfterAfterFramesetMode)
+#undef DEFINE_STRINGIFY
+ }
+ return "<unknown>";
+}
+#endif
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698