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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2247073006: Add loadend event when finishing loading image Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 #include "core/html/HTMLBaseElement.h" 149 #include "core/html/HTMLBaseElement.h"
150 #include "core/html/HTMLBodyElement.h" 150 #include "core/html/HTMLBodyElement.h"
151 #include "core/html/HTMLCanvasElement.h" 151 #include "core/html/HTMLCanvasElement.h"
152 #include "core/html/HTMLCollection.h" 152 #include "core/html/HTMLCollection.h"
153 #include "core/html/HTMLDialogElement.h" 153 #include "core/html/HTMLDialogElement.h"
154 #include "core/html/HTMLDocument.h" 154 #include "core/html/HTMLDocument.h"
155 #include "core/html/HTMLFrameOwnerElement.h" 155 #include "core/html/HTMLFrameOwnerElement.h"
156 #include "core/html/HTMLHeadElement.h" 156 #include "core/html/HTMLHeadElement.h"
157 #include "core/html/HTMLHtmlElement.h" 157 #include "core/html/HTMLHtmlElement.h"
158 #include "core/html/HTMLIFrameElement.h" 158 #include "core/html/HTMLIFrameElement.h"
159 #include "core/html/HTMLImageLoader.h"
159 #include "core/html/HTMLInputElement.h" 160 #include "core/html/HTMLInputElement.h"
160 #include "core/html/HTMLLinkElement.h" 161 #include "core/html/HTMLLinkElement.h"
161 #include "core/html/HTMLMetaElement.h" 162 #include "core/html/HTMLMetaElement.h"
162 #include "core/html/HTMLScriptElement.h" 163 #include "core/html/HTMLScriptElement.h"
163 #include "core/html/HTMLStyleElement.h" 164 #include "core/html/HTMLStyleElement.h"
164 #include "core/html/HTMLTemplateElement.h" 165 #include "core/html/HTMLTemplateElement.h"
165 #include "core/html/HTMLTitleElement.h" 166 #include "core/html/HTMLTitleElement.h"
166 #include "core/html/PluginDocument.h" 167 #include "core/html/PluginDocument.h"
167 #include "core/html/WindowNameCollection.h" 168 #include "core/html/WindowNameCollection.h"
168 #include "core/html/canvas/CanvasContextCreationAttributes.h" 169 #include "core/html/canvas/CanvasContextCreationAttributes.h"
(...skipping 2428 matching lines...) Expand 10 before | Expand all | Expand 10 after
2597 ScriptableDocumentParser* parser = scriptableDocumentParser(); 2598 ScriptableDocumentParser* parser = scriptableDocumentParser();
2598 m_wellFormed = parser && parser->wellFormed(); 2599 m_wellFormed = parser && parser->wellFormed();
2599 2600
2600 // We have to clear the parser, in case someone document.write()s from the 2601 // We have to clear the parser, in case someone document.write()s from the
2601 // onLoad event handler, as in Radar 3206524. 2602 // onLoad event handler, as in Radar 3206524.
2602 detachParser(); 2603 detachParser();
2603 2604
2604 if (frame() && frame()->script().canExecuteScripts(NotAboutToExecuteScript)) { 2605 if (frame() && frame()->script().canExecuteScripts(NotAboutToExecuteScript)) {
2605 ImageLoader::dispatchPendingLoadEvents(); 2606 ImageLoader::dispatchPendingLoadEvents();
2606 ImageLoader::dispatchPendingErrorEvents(); 2607 ImageLoader::dispatchPendingErrorEvents();
2608 HTMLImageLoader::dispatchPendingLoadendEvents();
2607 2609
2608 HTMLLinkElement::dispatchPendingLoadEvents(); 2610 HTMLLinkElement::dispatchPendingLoadEvents();
2609 HTMLStyleElement::dispatchPendingLoadEvents(); 2611 HTMLStyleElement::dispatchPendingLoadEvents();
2610 } 2612 }
2611 2613
2612 // JS running below could remove the frame or destroy the LayoutView so we c all 2614 // JS running below could remove the frame or destroy the LayoutView so we c all
2613 // those two functions repeatedly and don't save them on the stack. 2615 // those two functions repeatedly and don't save them on the stack.
2614 2616
2615 // To align the HTML load event and the SVGLoad event for the outermost <svg > element, fire it from 2617 // To align the HTML load event and the SVGLoad event for the outermost <svg > element, fire it from
2616 // here, instead of doing it from SVGElement::finishedParsingChildren. 2618 // here, instead of doing it from SVGElement::finishedParsingChildren.
(...skipping 3421 matching lines...) Expand 10 before | Expand all | Expand 10 after
6038 } 6040 }
6039 6041
6040 void showLiveDocumentInstances() 6042 void showLiveDocumentInstances()
6041 { 6043 {
6042 WeakDocumentSet& set = liveDocumentSet(); 6044 WeakDocumentSet& set = liveDocumentSet();
6043 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6045 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6044 for (Document* document : set) 6046 for (Document* document : set)
6045 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6047 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6046 } 6048 }
6047 #endif 6049 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698