OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
90 { | 90 { |
91 m_contentSecurityPolicy->setOverrideAllowInlineStyle(false); | 91 m_contentSecurityPolicy->setOverrideAllowInlineStyle(false); |
92 } | 92 } |
93 | 93 |
94 private: | 94 private: |
95 ContentSecurityPolicy* m_contentSecurityPolicy; | 95 ContentSecurityPolicy* m_contentSecurityPolicy; |
96 }; | 96 }; |
97 | 97 |
98 static CSSStyleRule* asCSSStyleRule(CSSRule*); | 98 static CSSStyleRule* asCSSStyleRule(CSSRule*); |
99 | 99 |
100 static PassOwnPtr<InspectorCSSAgent> create(InspectorDOMAgent* domAgent, Ins pectorPageAgent* pageAgent, InspectorResourceAgent* resourceAgent) | 100 static PassOwnPtrWillBeRawPtr<InspectorCSSAgent> create(InspectorDOMAgent* d omAgent, InspectorPageAgent* pageAgent, InspectorResourceAgent* resourceAgent) |
101 { | 101 { |
102 return adoptPtr(new InspectorCSSAgent(domAgent, pageAgent, resourceAgent )); | 102 return adoptPtrWillBeNoop(new InspectorCSSAgent(domAgent, pageAgent, res ourceAgent)); |
103 } | 103 } |
104 virtual ~InspectorCSSAgent(); | 104 virtual ~InspectorCSSAgent(); |
105 virtual void trace(Visitor*) OVERRIDE; | |
105 | 106 |
106 bool forcePseudoState(Element*, CSSSelector::PseudoType); | 107 bool forcePseudoState(Element*, CSSSelector::PseudoType); |
107 virtual void setFrontend(InspectorFrontend*) OVERRIDE; | 108 virtual void setFrontend(InspectorFrontend*) OVERRIDE; |
108 virtual void clearFrontend() OVERRIDE; | 109 virtual void clearFrontend() OVERRIDE; |
109 virtual void discardAgent() OVERRIDE; | 110 virtual void discardAgent() OVERRIDE; |
110 virtual void didCommitLoadForMainFrame() OVERRIDE; | 111 virtual void didCommitLoadForMainFrame() OVERRIDE; |
111 virtual void restore() OVERRIDE; | 112 virtual void restore() OVERRIDE; |
112 virtual void flushPendingFrontendMessages() OVERRIDE; | 113 virtual void flushPendingFrontendMessages() OVERRIDE; |
113 virtual void enable(ErrorString*, PassRefPtr<EnableCallback>) OVERRIDE; | 114 virtual void enable(ErrorString*, PassRefPtr<EnableCallback>) OVERRIDE; |
114 virtual void disable(ErrorString*) OVERRIDE; | 115 virtual void disable(ErrorString*) OVERRIDE; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
187 virtual void didRemoveDOMNode(Node*) OVERRIDE; | 188 virtual void didRemoveDOMNode(Node*) OVERRIDE; |
188 virtual void didModifyDOMAttr(Element*) OVERRIDE; | 189 virtual void didModifyDOMAttr(Element*) OVERRIDE; |
189 | 190 |
190 // InspectorStyleSheet::Listener implementation | 191 // InspectorStyleSheet::Listener implementation |
191 virtual void styleSheetChanged(InspectorStyleSheetBase*) OVERRIDE; | 192 virtual void styleSheetChanged(InspectorStyleSheetBase*) OVERRIDE; |
192 virtual void willReparseStyleSheet() OVERRIDE; | 193 virtual void willReparseStyleSheet() OVERRIDE; |
193 virtual void didReparseStyleSheet() OVERRIDE; | 194 virtual void didReparseStyleSheet() OVERRIDE; |
194 | 195 |
195 void resetPseudoStates(); | 196 void resetPseudoStates(); |
196 | 197 |
197 InspectorFrontend::CSS* m_frontend; | 198 InspectorFrontend::CSS* m_frontend; |
keishi
2014/06/11 14:10:54
SAFE: InspectorFrontend::CSS is owned by Inspector
| |
198 InspectorDOMAgent* m_domAgent; | 199 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent; |
199 InspectorPageAgent* m_pageAgent; | 200 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; |
200 InspectorResourceAgent* m_resourceAgent; | 201 RawPtrWillBeMember<InspectorResourceAgent> m_resourceAgent; |
201 | 202 |
202 IdToInspectorStyleSheet m_idToInspectorStyleSheet; | 203 IdToInspectorStyleSheet m_idToInspectorStyleSheet; |
203 IdToInspectorStyleSheetForInlineStyle m_idToInspectorStyleSheetForInlineStyl e; | 204 IdToInspectorStyleSheetForInlineStyle m_idToInspectorStyleSheetForInlineStyl e; |
204 HashMap<CSSStyleSheet*, RefPtr<InspectorStyleSheet> > m_cssStyleSheetToInspe ctorStyleSheet; | 205 WillBeHeapHashMap<RawPtrWillBeMember<CSSStyleSheet>, RefPtr<InspectorStyleSh eet> > m_cssStyleSheetToInspectorStyleSheet; |
205 typedef HashMap<Document*, OwnPtr<HashSet<CSSStyleSheet*> > > DocumentStyleS heets; | 206 typedef WillBeHeapHashMap<RawPtrWillBeMember<Document>, OwnPtrWillBeMember<W illBeHeapHashSet<RawPtrWillBeMember<CSSStyleSheet> > > > DocumentStyleSheets; |
206 DocumentStyleSheets m_documentToCSSStyleSheets; | 207 DocumentStyleSheets m_documentToCSSStyleSheets; |
207 HashSet<Document*> m_invalidatedDocuments; | 208 WillBeHeapHashSet<RawPtrWillBeMember<Document> > m_invalidatedDocuments; |
haraken
2014/06/12 05:53:01
I haven't checked in details, but are you sure tha
keishi
2014/06/13 03:37:33
m_cssStyleSheetToInspectorStyleSheet is in charge
haraken
2014/06/13 08:02:53
We don't want to make things weak as much as possi
| |
208 | 209 |
209 NodeToInspectorStyleSheet m_nodeToInspectorStyleSheet; | 210 NodeToInspectorStyleSheet m_nodeToInspectorStyleSheet; |
210 WillBePersistentHeapHashMap<RefPtrWillBeMember<Document>, RefPtr<InspectorSt yleSheet> > m_documentToViaInspectorStyleSheet; // "via inspector" stylesheets | 211 WillBeHeapHashMap<RefPtrWillBeMember<Document>, RefPtr<InspectorStyleSheet> > m_documentToViaInspectorStyleSheet; // "via inspector" stylesheets |
211 NodeIdToForcedPseudoState m_nodeIdToForcedPseudoState; | 212 NodeIdToForcedPseudoState m_nodeIdToForcedPseudoState; |
212 | 213 |
213 RefPtrWillBePersistent<CSSStyleSheet> m_inspectorUserAgentStyleSheet; | 214 RefPtrWillBeMember<CSSStyleSheet> m_inspectorUserAgentStyleSheet; |
214 | 215 |
215 int m_lastStyleSheetId; | 216 int m_lastStyleSheetId; |
216 int m_styleSheetsPendingMutation; | 217 int m_styleSheetsPendingMutation; |
217 bool m_styleDeclarationPendingMutation; | 218 bool m_styleDeclarationPendingMutation; |
218 bool m_creatingViaInspectorStyleSheet; | 219 bool m_creatingViaInspectorStyleSheet; |
219 bool m_isSettingStyleSheetText; | 220 bool m_isSettingStyleSheetText; |
220 | 221 |
221 friend class EnableResourceClient; | 222 friend class EnableResourceClient; |
222 friend class StyleSheetBinder; | 223 friend class StyleSheetBinder; |
223 }; | 224 }; |
224 | 225 |
225 | 226 |
226 } // namespace WebCore | 227 } // namespace WebCore |
227 | 228 |
228 #endif // !defined(InspectorCSSAgent_h) | 229 #endif // !defined(InspectorCSSAgent_h) |
OLD | NEW |