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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp

Issue 1642283002: Deal with frame removal by content scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Schedule microtask for document_end scripts Created 4 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
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 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 PassRefPtrWillBeRawPtr<HTMLFormElement> HTMLConstructionSite::takeForm() 378 PassRefPtrWillBeRawPtr<HTMLFormElement> HTMLConstructionSite::takeForm()
379 { 379 {
380 return m_form.release(); 380 return m_form.release();
381 } 381 }
382 382
383 void HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded() 383 void HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded()
384 { 384 {
385 ASSERT(m_document); 385 ASSERT(m_document);
386 if (m_document->frame() && !m_isParsingFragment) 386 if (m_document->frame() && !m_isParsingFragment)
387 m_document->frame()->loader().dispatchDocumentElementAvailable(); 387 m_document->frame()->loader().dispatchDocumentElementAvailable();
388 // dispatchDocumentElementAvailable might have invalidated m_document.
388 } 389 }
389 390
390 void HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML(AtomicHTMLToken* tok en) 391 void HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML(AtomicHTMLToken* tok en)
391 { 392 {
392 ASSERT(m_document); 393 ASSERT(m_document);
393 RefPtrWillBeRawPtr<HTMLHtmlElement> element = HTMLHtmlElement::create(*m_doc ument); 394 RefPtrWillBeRawPtr<HTMLHtmlElement> element = HTMLHtmlElement::create(*m_doc ument);
394 setAttributes(element.get(), token, m_parserContentPolicy); 395 setAttributes(element.get(), token, m_parserContentPolicy);
395 attachLater(m_attachmentRoot, element); 396 attachLater(m_attachmentRoot, element);
396 m_openElements.pushHTMLHtmlElement(HTMLStackItem::create(element, token)); 397 m_openElements.pushHTMLHtmlElement(HTMLStackItem::create(element, token));
397 398
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 queueTask(task); 872 queueTask(task);
872 } 873 }
873 874
874 DEFINE_TRACE(HTMLConstructionSite::PendingText) 875 DEFINE_TRACE(HTMLConstructionSite::PendingText)
875 { 876 {
876 visitor->trace(parent); 877 visitor->trace(parent);
877 visitor->trace(nextChild); 878 visitor->trace(nextChild);
878 } 879 }
879 880
880 } // namespace blink 881 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698