| 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, 2010 Apple Inc. ALl rights reserved. | 4 * Copyright (C) 2003, 2010 Apple Inc. ALl rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 typedef EventSender<HTMLStyleElement> StyleEventSender; | 35 typedef EventSender<HTMLStyleElement> StyleEventSender; |
| 36 | 36 |
| 37 class HTMLStyleElement FINAL : public HTMLElement, private StyleElement { | 37 class HTMLStyleElement FINAL : public HTMLElement, private StyleElement { |
| 38 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLStyleElement); | 38 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLStyleElement); |
| 39 public: | 39 public: |
| 40 static PassRefPtrWillBeRawPtr<HTMLStyleElement> create(Document&, bool creat
edByParser); | 40 static PassRefPtrWillBeRawPtr<HTMLStyleElement> create(Document&, bool creat
edByParser); |
| 41 virtual ~HTMLStyleElement(); | 41 virtual ~HTMLStyleElement(); |
| 42 | 42 |
| 43 void setType(const AtomicString&); | 43 void setType(const AtomicString&); |
| 44 | 44 |
| 45 bool scoped() const; |
| 46 void setScoped(bool); |
| 45 ContainerNode* scopingNode(); | 47 ContainerNode* scopingNode(); |
| 48 bool isRegisteredAsScoped() const |
| 49 { |
| 50 // Note: We cannot rely on the 'scoped' attribute still being present wh
en this method is invoked. |
| 51 // Therefore we cannot rely on scoped()! |
| 52 if (m_scopedStyleRegistrationState == NotRegistered) |
| 53 return false; |
| 54 return true; |
| 55 } |
| 56 |
| 57 bool isRegisteredInShadowRoot() const |
| 58 { |
| 59 return m_scopedStyleRegistrationState == RegisteredInShadowRoot; |
| 60 } |
| 46 | 61 |
| 47 using StyleElement::sheet; | 62 using StyleElement::sheet; |
| 48 | 63 |
| 49 bool disabled() const; | 64 bool disabled() const; |
| 50 void setDisabled(bool); | 65 void setDisabled(bool); |
| 51 | 66 |
| 52 void dispatchPendingEvent(StyleEventSender*); | 67 void dispatchPendingEvent(StyleEventSender*); |
| 53 static void dispatchPendingLoadEvents(); | 68 static void dispatchPendingLoadEvents(); |
| 54 | 69 |
| 55 virtual void trace(Visitor*) OVERRIDE; | 70 virtual void trace(Visitor*) OVERRIDE; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 66 | 81 |
| 67 virtual void finishParsingChildren() OVERRIDE; | 82 virtual void finishParsingChildren() OVERRIDE; |
| 68 | 83 |
| 69 virtual bool sheetLoaded() OVERRIDE { return StyleElement::sheetLoaded(docum
ent()); } | 84 virtual bool sheetLoaded() OVERRIDE { return StyleElement::sheetLoaded(docum
ent()); } |
| 70 virtual void notifyLoadedSheetAndAllCriticalSubresources(bool errorOccurred)
OVERRIDE; | 85 virtual void notifyLoadedSheetAndAllCriticalSubresources(bool errorOccurred)
OVERRIDE; |
| 71 virtual void startLoadingDynamicSheet() OVERRIDE { StyleElement::startLoadin
gDynamicSheet(document()); } | 86 virtual void startLoadingDynamicSheet() OVERRIDE { StyleElement::startLoadin
gDynamicSheet(document()); } |
| 72 | 87 |
| 73 virtual const AtomicString& media() const OVERRIDE; | 88 virtual const AtomicString& media() const OVERRIDE; |
| 74 virtual const AtomicString& type() const OVERRIDE; | 89 virtual const AtomicString& type() const OVERRIDE; |
| 75 | 90 |
| 91 void scopedAttributeChanged(bool); |
| 92 void registerWithScopingNode(bool); |
| 93 void unregisterWithScopingNode(ContainerNode*); |
| 94 |
| 76 bool m_firedLoad; | 95 bool m_firedLoad; |
| 77 bool m_loadedSheet; | 96 bool m_loadedSheet; |
| 97 |
| 98 enum ScopedStyleRegistrationState { |
| 99 NotRegistered, |
| 100 RegisteredAsScoped, |
| 101 RegisteredInShadowRoot |
| 102 }; |
| 103 ScopedStyleRegistrationState m_scopedStyleRegistrationState; |
| 78 }; | 104 }; |
| 79 | 105 |
| 80 } //namespace | 106 } //namespace |
| 81 | 107 |
| 82 #endif | 108 #endif |
| OLD | NEW |