Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: Source/core/html/parser/HTMLTreeBuilder.cpp

Issue 932403002: InlinedVisitor: Migrate html to use inlined tracing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/parser/HTMLTreeBuilder.h ('k') | Source/core/html/parser/XSSAuditorDelegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 m_templateInsertionModes.append(TemplateContentsMode); 307 m_templateInsertionModes.append(TemplateContentsMode);
308 308
309 resetInsertionModeAppropriately(); 309 resetInsertionModeAppropriately();
310 m_tree.setForm(closestFormAncestor(*contextElement)); 310 m_tree.setForm(closestFormAncestor(*contextElement));
311 } 311 }
312 312
313 HTMLTreeBuilder::~HTMLTreeBuilder() 313 HTMLTreeBuilder::~HTMLTreeBuilder()
314 { 314 {
315 } 315 }
316 316
317 void HTMLTreeBuilder::trace(Visitor* visitor) 317 DEFINE_TRACE(HTMLTreeBuilder)
318 { 318 {
319 visitor->trace(m_fragmentContext); 319 visitor->trace(m_fragmentContext);
320 visitor->trace(m_tree); 320 visitor->trace(m_tree);
321 visitor->trace(m_parser); 321 visitor->trace(m_parser);
322 visitor->trace(m_scriptToProcess); 322 visitor->trace(m_scriptToProcess);
323 } 323 }
324 324
325 void HTMLTreeBuilder::detach() 325 void HTMLTreeBuilder::detach()
326 { 326 {
327 #if ENABLE(ASSERT) 327 #if ENABLE(ASSERT)
(...skipping 15 matching lines...) Expand all
343 : m_fragment(fragment) 343 : m_fragment(fragment)
344 { 344 {
345 ASSERT(!fragment->hasChildren()); 345 ASSERT(!fragment->hasChildren());
346 m_contextElementStackItem = HTMLStackItem::create(contextElement, HTMLStackI tem::ItemForContextElement); 346 m_contextElementStackItem = HTMLStackItem::create(contextElement, HTMLStackI tem::ItemForContextElement);
347 } 347 }
348 348
349 HTMLTreeBuilder::FragmentParsingContext::~FragmentParsingContext() 349 HTMLTreeBuilder::FragmentParsingContext::~FragmentParsingContext()
350 { 350 {
351 } 351 }
352 352
353 void HTMLTreeBuilder::FragmentParsingContext::trace(Visitor* visitor) 353 DEFINE_TRACE(HTMLTreeBuilder::FragmentParsingContext)
354 { 354 {
355 visitor->trace(m_fragment); 355 visitor->trace(m_fragment);
356 visitor->trace(m_contextElementStackItem); 356 visitor->trace(m_contextElementStackItem);
357 } 357 }
358 358
359 PassRefPtrWillBeRawPtr<Element> HTMLTreeBuilder::takeScriptToProcess(TextPositio n& scriptStartPosition) 359 PassRefPtrWillBeRawPtr<Element> HTMLTreeBuilder::takeScriptToProcess(TextPositio n& scriptStartPosition)
360 { 360 {
361 ASSERT(m_scriptToProcess); 361 ASSERT(m_scriptToProcess);
362 ASSERT(!m_tree.hasPendingTasks()); 362 ASSERT(!m_tree.hasPendingTasks());
363 // Unpause ourselves, callers may pause us again when processing the script. 363 // Unpause ourselves, callers may pause us again when processing the script.
(...skipping 2440 matching lines...) Expand 10 before | Expand all | Expand 10 after
2804 ASSERT(m_isAttached); 2804 ASSERT(m_isAttached);
2805 // Warning, this may detach the parser. Do not do anything else after this. 2805 // Warning, this may detach the parser. Do not do anything else after this.
2806 m_tree.finishedParsing(); 2806 m_tree.finishedParsing();
2807 } 2807 }
2808 2808
2809 void HTMLTreeBuilder::parseError(AtomicHTMLToken*) 2809 void HTMLTreeBuilder::parseError(AtomicHTMLToken*)
2810 { 2810 {
2811 } 2811 }
2812 2812
2813 } // namespace blink 2813 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLTreeBuilder.h ('k') | Source/core/html/parser/XSSAuditorDelegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698