| 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 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 if (!m_tree.openElements()->secondElementIsHTMLBodyElement() || m_tree.o
penElements()->hasOnlyOneElement()) { | 667 if (!m_tree.openElements()->secondElementIsHTMLBodyElement() || m_tree.o
penElements()->hasOnlyOneElement()) { |
| 668 ASSERT(isParsingFragmentOrTemplateContents()); | 668 ASSERT(isParsingFragmentOrTemplateContents()); |
| 669 return; | 669 return; |
| 670 } | 670 } |
| 671 if (!m_framesetOk) | 671 if (!m_framesetOk) |
| 672 return; | 672 return; |
| 673 m_tree.openElements()->bodyElement()->remove(ASSERT_NO_EXCEPTION); | 673 m_tree.openElements()->bodyElement()->remove(ASSERT_NO_EXCEPTION); |
| 674 m_tree.openElements()->popUntil(m_tree.openElements()->bodyElement()); | 674 m_tree.openElements()->popUntil(m_tree.openElements()->bodyElement()); |
| 675 m_tree.openElements()->popHTMLBodyElement(); | 675 m_tree.openElements()->popHTMLBodyElement(); |
| 676 ASSERT(m_tree.openElements()->top() == m_tree.openElements()->htmlElemen
t()); | 676 ASSERT(m_tree.openElements()->top() == m_tree.openElements()->htmlElemen
t()); |
| 677 m_tree.insertHTMLElement(token); | 677 m_tree.insertHTMLFramesetElement(token); |
| 678 setInsertionMode(InFramesetMode); | 678 setInsertionMode(InFramesetMode); |
| 679 return; | 679 return; |
| 680 } | 680 } |
| 681 if (token->name() == addressTag | 681 if (token->name() == addressTag |
| 682 || token->name() == articleTag | 682 || token->name() == articleTag |
| 683 || token->name() == asideTag | 683 || token->name() == asideTag |
| 684 || token->name() == blockquoteTag | 684 || token->name() == blockquoteTag |
| 685 || token->name() == centerTag | 685 || token->name() == centerTag |
| 686 || token->name() == detailsTag | 686 || token->name() == detailsTag |
| 687 || token->name() == dirTag | 687 || token->name() == dirTag |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1121 processHtmlStartTagForInBody(token); | 1121 processHtmlStartTagForInBody(token); |
| 1122 return; | 1122 return; |
| 1123 } | 1123 } |
| 1124 if (token->name() == bodyTag) { | 1124 if (token->name() == bodyTag) { |
| 1125 m_framesetOk = false; | 1125 m_framesetOk = false; |
| 1126 m_tree.insertHTMLBodyElement(token); | 1126 m_tree.insertHTMLBodyElement(token); |
| 1127 setInsertionMode(InBodyMode); | 1127 setInsertionMode(InBodyMode); |
| 1128 return; | 1128 return; |
| 1129 } | 1129 } |
| 1130 if (token->name() == framesetTag) { | 1130 if (token->name() == framesetTag) { |
| 1131 m_tree.insertHTMLElement(token); | 1131 m_tree.insertHTMLFramesetElement(token); |
| 1132 setInsertionMode(InFramesetMode); | 1132 setInsertionMode(InFramesetMode); |
| 1133 return; | 1133 return; |
| 1134 } | 1134 } |
| 1135 if (token->name() == baseTag | 1135 if (token->name() == baseTag |
| 1136 || token->name() == basefontTag | 1136 || token->name() == basefontTag |
| 1137 || token->name() == bgsoundTag | 1137 || token->name() == bgsoundTag |
| 1138 || token->name() == linkTag | 1138 || token->name() == linkTag |
| 1139 || token->name() == metaTag | 1139 || token->name() == metaTag |
| 1140 || token->name() == noframesTag | 1140 || token->name() == noframesTag |
| 1141 || token->name() == scriptTag | 1141 || token->name() == scriptTag |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 defaultForInHeadNoscript(); | 1301 defaultForInHeadNoscript(); |
| 1302 processToken(token); | 1302 processToken(token); |
| 1303 break; | 1303 break; |
| 1304 case InFramesetMode: | 1304 case InFramesetMode: |
| 1305 ASSERT(insertionMode() == InFramesetMode); | 1305 ASSERT(insertionMode() == InFramesetMode); |
| 1306 if (token->name() == htmlTag) { | 1306 if (token->name() == htmlTag) { |
| 1307 processHtmlStartTagForInBody(token); | 1307 processHtmlStartTagForInBody(token); |
| 1308 return; | 1308 return; |
| 1309 } | 1309 } |
| 1310 if (token->name() == framesetTag) { | 1310 if (token->name() == framesetTag) { |
| 1311 m_tree.insertHTMLElement(token); | 1311 m_tree.insertHTMLFramesetElement(token); |
| 1312 return; | 1312 return; |
| 1313 } | 1313 } |
| 1314 if (token->name() == frameTag) { | 1314 if (token->name() == frameTag) { |
| 1315 m_tree.insertSelfClosingHTMLElement(token); | 1315 m_tree.insertSelfClosingHTMLElement(token); |
| 1316 return; | 1316 return; |
| 1317 } | 1317 } |
| 1318 if (token->name() == noframesTag) { | 1318 if (token->name() == noframesTag) { |
| 1319 processStartTagForInHead(token); | 1319 processStartTagForInHead(token); |
| 1320 return; | 1320 return; |
| 1321 } | 1321 } |
| (...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2807 ASSERT(m_isAttached); | 2807 ASSERT(m_isAttached); |
| 2808 // Warning, this may detach the parser. Do not do anything else after this. | 2808 // Warning, this may detach the parser. Do not do anything else after this. |
| 2809 m_tree.finishedParsing(); | 2809 m_tree.finishedParsing(); |
| 2810 } | 2810 } |
| 2811 | 2811 |
| 2812 void HTMLTreeBuilder::parseError(AtomicHTMLToken*) | 2812 void HTMLTreeBuilder::parseError(AtomicHTMLToken*) |
| 2813 { | 2813 { |
| 2814 } | 2814 } |
| 2815 | 2815 |
| 2816 } | 2816 } |
| OLD | NEW |