| 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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. |
| 5 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> | 5 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 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 16 matching lines...) Expand all Loading... |
| 27 #include "core/CoreExport.h" | 27 #include "core/CoreExport.h" |
| 28 #include "core/dom/ScriptLoader.h" | 28 #include "core/dom/ScriptLoader.h" |
| 29 #include "core/dom/ScriptLoaderClient.h" | 29 #include "core/dom/ScriptLoaderClient.h" |
| 30 #include "core/html/HTMLElement.h" | 30 #include "core/html/HTMLElement.h" |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 class CORE_EXPORT HTMLScriptElement final : public HTMLElement, public ScriptLoa
derClient { | 34 class CORE_EXPORT HTMLScriptElement final : public HTMLElement, public ScriptLoa
derClient { |
| 35 DEFINE_WRAPPERTYPEINFO(); | 35 DEFINE_WRAPPERTYPEINFO(); |
| 36 public: | 36 public: |
| 37 static RawPtr<HTMLScriptElement> create(Document&, bool wasInsertedByParser,
bool alreadyStarted = false); | 37 static RawPtr<HTMLScriptElement> create(Document&, bool wasInsertedByParser,
bool alreadyStarted = false, bool createdDuringDocumentWrite = false); |
| 38 | 38 |
| 39 String text() { return textFromChildren(); } | 39 String text() { return textFromChildren(); } |
| 40 void setText(const String&); | 40 void setText(const String&); |
| 41 | 41 |
| 42 KURL src() const; | 42 KURL src() const; |
| 43 | 43 |
| 44 void setAsync(bool); | 44 void setAsync(bool); |
| 45 bool async() const; | 45 bool async() const; |
| 46 | 46 |
| 47 ScriptLoader* loader() const { return m_loader.get(); } | 47 ScriptLoader* loader() const { return m_loader.get(); } |
| 48 | 48 |
| 49 DECLARE_VIRTUAL_TRACE(); | 49 DECLARE_VIRTUAL_TRACE(); |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 HTMLScriptElement(Document&, bool wasInsertedByParser, bool alreadyStarted); | 52 HTMLScriptElement(Document&, bool wasInsertedByParser, bool alreadyStarted,
bool createdDuringDocumentWrite); |
| 53 | 53 |
| 54 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS
tring&) override; | 54 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS
tring&) override; |
| 55 InsertionNotificationRequest insertedInto(ContainerNode*) override; | 55 InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 56 void didNotifySubtreeInsertionsToDocument() override; | 56 void didNotifySubtreeInsertionsToDocument() override; |
| 57 void childrenChanged(const ChildrenChange&) override; | 57 void childrenChanged(const ChildrenChange&) override; |
| 58 void didMoveToNewDocument(Document& oldDocument) override; | 58 void didMoveToNewDocument(Document& oldDocument) override; |
| 59 | 59 |
| 60 bool isURLAttribute(const Attribute&) const override; | 60 bool isURLAttribute(const Attribute&) const override; |
| 61 bool hasLegalLinkAttribute(const QualifiedName&) const override; | 61 bool hasLegalLinkAttribute(const QualifiedName&) const override; |
| 62 const QualifiedName& subResourceAttributeName() const override; | 62 const QualifiedName& subResourceAttributeName() const override; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 74 void dispatchLoadEvent() override; | 74 void dispatchLoadEvent() override; |
| 75 | 75 |
| 76 RawPtr<Element> cloneElementWithoutAttributesAndChildren() override; | 76 RawPtr<Element> cloneElementWithoutAttributesAndChildren() override; |
| 77 | 77 |
| 78 Member<ScriptLoader> m_loader; | 78 Member<ScriptLoader> m_loader; |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 } // namespace blink | 81 } // namespace blink |
| 82 | 82 |
| 83 #endif // HTMLScriptElement_h | 83 #endif // HTMLScriptElement_h |
| OLD | NEW |