| 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, 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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 if (token->name() == htmlTag) { | 541 if (token->name() == htmlTag) { |
| 542 processHtmlStartTagForInBody(token); | 542 processHtmlStartTagForInBody(token); |
| 543 return; | 543 return; |
| 544 } | 544 } |
| 545 if (token->name() == baseTag || token->name() == basefontTag || | 545 if (token->name() == baseTag || token->name() == basefontTag || |
| 546 token->name() == bgsoundTag || token->name() == commandTag || | 546 token->name() == bgsoundTag || token->name() == commandTag || |
| 547 token->name() == linkTag || token->name() == metaTag || | 547 token->name() == linkTag || token->name() == metaTag || |
| 548 token->name() == noframesTag || token->name() == scriptTag || | 548 token->name() == noframesTag || token->name() == scriptTag || |
| 549 token->name() == styleTag || token->name() == titleTag) { | 549 token->name() == styleTag || token->name() == titleTag) { |
| 550 bool didProcess = processStartTagForInHead(token); | 550 bool didProcess = processStartTagForInHead(token); |
| 551 ASSERT_UNUSED(didProcess, didProcess); | 551 DCHECK(didProcess); |
| 552 return; | 552 return; |
| 553 } | 553 } |
| 554 if (token->name() == bodyTag) { | 554 if (token->name() == bodyTag) { |
| 555 parseError(token); | 555 parseError(token); |
| 556 if (!m_tree.openElements()->secondElementIsHTMLBodyElement() || | 556 if (!m_tree.openElements()->secondElementIsHTMLBodyElement() || |
| 557 m_tree.openElements()->hasOnlyOneElement() || | 557 m_tree.openElements()->hasOnlyOneElement() || |
| 558 m_tree.openElements()->hasTemplateInHTMLScope()) { | 558 m_tree.openElements()->hasTemplateInHTMLScope()) { |
| 559 ASSERT(isParsingFragmentOrTemplateContents()); | 559 ASSERT(isParsingFragmentOrTemplateContents()); |
| 560 return; | 560 return; |
| 561 } | 561 } |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1191 case InHeadNoscriptMode: | 1191 case InHeadNoscriptMode: |
| 1192 ASSERT(getInsertionMode() == InHeadNoscriptMode); | 1192 ASSERT(getInsertionMode() == InHeadNoscriptMode); |
| 1193 if (token->name() == htmlTag) { | 1193 if (token->name() == htmlTag) { |
| 1194 processHtmlStartTagForInBody(token); | 1194 processHtmlStartTagForInBody(token); |
| 1195 return; | 1195 return; |
| 1196 } | 1196 } |
| 1197 if (token->name() == basefontTag || token->name() == bgsoundTag || | 1197 if (token->name() == basefontTag || token->name() == bgsoundTag || |
| 1198 token->name() == linkTag || token->name() == metaTag || | 1198 token->name() == linkTag || token->name() == metaTag || |
| 1199 token->name() == noframesTag || token->name() == styleTag) { | 1199 token->name() == noframesTag || token->name() == styleTag) { |
| 1200 bool didProcess = processStartTagForInHead(token); | 1200 bool didProcess = processStartTagForInHead(token); |
| 1201 ASSERT_UNUSED(didProcess, didProcess); | 1201 DCHECK(didProcess); |
| 1202 return; | 1202 return; |
| 1203 } | 1203 } |
| 1204 if (token->name() == htmlTag || token->name() == noscriptTag) { | 1204 if (token->name() == htmlTag || token->name() == noscriptTag) { |
| 1205 parseError(token); | 1205 parseError(token); |
| 1206 return; | 1206 return; |
| 1207 } | 1207 } |
| 1208 defaultForInHeadNoscript(); | 1208 defaultForInHeadNoscript(); |
| 1209 processToken(token); | 1209 processToken(token); |
| 1210 break; | 1210 break; |
| 1211 case InFramesetMode: | 1211 case InFramesetMode: |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1299 ASSERT(isParsingFragment()); | 1299 ASSERT(isParsingFragment()); |
| 1300 return; | 1300 return; |
| 1301 } | 1301 } |
| 1302 AtomicHTMLToken endSelect(HTMLToken::EndTag, selectTag.localName()); | 1302 AtomicHTMLToken endSelect(HTMLToken::EndTag, selectTag.localName()); |
| 1303 processEndTag(&endSelect); | 1303 processEndTag(&endSelect); |
| 1304 processStartTag(token); | 1304 processStartTag(token); |
| 1305 return; | 1305 return; |
| 1306 } | 1306 } |
| 1307 if (token->name() == scriptTag) { | 1307 if (token->name() == scriptTag) { |
| 1308 bool didProcess = processStartTagForInHead(token); | 1308 bool didProcess = processStartTagForInHead(token); |
| 1309 ASSERT_UNUSED(didProcess, didProcess); | 1309 DCHECK(didProcess); |
| 1310 return; | 1310 return; |
| 1311 } | 1311 } |
| 1312 if (token->name() == templateTag) { | 1312 if (token->name() == templateTag) { |
| 1313 processTemplateStartTag(token); | 1313 processTemplateStartTag(token); |
| 1314 return; | 1314 return; |
| 1315 } | 1315 } |
| 1316 break; | 1316 break; |
| 1317 case InTableTextMode: | 1317 case InTableTextMode: |
| 1318 defaultForInTableText(); | 1318 defaultForInTableText(); |
| 1319 processStartTag(token); | 1319 processStartTag(token); |
| (...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2755 DEFINE_STRINGIFY(AfterFramesetMode) | 2755 DEFINE_STRINGIFY(AfterFramesetMode) |
| 2756 DEFINE_STRINGIFY(AfterAfterBodyMode) | 2756 DEFINE_STRINGIFY(AfterAfterBodyMode) |
| 2757 DEFINE_STRINGIFY(AfterAfterFramesetMode) | 2757 DEFINE_STRINGIFY(AfterAfterFramesetMode) |
| 2758 #undef DEFINE_STRINGIFY | 2758 #undef DEFINE_STRINGIFY |
| 2759 } | 2759 } |
| 2760 return "<unknown>"; | 2760 return "<unknown>"; |
| 2761 } | 2761 } |
| 2762 #endif | 2762 #endif |
| 2763 | 2763 |
| 2764 } // namespace blink | 2764 } // namespace blink |
| OLD | NEW |