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

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

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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
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
11 * notice, this list of conditions and the following disclaimer in the 11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution. 12 * documentation and/or other materials provided with the distribution.
13 * 13 *
14 * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY 14 * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY
15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. OR 17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. OR
18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #include "core/html/parser/HTMLTreeBuilder.h" 27 #include "core/html/parser/HTMLTreeBuilder.h"
28 28
29 #include <memory>
29 #include "bindings/core/v8/ExceptionState.h" 30 #include "bindings/core/v8/ExceptionState.h"
30 #include "core/HTMLNames.h" 31 #include "core/HTMLNames.h"
31 #include "core/MathMLNames.h" 32 #include "core/MathMLNames.h"
32 #include "core/SVGNames.h" 33 #include "core/SVGNames.h"
33 #include "core/XLinkNames.h" 34 #include "core/XLinkNames.h"
34 #include "core/XMLNSNames.h" 35 #include "core/XMLNSNames.h"
35 #include "core/XMLNames.h" 36 #include "core/XMLNames.h"
36 #include "core/dom/Document.h" 37 #include "core/dom/Document.h"
37 #include "core/dom/DocumentFragment.h" 38 #include "core/dom/DocumentFragment.h"
38 #include "core/dom/ElementTraversal.h" 39 #include "core/dom/ElementTraversal.h"
39 #include "core/frame/UseCounter.h" 40 #include "core/frame/UseCounter.h"
40 #include "core/html/HTMLFormControlElement.h" 41 #include "core/html/HTMLFormControlElement.h"
41 #include "core/html/HTMLFormElement.h" 42 #include "core/html/HTMLFormElement.h"
42 #include "core/html/HTMLTemplateElement.h" 43 #include "core/html/HTMLTemplateElement.h"
43 #include "core/html/parser/AtomicHTMLToken.h" 44 #include "core/html/parser/AtomicHTMLToken.h"
44 #include "core/html/parser/HTMLDocumentParser.h" 45 #include "core/html/parser/HTMLDocumentParser.h"
45 #include "core/html/parser/HTMLParserIdioms.h" 46 #include "core/html/parser/HTMLParserIdioms.h"
46 #include "core/html/parser/HTMLStackItem.h" 47 #include "core/html/parser/HTMLStackItem.h"
47 #include "core/html/parser/HTMLToken.h" 48 #include "core/html/parser/HTMLToken.h"
48 #include "core/html/parser/HTMLTokenizer.h" 49 #include "core/html/parser/HTMLTokenizer.h"
49 #include "platform/text/PlatformLocale.h" 50 #include "platform/text/PlatformLocale.h"
50 #include "wtf/text/CharacterNames.h" 51 #include "wtf/text/CharacterNames.h"
51 #include <memory>
52 52
53 namespace blink { 53 namespace blink {
54 54
55 using namespace HTMLNames; 55 using namespace HTMLNames;
56 56
57 namespace { 57 namespace {
58 58
59 inline bool isHTMLSpaceOrReplacementCharacter(UChar character) { 59 inline bool isHTMLSpaceOrReplacementCharacter(UChar character) {
60 return isHTMLSpace<UChar>(character) || character == replacementCharacter; 60 return isHTMLSpace<UChar>(character) || character == replacementCharacter;
61 } 61 }
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 Document& document, 219 Document& document,
220 ParserContentPolicy parserContentPolicy, 220 ParserContentPolicy parserContentPolicy,
221 const HTMLParserOptions& options) 221 const HTMLParserOptions& options)
222 : m_framesetOk(true), 222 : m_framesetOk(true),
223 m_tree(parser->reentryPermit(), document, parserContentPolicy), 223 m_tree(parser->reentryPermit(), document, parserContentPolicy),
224 m_insertionMode(InitialMode), 224 m_insertionMode(InitialMode),
225 m_originalInsertionMode(InitialMode), 225 m_originalInsertionMode(InitialMode),
226 m_shouldSkipLeadingNewline(false), 226 m_shouldSkipLeadingNewline(false),
227 m_parser(parser), 227 m_parser(parser),
228 m_scriptToProcessStartPosition(uninitializedPositionValue1()), 228 m_scriptToProcessStartPosition(uninitializedPositionValue1()),
229 m_options(options) { 229 m_options(options) {}
230 }
231 230
232 HTMLTreeBuilder::HTMLTreeBuilder(HTMLDocumentParser* parser, 231 HTMLTreeBuilder::HTMLTreeBuilder(HTMLDocumentParser* parser,
233 DocumentFragment* fragment, 232 DocumentFragment* fragment,
234 Element* contextElement, 233 Element* contextElement,
235 ParserContentPolicy parserContentPolicy, 234 ParserContentPolicy parserContentPolicy,
236 const HTMLParserOptions& options) 235 const HTMLParserOptions& options)
237 : HTMLTreeBuilder(parser, 236 : HTMLTreeBuilder(parser,
238 fragment->document(), 237 fragment->document(),
239 parserContentPolicy, 238 parserContentPolicy,
240 options) { 239 options) {
(...skipping 2514 matching lines...) Expand 10 before | Expand all | Expand 10 after
2755 DEFINE_STRINGIFY(AfterFramesetMode) 2754 DEFINE_STRINGIFY(AfterFramesetMode)
2756 DEFINE_STRINGIFY(AfterAfterBodyMode) 2755 DEFINE_STRINGIFY(AfterAfterBodyMode)
2757 DEFINE_STRINGIFY(AfterAfterFramesetMode) 2756 DEFINE_STRINGIFY(AfterAfterFramesetMode)
2758 #undef DEFINE_STRINGIFY 2757 #undef DEFINE_STRINGIFY
2759 } 2758 }
2760 return "<unknown>"; 2759 return "<unknown>";
2761 } 2760 }
2762 #endif 2761 #endif
2763 2762
2764 } // namespace blink 2763 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698