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

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

Issue 2623513005: Introduce Element::AttributeModificationParams (Closed)
Patch Set: Created 3 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 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights
6 * reserved. 6 * reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 HTMLElement::childrenChanged(change); 72 HTMLElement::childrenChanged(change);
73 if (change.isChildInsertion()) 73 if (change.isChildInsertion())
74 m_loader->childrenChanged(); 74 m_loader->childrenChanged();
75 } 75 }
76 76
77 void HTMLScriptElement::didMoveToNewDocument(Document& oldDocument) { 77 void HTMLScriptElement::didMoveToNewDocument(Document& oldDocument) {
78 ScriptRunner::movePendingScript(oldDocument, document(), m_loader.get()); 78 ScriptRunner::movePendingScript(oldDocument, document(), m_loader.get());
79 HTMLElement::didMoveToNewDocument(oldDocument); 79 HTMLElement::didMoveToNewDocument(oldDocument);
80 } 80 }
81 81
82 void HTMLScriptElement::parseAttribute(const QualifiedName& name, 82 void HTMLScriptElement::parseAttribute(
83 const AtomicString& oldValue, 83 const AttributeModificationParams& params) {
84 const AtomicString& value) { 84 if (params.name == srcAttr) {
85 if (name == srcAttr) { 85 m_loader->handleSourceAttribute(params.newValue);
86 m_loader->handleSourceAttribute(value); 86 logUpdateAttributeIfIsolatedWorldAndInDocument("script", params);
87 logUpdateAttributeIfIsolatedWorldAndInDocument("script", srcAttr, oldValue, 87 } else if (params.name == asyncAttr) {
88 value);
89 } else if (name == asyncAttr) {
90 m_loader->handleAsyncAttribute(); 88 m_loader->handleAsyncAttribute();
91 } else { 89 } else {
92 HTMLElement::parseAttribute(name, oldValue, value); 90 HTMLElement::parseAttribute(params);
93 } 91 }
94 } 92 }
95 93
96 Node::InsertionNotificationRequest HTMLScriptElement::insertedInto( 94 Node::InsertionNotificationRequest HTMLScriptElement::insertedInto(
97 ContainerNode* insertionPoint) { 95 ContainerNode* insertionPoint) {
98 if (insertionPoint->isConnected() && hasSourceAttribute() && 96 if (insertionPoint->isConnected() && hasSourceAttribute() &&
99 !loader()->isScriptTypeSupported( 97 !loader()->isScriptTypeSupported(
100 ScriptLoader::DisallowLegacyTypeInTypeAttribute)) 98 ScriptLoader::DisallowLegacyTypeInTypeAttribute))
101 UseCounter::count(document(), 99 UseCounter::count(document(),
102 UseCounter::ScriptElementWithInvalidTypeHasSrc); 100 UseCounter::ScriptElementWithInvalidTypeHasSrc);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 return new HTMLScriptElement(document(), false, m_loader->alreadyStarted(), 169 return new HTMLScriptElement(document(), false, m_loader->alreadyStarted(),
172 false); 170 false);
173 } 171 }
174 172
175 DEFINE_TRACE(HTMLScriptElement) { 173 DEFINE_TRACE(HTMLScriptElement) {
176 visitor->trace(m_loader); 174 visitor->trace(m_loader);
177 HTMLElement::trace(visitor); 175 HTMLElement::trace(visitor);
178 } 176 }
179 177
180 } // namespace blink 178 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLScriptElement.h ('k') | third_party/WebKit/Source/core/html/HTMLSelectElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698