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

Side by Side Diff: third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.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) 2000 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2005, 2006, 2008, 2014 Apple Inc. All rights reserved. 3 * Copyright (C) 2005, 2006, 2008, 2014 Apple Inc. All rights reserved.
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
5 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 5 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2008 Holger Hans Peter Freyther 7 * Copyright (C) 2008 Holger Hans Peter Freyther
8 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 } 1064 }
1065 1065
1066 if (isHTMLTemplateElement(*newElement)) 1066 if (isHTMLTemplateElement(*newElement))
1067 pushCurrentNode(toHTMLTemplateElement(*newElement).content()); 1067 pushCurrentNode(toHTMLTemplateElement(*newElement).content());
1068 else 1068 else
1069 pushCurrentNode(newElement.get()); 1069 pushCurrentNode(newElement.get());
1070 1070
1071 if (isHTMLHtmlElement(*newElement)) 1071 if (isHTMLHtmlElement(*newElement))
1072 toHTMLHtmlElement(*newElement).insertedByParser(); 1072 toHTMLHtmlElement(*newElement).insertedByParser();
1073 1073
1074 if (!m_parsingFragment && isFirstElement && document()->frame()) 1074 if (!m_parsingFragment && isFirstElement && document()->frame()) {
1075 document()->frame()->loader().dispatchDocumentElementAvailable(); 1075 document()->frame()->loader().dispatchDocumentElementAvailable();
1076 document()->frame()->loader().runScriptsAtDocumentElementAvailable();
1077 // runScriptsAtDocumentElementAvailable might have invalidated the docum ent.
1078 }
1076 } 1079 }
1077 1080
1078 void XMLDocumentParser::endElementNs() 1081 void XMLDocumentParser::endElementNs()
1079 { 1082 {
1080 if (isStopped()) 1083 if (isStopped())
1081 return; 1084 return;
1082 1085
1083 if (m_parserPaused) { 1086 if (m_parserPaused) {
1084 m_pendingCallbacks.append(adoptPtr(new PendingEndElementNSCallback(m_scr iptStartPosition))); 1087 m_pendingCallbacks.append(adoptPtr(new PendingEndElementNSCallback(m_scr iptStartPosition)));
1085 return; 1088 return;
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 sax.initialized = XML_SAX2_MAGIC; 1698 sax.initialized = XML_SAX2_MAGIC;
1696 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax, &state); 1699 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax, &state);
1697 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; 1700 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />";
1698 parseChunk(parser->context(), parseString); 1701 parseChunk(parser->context(), parseString);
1699 finishParsing(parser->context()); 1702 finishParsing(parser->context());
1700 attrsOK = state.gotAttributes; 1703 attrsOK = state.gotAttributes;
1701 return state.attributes; 1704 return state.attributes;
1702 } 1705 }
1703 1706
1704 } // namespace blink 1707 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoaderClient.h ('k') | third_party/WebKit/Source/web/FrameLoaderClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698