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

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: Last nits Created 4 years, 9 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 } 376 }
377 377
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 m_document->frame()->loader().runScriptsAtDocumentElementAvailable();
389 // runScriptsAtDocumentElementAvailable might have invalidated m_documen t.
390 }
388 } 391 }
389 392
390 void HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML(AtomicHTMLToken* tok en) 393 void HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML(AtomicHTMLToken* tok en)
391 { 394 {
392 ASSERT(m_document); 395 ASSERT(m_document);
393 RefPtrWillBeRawPtr<HTMLHtmlElement> element = HTMLHtmlElement::create(*m_doc ument); 396 RefPtrWillBeRawPtr<HTMLHtmlElement> element = HTMLHtmlElement::create(*m_doc ument);
394 setAttributes(element.get(), token, m_parserContentPolicy); 397 setAttributes(element.get(), token, m_parserContentPolicy);
395 attachLater(m_attachmentRoot, element); 398 attachLater(m_attachmentRoot, element);
396 m_openElements.pushHTMLHtmlElement(HTMLStackItem::create(element, token)); 399 m_openElements.pushHTMLHtmlElement(HTMLStackItem::create(element, token));
397 400
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 queueTask(task); 874 queueTask(task);
872 } 875 }
873 876
874 DEFINE_TRACE(HTMLConstructionSite::PendingText) 877 DEFINE_TRACE(HTMLConstructionSite::PendingText)
875 { 878 {
876 visitor->trace(parent); 879 visitor->trace(parent);
877 visitor->trace(nextChild); 880 visitor->trace(nextChild);
878 } 881 }
879 882
880 } // namespace blink 883 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/PluginDocument.cpp ('k') | third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698