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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 RefPtr<StringImpl> m_characters; | 260 RefPtr<StringImpl> m_characters; |
261 unsigned m_current; | 261 unsigned m_current; |
262 unsigned m_end; | 262 unsigned m_end; |
263 }; | 263 }; |
264 | 264 |
265 HTMLTreeBuilder::HTMLTreeBuilder(HTMLDocumentParser* parser, Document& document,
ParserContentPolicy parserContentPolicy, const HTMLParserOptions& options) | 265 HTMLTreeBuilder::HTMLTreeBuilder(HTMLDocumentParser* parser, Document& document,
ParserContentPolicy parserContentPolicy, const HTMLParserOptions& options) |
266 : m_framesetOk(true) | 266 : m_framesetOk(true) |
267 #if ENABLE(ASSERT) | 267 #if ENABLE(ASSERT) |
268 , m_isAttached(true) | 268 , m_isAttached(true) |
269 #endif | 269 #endif |
270 , m_tree(document, parserContentPolicy) | 270 , m_tree(parser->reentryPermit(), document, parserContentPolicy) |
271 , m_insertionMode(InitialMode) | 271 , m_insertionMode(InitialMode) |
272 , m_originalInsertionMode(InitialMode) | 272 , m_originalInsertionMode(InitialMode) |
273 , m_shouldSkipLeadingNewline(false) | 273 , m_shouldSkipLeadingNewline(false) |
274 , m_parser(parser) | 274 , m_parser(parser) |
275 , m_scriptToProcessStartPosition(uninitializedPositionValue1()) | 275 , m_scriptToProcessStartPosition(uninitializedPositionValue1()) |
276 , m_options(options) | 276 , m_options(options) |
277 { | 277 { |
278 } | 278 } |
279 | 279 |
280 HTMLTreeBuilder::HTMLTreeBuilder(HTMLDocumentParser* parser, DocumentFragment* f
ragment, Element* contextElement, ParserContentPolicy parserContentPolicy, const
HTMLParserOptions& options) | 280 HTMLTreeBuilder::HTMLTreeBuilder(HTMLDocumentParser* parser, DocumentFragment* f
ragment, Element* contextElement, ParserContentPolicy parserContentPolicy, const
HTMLParserOptions& options) |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 { | 319 { |
320 visitor->trace(m_fragmentContext); | 320 visitor->trace(m_fragmentContext); |
321 visitor->trace(m_tree); | 321 visitor->trace(m_tree); |
322 visitor->trace(m_parser); | 322 visitor->trace(m_parser); |
323 visitor->trace(m_scriptToProcess); | 323 visitor->trace(m_scriptToProcess); |
324 } | 324 } |
325 | 325 |
326 void HTMLTreeBuilder::detach() | 326 void HTMLTreeBuilder::detach() |
327 { | 327 { |
328 #if ENABLE(ASSERT) | 328 #if ENABLE(ASSERT) |
329 // This call makes little sense in fragment mode, but for consistency | 329 // This call makes little sense in fragment mode, but for |
330 // DocumentParser expects detach() to always be called before it's destroyed
. | 330 // consistency DocumentParser expects detach() to always be called |
| 331 // before it's destroyed. |
331 m_isAttached = false; | 332 m_isAttached = false; |
332 #endif | 333 #endif |
333 // HTMLConstructionSite might be on the callstack when detach() is called | 334 // HTMLConstructionSite might be on the callstack when detach() is called |
334 // otherwise we'd just call m_tree.clear() here instead. | 335 // otherwise we'd just call m_tree.clear() here instead. |
335 m_tree.detach(); | 336 m_tree.detach(); |
336 } | 337 } |
337 | 338 |
338 Element* HTMLTreeBuilder::takeScriptToProcess(TextPosition& scriptStartPosition) | 339 Element* HTMLTreeBuilder::takeScriptToProcess(TextPosition& scriptStartPosition) |
339 { | 340 { |
340 ASSERT(m_scriptToProcess); | 341 ASSERT(m_scriptToProcess); |
(...skipping 2488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2829 DEFINE_STRINGIFY(AfterFramesetMode) | 2830 DEFINE_STRINGIFY(AfterFramesetMode) |
2830 DEFINE_STRINGIFY(AfterAfterBodyMode) | 2831 DEFINE_STRINGIFY(AfterAfterBodyMode) |
2831 DEFINE_STRINGIFY(AfterAfterFramesetMode) | 2832 DEFINE_STRINGIFY(AfterAfterFramesetMode) |
2832 #undef DEFINE_STRINGIFY | 2833 #undef DEFINE_STRINGIFY |
2833 } | 2834 } |
2834 return "<unknown>"; | 2835 return "<unknown>"; |
2835 } | 2836 } |
2836 #endif | 2837 #endif |
2837 | 2838 |
2838 } // namespace blink | 2839 } // namespace blink |
OLD | NEW |