| 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 13 matching lines...) Expand all Loading... |
| 24 #ifndef HTMLScriptElement_h | 24 #ifndef HTMLScriptElement_h |
| 25 #define HTMLScriptElement_h | 25 #define HTMLScriptElement_h |
| 26 | 26 |
| 27 #include "core/dom/ScriptLoaderClient.h" | 27 #include "core/dom/ScriptLoaderClient.h" |
| 28 #include "core/html/HTMLElement.h" | 28 #include "core/html/HTMLElement.h" |
| 29 | 29 |
| 30 namespace blink { | 30 namespace blink { |
| 31 | 31 |
| 32 class ScriptLoader; | 32 class ScriptLoader; |
| 33 | 33 |
| 34 class HTMLScriptElement FINAL : public HTMLElement, public ScriptLoaderClient { | 34 class HTMLScriptElement final : public HTMLElement, public ScriptLoaderClient { |
| 35 DEFINE_WRAPPERTYPEINFO(); | 35 DEFINE_WRAPPERTYPEINFO(); |
| 36 public: | 36 public: |
| 37 static PassRefPtrWillBeRawPtr<HTMLScriptElement> create(Document&, bool wasI
nsertedByParser, bool alreadyStarted = false); | 37 static PassRefPtrWillBeRawPtr<HTMLScriptElement> create(Document&, bool wasI
nsertedByParser, bool alreadyStarted = 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 private: | 49 private: |
| 50 HTMLScriptElement(Document&, bool wasInsertedByParser, bool alreadyStarted); | 50 HTMLScriptElement(Document&, bool wasInsertedByParser, bool alreadyStarted); |
| 51 | 51 |
| 52 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 52 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; |
| 53 virtual void attributeWillChange(const QualifiedName&, const AtomicString& o
ldValue, const AtomicString& newValue) OVERRIDE; | 53 virtual void attributeWillChange(const QualifiedName&, const AtomicString& o
ldValue, const AtomicString& newValue) override; |
| 54 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 54 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 55 virtual void didNotifySubtreeInsertionsToDocument() OVERRIDE; | 55 virtual void didNotifySubtreeInsertionsToDocument() override; |
| 56 virtual void childrenChanged(const ChildrenChange&) OVERRIDE; | 56 virtual void childrenChanged(const ChildrenChange&) override; |
| 57 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; | 57 virtual void didMoveToNewDocument(Document& oldDocument) override; |
| 58 | 58 |
| 59 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; | 59 virtual bool isURLAttribute(const Attribute&) const override; |
| 60 virtual bool hasLegalLinkAttribute(const QualifiedName&) const OVERRIDE; | 60 virtual bool hasLegalLinkAttribute(const QualifiedName&) const override; |
| 61 virtual const QualifiedName& subResourceAttributeName() const OVERRIDE; | 61 virtual const QualifiedName& subResourceAttributeName() const override; |
| 62 | 62 |
| 63 virtual String sourceAttributeValue() const OVERRIDE; | 63 virtual String sourceAttributeValue() const override; |
| 64 virtual String charsetAttributeValue() const OVERRIDE; | 64 virtual String charsetAttributeValue() const override; |
| 65 virtual String typeAttributeValue() const OVERRIDE; | 65 virtual String typeAttributeValue() const override; |
| 66 virtual String languageAttributeValue() const OVERRIDE; | 66 virtual String languageAttributeValue() const override; |
| 67 virtual String forAttributeValue() const OVERRIDE; | 67 virtual String forAttributeValue() const override; |
| 68 virtual String eventAttributeValue() const OVERRIDE; | 68 virtual String eventAttributeValue() const override; |
| 69 virtual bool asyncAttributeValue() const OVERRIDE; | 69 virtual bool asyncAttributeValue() const override; |
| 70 virtual bool deferAttributeValue() const OVERRIDE; | 70 virtual bool deferAttributeValue() const override; |
| 71 virtual bool hasSourceAttribute() const OVERRIDE; | 71 virtual bool hasSourceAttribute() const override; |
| 72 | 72 |
| 73 virtual void dispatchLoadEvent() OVERRIDE; | 73 virtual void dispatchLoadEvent() override; |
| 74 | 74 |
| 75 virtual PassRefPtrWillBeRawPtr<Element> cloneElementWithoutAttributesAndChil
dren() OVERRIDE; | 75 virtual PassRefPtrWillBeRawPtr<Element> cloneElementWithoutAttributesAndChil
dren() override; |
| 76 | 76 |
| 77 OwnPtr<ScriptLoader> m_loader; | 77 OwnPtr<ScriptLoader> m_loader; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace blink | 80 } // namespace blink |
| 81 | 81 |
| 82 #endif // HTMLScriptElement_h | 82 #endif // HTMLScriptElement_h |
| OLD | NEW |