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

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

Issue 1620983002: Also transfer pending in-order scripts upon element moving to new document (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: also remove is-disposed checking; unnecessary Created 4 years, 11 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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 void HTMLScriptElement::childrenChanged(const ChildrenChange& change) 66 void HTMLScriptElement::childrenChanged(const ChildrenChange& change)
67 { 67 {
68 HTMLElement::childrenChanged(change); 68 HTMLElement::childrenChanged(change);
69 if (change.isChildInsertion()) 69 if (change.isChildInsertion())
70 m_loader->childrenChanged(); 70 m_loader->childrenChanged();
71 } 71 }
72 72
73 void HTMLScriptElement::didMoveToNewDocument(Document& oldDocument) 73 void HTMLScriptElement::didMoveToNewDocument(Document& oldDocument)
74 { 74 {
75 ScriptRunner::movePendingAsyncScript(oldDocument, document(), m_loader.get() ); 75 ScriptRunner::movePendingScript(oldDocument, document(), m_loader.get());
76 HTMLElement::didMoveToNewDocument(oldDocument); 76 HTMLElement::didMoveToNewDocument(oldDocument);
77 } 77 }
78 78
79 void HTMLScriptElement::parseAttribute(const QualifiedName& name, const AtomicSt ring& oldValue, const AtomicString& value) 79 void HTMLScriptElement::parseAttribute(const QualifiedName& name, const AtomicSt ring& oldValue, const AtomicString& value)
80 { 80 {
81 if (name == srcAttr) { 81 if (name == srcAttr) {
82 m_loader->handleSourceAttribute(value); 82 m_loader->handleSourceAttribute(value);
83 logUpdateAttributeIfIsolatedWorldAndInDocument("script", srcAttr, oldVal ue, value); 83 logUpdateAttributeIfIsolatedWorldAndInDocument("script", srcAttr, oldVal ue, value);
84 } else if (name == asyncAttr) { 84 } else if (name == asyncAttr) {
85 m_loader->handleAsyncAttribute(); 85 m_loader->handleAsyncAttribute();
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 return adoptRefWillBeNoop(new HTMLScriptElement(document(), false, m_loader- >alreadyStarted())); 179 return adoptRefWillBeNoop(new HTMLScriptElement(document(), false, m_loader- >alreadyStarted()));
180 } 180 }
181 181
182 DEFINE_TRACE(HTMLScriptElement) 182 DEFINE_TRACE(HTMLScriptElement)
183 { 183 {
184 visitor->trace(m_loader); 184 visitor->trace(m_loader);
185 HTMLElement::trace(visitor); 185 HTMLElement::trace(visitor);
186 } 186 }
187 187
188 } 188 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ScriptRunner.cpp ('k') | third_party/WebKit/Source/core/svg/SVGScriptElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698