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); | |
47 ContainerNode* scopingNode(); | 45 ContainerNode* scopingNode(); |
48 bool isRegisteredAsScoped() const | 46 bool isScoped() const { return m_scoped; } |
tasak
2014/06/03 05:57:48
I think, it would be beter to do:
(a) return isInS
kochi
2014/06/03 07:47:05
I'll take the (b) approach.
Less "scope" terminolo
| |
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 } | |
61 | 47 |
62 using StyleElement::sheet; | 48 using StyleElement::sheet; |
63 | 49 |
64 bool disabled() const; | 50 bool disabled() const; |
65 void setDisabled(bool); | 51 void setDisabled(bool); |
66 | 52 |
67 void dispatchPendingEvent(StyleEventSender*); | 53 void dispatchPendingEvent(StyleEventSender*); |
68 static void dispatchPendingLoadEvents(); | 54 static void dispatchPendingLoadEvents(); |
69 | 55 |
70 virtual void trace(Visitor*) OVERRIDE; | 56 virtual void trace(Visitor*) OVERRIDE; |
(...skipping 10 matching lines...) Expand all Loading... | |
81 | 67 |
82 virtual void finishParsingChildren() OVERRIDE; | 68 virtual void finishParsingChildren() OVERRIDE; |
83 | 69 |
84 virtual bool sheetLoaded() OVERRIDE { return StyleElement::sheetLoaded(docum ent()); } | 70 virtual bool sheetLoaded() OVERRIDE { return StyleElement::sheetLoaded(docum ent()); } |
85 virtual void notifyLoadedSheetAndAllCriticalSubresources(bool errorOccurred) OVERRIDE; | 71 virtual void notifyLoadedSheetAndAllCriticalSubresources(bool errorOccurred) OVERRIDE; |
86 virtual void startLoadingDynamicSheet() OVERRIDE { StyleElement::startLoadin gDynamicSheet(document()); } | 72 virtual void startLoadingDynamicSheet() OVERRIDE { StyleElement::startLoadin gDynamicSheet(document()); } |
87 | 73 |
88 virtual const AtomicString& media() const OVERRIDE; | 74 virtual const AtomicString& media() const OVERRIDE; |
89 virtual const AtomicString& type() const OVERRIDE; | 75 virtual const AtomicString& type() const OVERRIDE; |
90 | 76 |
91 void scopedAttributeChanged(bool); | |
92 void registerWithScopingNode(bool); | |
93 void unregisterWithScopingNode(ContainerNode*); | |
94 | |
95 bool m_firedLoad; | 77 bool m_firedLoad; |
96 bool m_loadedSheet; | 78 bool m_loadedSheet; |
97 | 79 bool m_scoped; |
tasak
2014/06/03 05:57:48
We still need m_scoped? I think, we could replace
kochi
2014/06/03 07:47:05
Removed.
| |
98 enum ScopedStyleRegistrationState { | |
99 NotRegistered, | |
100 RegisteredAsScoped, | |
101 RegisteredInShadowRoot | |
102 }; | |
103 ScopedStyleRegistrationState m_scopedStyleRegistrationState; | |
104 }; | 80 }; |
105 | 81 |
106 } //namespace | 82 } //namespace |
107 | 83 |
108 #endif | 84 #endif |
OLD | NEW |