OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. |
3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 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 17 matching lines...) Expand all Loading... |
28 #include "core/html/parser/HTMLTreeBuilder.h" | 28 #include "core/html/parser/HTMLTreeBuilder.h" |
29 | 29 |
30 #include "HTMLNames.h" | 30 #include "HTMLNames.h" |
31 #include "MathMLNames.h" | 31 #include "MathMLNames.h" |
32 #include "SVGNames.h" | 32 #include "SVGNames.h" |
33 #include "XLinkNames.h" | 33 #include "XLinkNames.h" |
34 #include "XMLNSNames.h" | 34 #include "XMLNSNames.h" |
35 #include "XMLNames.h" | 35 #include "XMLNames.h" |
36 #include "core/dom/DocumentFragment.h" | 36 #include "core/dom/DocumentFragment.h" |
37 #include "core/html/HTMLFormElement.h" | 37 #include "core/html/HTMLFormElement.h" |
| 38 #include "core/html/HTMLHtmlElement.h" |
38 #include "core/html/HTMLOptGroupElement.h" | 39 #include "core/html/HTMLOptGroupElement.h" |
39 #include "core/html/HTMLTableElement.h" | 40 #include "core/html/HTMLTableElement.h" |
40 #include "core/html/parser/AtomicHTMLToken.h" | 41 #include "core/html/parser/AtomicHTMLToken.h" |
41 #include "core/html/parser/HTMLDocumentParser.h" | 42 #include "core/html/parser/HTMLDocumentParser.h" |
42 #include "core/html/parser/HTMLParserIdioms.h" | 43 #include "core/html/parser/HTMLParserIdioms.h" |
43 #include "core/html/parser/HTMLStackItem.h" | 44 #include "core/html/parser/HTMLStackItem.h" |
44 #include "core/html/parser/HTMLToken.h" | 45 #include "core/html/parser/HTMLToken.h" |
45 #include "core/html/parser/HTMLTokenizer.h" | 46 #include "core/html/parser/HTMLTokenizer.h" |
46 #include "core/platform/LocalizedStrings.h" | 47 #include "core/platform/LocalizedStrings.h" |
47 #include "core/platform/NotImplemented.h" | 48 #include "core/platform/NotImplemented.h" |
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1626 if (item->hasTagName(headTag)) { | 1627 if (item->hasTagName(headTag)) { |
1627 if (!m_fragmentContext.fragment() || m_fragmentContext.contextElemen
t() != item->node()) | 1628 if (!m_fragmentContext.fragment() || m_fragmentContext.contextElemen
t() != item->node()) |
1628 return setInsertionMode(InHeadMode); | 1629 return setInsertionMode(InHeadMode); |
1629 return setInsertionMode(InBodyMode); | 1630 return setInsertionMode(InBodyMode); |
1630 } | 1631 } |
1631 if (item->hasTagName(bodyTag)) | 1632 if (item->hasTagName(bodyTag)) |
1632 return setInsertionMode(InBodyMode); | 1633 return setInsertionMode(InBodyMode); |
1633 if (item->hasTagName(framesetTag)) { | 1634 if (item->hasTagName(framesetTag)) { |
1634 return setInsertionMode(InFramesetMode); | 1635 return setInsertionMode(InFramesetMode); |
1635 } | 1636 } |
1636 if (item->hasTagName(htmlTag)) { | 1637 if (isHTMLHtmlElement(item->node())) { |
1637 ASSERT(isParsingFragment()); | 1638 ASSERT(isParsingFragment()); |
1638 return setInsertionMode(BeforeHeadMode); | 1639 return setInsertionMode(BeforeHeadMode); |
1639 } | 1640 } |
1640 if (last) { | 1641 if (last) { |
1641 ASSERT(isParsingFragment()); | 1642 ASSERT(isParsingFragment()); |
1642 return setInsertionMode(InBodyMode); | 1643 return setInsertionMode(InBodyMode); |
1643 } | 1644 } |
1644 nodeRecord = nodeRecord->next(); | 1645 nodeRecord = nodeRecord->next(); |
1645 } | 1646 } |
1646 } | 1647 } |
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2808 ASSERT(m_isAttached); | 2809 ASSERT(m_isAttached); |
2809 // Warning, this may detach the parser. Do not do anything else after this. | 2810 // Warning, this may detach the parser. Do not do anything else after this. |
2810 m_tree.finishedParsing(); | 2811 m_tree.finishedParsing(); |
2811 } | 2812 } |
2812 | 2813 |
2813 void HTMLTreeBuilder::parseError(AtomicHTMLToken*) | 2814 void HTMLTreeBuilder::parseError(AtomicHTMLToken*) |
2814 { | 2815 { |
2815 } | 2816 } |
2816 | 2817 |
2817 } | 2818 } |
OLD | NEW |