| 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 29 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
| 30 #include "core/HTMLNames.h" | 30 #include "core/HTMLNames.h" |
| 31 #include "core/MathMLNames.h" | 31 #include "core/MathMLNames.h" |
| 32 #include "core/SVGNames.h" | 32 #include "core/SVGNames.h" |
| 33 #include "core/XLinkNames.h" | 33 #include "core/XLinkNames.h" |
| 34 #include "core/XMLNSNames.h" | 34 #include "core/XMLNSNames.h" |
| 35 #include "core/XMLNames.h" | 35 #include "core/XMLNames.h" |
| 36 #include "core/dom/DocumentFragment.h" | 36 #include "core/dom/DocumentFragment.h" |
| 37 #include "core/dom/ElementTraversal.h" | 37 #include "core/dom/ElementTraversal.h" |
| 38 #include "core/frame/UseCounter.h" |
| 38 #include "core/html/HTMLDocument.h" | 39 #include "core/html/HTMLDocument.h" |
| 39 #include "core/html/HTMLFormElement.h" | 40 #include "core/html/HTMLFormElement.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 "platform/NotImplemented.h" | 47 #include "platform/NotImplemented.h" |
| 47 #include "platform/text/PlatformLocale.h" | 48 #include "platform/text/PlatformLocale.h" |
| (...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1460 return false; | 1461 return false; |
| 1461 } | 1462 } |
| 1462 notImplemented(); // Emit a more specific parse error based on stack content
s. | 1463 notImplemented(); // Emit a more specific parse error based on stack content
s. |
| 1463 setInsertionMode(AfterBodyMode); | 1464 setInsertionMode(AfterBodyMode); |
| 1464 return true; | 1465 return true; |
| 1465 } | 1466 } |
| 1466 | 1467 |
| 1467 void HTMLTreeBuilder::processAnyOtherEndTagForInBody(AtomicHTMLToken* token) | 1468 void HTMLTreeBuilder::processAnyOtherEndTagForInBody(AtomicHTMLToken* token) |
| 1468 { | 1469 { |
| 1469 ASSERT(token->type() == HTMLToken::EndTag); | 1470 ASSERT(token->type() == HTMLToken::EndTag); |
| 1471 if (token->name() == menuitemTag) |
| 1472 UseCounter::count(m_tree.currentNode()->document(), UseCounter::MenuItem
CloseTag); |
| 1470 HTMLElementStack::ElementRecord* record = m_tree.openElements()->topRecord()
; | 1473 HTMLElementStack::ElementRecord* record = m_tree.openElements()->topRecord()
; |
| 1471 while (1) { | 1474 while (1) { |
| 1472 RefPtrWillBeRawPtr<HTMLStackItem> item = record->stackItem(); | 1475 RefPtrWillBeRawPtr<HTMLStackItem> item = record->stackItem(); |
| 1473 if (item->matchesHTMLTag(token->name())) { | 1476 if (item->matchesHTMLTag(token->name())) { |
| 1474 m_tree.generateImpliedEndTagsWithExclusion(token->name()); | 1477 m_tree.generateImpliedEndTagsWithExclusion(token->name()); |
| 1475 if (!m_tree.currentStackItem()->matchesHTMLTag(token->name())) | 1478 if (!m_tree.currentStackItem()->matchesHTMLTag(token->name())) |
| 1476 parseError(token); | 1479 parseError(token); |
| 1477 m_tree.openElements()->popUntilPopped(item->element()); | 1480 m_tree.openElements()->popUntilPopped(item->element()); |
| 1478 return; | 1481 return; |
| 1479 } | 1482 } |
| (...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2809 ASSERT(m_isAttached); | 2812 ASSERT(m_isAttached); |
| 2810 // Warning, this may detach the parser. Do not do anything else after this. | 2813 // Warning, this may detach the parser. Do not do anything else after this. |
| 2811 m_tree.finishedParsing(); | 2814 m_tree.finishedParsing(); |
| 2812 } | 2815 } |
| 2813 | 2816 |
| 2814 void HTMLTreeBuilder::parseError(AtomicHTMLToken*) | 2817 void HTMLTreeBuilder::parseError(AtomicHTMLToken*) |
| 2815 { | 2818 { |
| 2816 } | 2819 } |
| 2817 | 2820 |
| 2818 } // namespace blink | 2821 } // namespace blink |
| OLD | NEW |