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

Side by Side Diff: Source/core/xml/parser/XMLDocumentParser.cpp

Issue 205523003: Remove beforeload events. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove more tests Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/ImageLoader.cpp ('k') | Source/platform/RuntimeEnabledFeatures.in » ('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) 2000 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2005, 2006, 2008 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 if (m_parserPaused) { 349 if (m_parserPaused) {
350 m_pendingSrc.append(source); 350 m_pendingSrc.append(source);
351 return; 351 return;
352 } 352 }
353 353
354 // JavaScript can detach the parser. Make sure this is not released 354 // JavaScript can detach the parser. Make sure this is not released
355 // before the end of this method. 355 // before the end of this method.
356 RefPtr<XMLDocumentParser> protect(this); 356 RefPtr<XMLDocumentParser> protect(this);
357 357
358 doWrite(source.toString()); 358 doWrite(source.toString());
359
360 if (isStopped())
361 return;
362
363 if (document()->frame() && document()->frame()->script().canExecuteScripts(N otAboutToExecuteScript))
364 ImageLoader::dispatchPendingBeforeLoadEvents();
365 } 359 }
366 360
367 void XMLDocumentParser::handleError(XMLErrors::ErrorType type, const char* forma ttedMessage, TextPosition position) 361 void XMLDocumentParser::handleError(XMLErrors::ErrorType type, const char* forma ttedMessage, TextPosition position)
368 { 362 {
369 m_xmlErrors.handleError(type, formattedMessage, position); 363 m_xmlErrors.handleError(type, formattedMessage, position);
370 if (type != XMLErrors::warning) 364 if (type != XMLErrors::warning)
371 m_sawError = true; 365 m_sawError = true;
372 if (type == XMLErrors::fatal) 366 if (type == XMLErrors::fatal)
373 stopParsing(); 367 stopParsing();
374 } 368 }
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1599 sax.initialized = XML_SAX2_MAGIC; 1593 sax.initialized = XML_SAX2_MAGIC;
1600 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax, &state); 1594 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax, &state);
1601 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; 1595 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />";
1602 parseChunk(parser->context(), parseString); 1596 parseChunk(parser->context(), parseString);
1603 finishParsing(parser->context()); 1597 finishParsing(parser->context());
1604 attrsOK = state.gotAttributes; 1598 attrsOK = state.gotAttributes;
1605 return state.attributes; 1599 return state.attributes;
1606 } 1600 }
1607 1601
1608 } // namespace WebCore 1602 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/loader/ImageLoader.cpp ('k') | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698