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 2072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2083 return; | 2083 return; |
2084 } | 2084 } |
2085 if (token->name() != brTag) { | 2085 if (token->name() != brTag) { |
2086 parseError(token); | 2086 parseError(token); |
2087 return; | 2087 return; |
2088 } | 2088 } |
2089 defaultForInHeadNoscript(); | 2089 defaultForInHeadNoscript(); |
2090 processToken(token); | 2090 processToken(token); |
2091 break; | 2091 break; |
2092 case TextMode: | 2092 case TextMode: |
2093 if (token->name() == scriptTag) { | 2093 if (token->name() == scriptTag && m_tree.currentStackItem()->hasTagName(
scriptTag)) { |
2094 // Pause ourselves so that parsing stops until the script can be pro
cessed by the caller. | 2094 // Pause ourselves so that parsing stops until the script can be pro
cessed by the caller. |
2095 ASSERT(m_tree.currentStackItem()->hasTagName(scriptTag)); | |
2096 if (scriptingContentIsAllowed(m_tree.getParserContentPolicy())) | 2095 if (scriptingContentIsAllowed(m_tree.getParserContentPolicy())) |
2097 m_scriptToProcess = m_tree.currentElement(); | 2096 m_scriptToProcess = m_tree.currentElement(); |
2098 m_tree.openElements()->pop(); | 2097 m_tree.openElements()->pop(); |
2099 setInsertionMode(m_originalInsertionMode); | 2098 setInsertionMode(m_originalInsertionMode); |
2100 | 2099 |
2101 if (m_parser->tokenizer()) { | 2100 if (m_parser->tokenizer()) { |
2102 // We must set the tokenizer's state to | 2101 // We must set the tokenizer's state to |
2103 // DataState explicitly if the tokenizer didn't have a chance to
. | 2102 // DataState explicitly if the tokenizer didn't have a chance to
. |
2104 m_parser->tokenizer()->setState(HTMLTokenizer::DataState); | 2103 m_parser->tokenizer()->setState(HTMLTokenizer::DataState); |
2105 } | 2104 } |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2830 DEFINE_STRINGIFY(AfterFramesetMode) | 2829 DEFINE_STRINGIFY(AfterFramesetMode) |
2831 DEFINE_STRINGIFY(AfterAfterBodyMode) | 2830 DEFINE_STRINGIFY(AfterAfterBodyMode) |
2832 DEFINE_STRINGIFY(AfterAfterFramesetMode) | 2831 DEFINE_STRINGIFY(AfterAfterFramesetMode) |
2833 #undef DEFINE_STRINGIFY | 2832 #undef DEFINE_STRINGIFY |
2834 } | 2833 } |
2835 return "<unknown>"; | 2834 return "<unknown>"; |
2836 } | 2835 } |
2837 #endif | 2836 #endif |
2838 | 2837 |
2839 } // namespace blink | 2838 } // namespace blink |
OLD | NEW |