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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
3 * Copyright (C) 2011, 2014 Apple Inc. All rights reserved. 3 * Copyright (C) 2011, 2014 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 2784 matching lines...) Expand 10 before | Expand all | Expand 10 after
2795 ASSERT(m_templateInsertionModes.isEmpty()); 2795 ASSERT(m_templateInsertionModes.isEmpty());
2796 ASSERT(m_isAttached); 2796 ASSERT(m_isAttached);
2797 // Warning, this may detach the parser. Do not do anything else after this. 2797 // Warning, this may detach the parser. Do not do anything else after this.
2798 m_tree.finishedParsing(); 2798 m_tree.finishedParsing();
2799 } 2799 }
2800 2800
2801 void HTMLTreeBuilder::parseError(AtomicHTMLToken*) 2801 void HTMLTreeBuilder::parseError(AtomicHTMLToken*)
2802 { 2802 {
2803 } 2803 }
2804 2804
2805 #ifndef NDEBUG
2806 const char* HTMLTreeBuilder::toString(HTMLTreeBuilder::InsertionMode mode)
2807 {
2808 switch (mode) {
2809 #define DEFINE_STRINGIFY(mode) case mode: return #mode;
2810 DEFINE_STRINGIFY(InitialMode)
2811 DEFINE_STRINGIFY(BeforeHTMLMode)
2812 DEFINE_STRINGIFY(BeforeHeadMode)
2813 DEFINE_STRINGIFY(InHeadMode)
2814 DEFINE_STRINGIFY(InHeadNoscriptMode)
2815 DEFINE_STRINGIFY(AfterHeadMode)
2816 DEFINE_STRINGIFY(TemplateContentsMode)
2817 DEFINE_STRINGIFY(InBodyMode)
2818 DEFINE_STRINGIFY(TextMode)
2819 DEFINE_STRINGIFY(InTableMode)
2820 DEFINE_STRINGIFY(InTableTextMode)
2821 DEFINE_STRINGIFY(InCaptionMode)
2822 DEFINE_STRINGIFY(InColumnGroupMode)
2823 DEFINE_STRINGIFY(InTableBodyMode)
2824 DEFINE_STRINGIFY(InRowMode)
2825 DEFINE_STRINGIFY(InCellMode)
2826 DEFINE_STRINGIFY(InSelectMode)
2827 DEFINE_STRINGIFY(InSelectInTableMode)
2828 DEFINE_STRINGIFY(AfterBodyMode)
2829 DEFINE_STRINGIFY(InFramesetMode)
2830 DEFINE_STRINGIFY(AfterFramesetMode)
2831 DEFINE_STRINGIFY(AfterAfterBodyMode)
2832 DEFINE_STRINGIFY(AfterAfterFramesetMode)
2833 #undef DEFINE_STRINGIFY
2834 }
2835 return "<unknown>";
2836 }
2837 #endif
2838
2805 } // namespace blink 2839 } // namespace blink
OLDNEW
« 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