| OLD | NEW |
| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 setAttribute(nonceAttr, | 97 setAttribute(nonceAttr, |
| 98 ContentSecurityPolicy::GetNonceReplacementString()); | 98 ContentSecurityPolicy::GetNonceReplacementString()); |
| 99 } | 99 } |
| 100 } else { | 100 } else { |
| 101 HTMLElement::ParseAttribute(params); | 101 HTMLElement::ParseAttribute(params); |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 | 104 |
| 105 Node::InsertionNotificationRequest HTMLScriptElement::InsertedInto( | 105 Node::InsertionNotificationRequest HTMLScriptElement::InsertedInto( |
| 106 ContainerNode* insertion_point) { | 106 ContainerNode* insertion_point) { |
| 107 ScriptType script_type = ScriptType::kClassic; |
| 107 if (insertion_point->isConnected() && HasSourceAttribute() && | 108 if (insertion_point->isConnected() && HasSourceAttribute() && |
| 108 !Loader()->IsScriptTypeSupported( | 109 !Loader()->IsScriptTypeSupported( |
| 109 ScriptLoader::kDisallowLegacyTypeInTypeAttribute)) | 110 ScriptLoader::kDisallowLegacyTypeInTypeAttribute, script_type)) |
| 110 UseCounter::Count(GetDocument(), | 111 UseCounter::Count(GetDocument(), |
| 111 UseCounter::kScriptElementWithInvalidTypeHasSrc); | 112 UseCounter::kScriptElementWithInvalidTypeHasSrc); |
| 112 HTMLElement::InsertedInto(insertion_point); | 113 HTMLElement::InsertedInto(insertion_point); |
| 113 LogAddElementIfIsolatedWorldAndInDocument("script", srcAttr); | 114 LogAddElementIfIsolatedWorldAndInDocument("script", srcAttr); |
| 114 return kInsertionShouldCallDidNotifySubtreeInsertions; | 115 return kInsertionShouldCallDidNotifySubtreeInsertions; |
| 115 } | 116 } |
| 116 | 117 |
| 117 void HTMLScriptElement::DidNotifySubtreeInsertionsToDocument() { | 118 void HTMLScriptElement::DidNotifySubtreeInsertionsToDocument() { |
| 118 loader_->DidNotifySubtreeInsertionsToDocument(); | 119 loader_->DidNotifySubtreeInsertionsToDocument(); |
| 119 } | 120 } |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 return new HTMLScriptElement(GetDocument(), false, loader_->AlreadyStarted(), | 235 return new HTMLScriptElement(GetDocument(), false, loader_->AlreadyStarted(), |
| 235 false); | 236 false); |
| 236 } | 237 } |
| 237 | 238 |
| 238 DEFINE_TRACE(HTMLScriptElement) { | 239 DEFINE_TRACE(HTMLScriptElement) { |
| 239 HTMLElement::Trace(visitor); | 240 HTMLElement::Trace(visitor); |
| 240 ScriptElementBase::Trace(visitor); | 241 ScriptElementBase::Trace(visitor); |
| 241 } | 242 } |
| 242 | 243 |
| 243 } // namespace blink | 244 } // namespace blink |
| OLD | NEW |