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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 RefPtrWillBePersistent<CSSStyleSheet> m_pageStyleSheet; | 254 RefPtrWillBePersistent<CSSStyleSheet> m_pageStyleSheet; |
255 TypeBuilder::CSS::StyleSheetOrigin::Enum m_origin; | 255 TypeBuilder::CSS::StyleSheetOrigin::Enum m_origin; |
256 String m_documentURL; | 256 String m_documentURL; |
257 OwnPtr<ParsedStyleSheet> m_parsedStyleSheet; | 257 OwnPtr<ParsedStyleSheet> m_parsedStyleSheet; |
258 mutable CSSRuleVector m_flatRules; | 258 mutable CSSRuleVector m_flatRules; |
259 mutable String m_sourceURL; | 259 mutable String m_sourceURL; |
260 }; | 260 }; |
261 | 261 |
262 class InspectorStyleSheetForInlineStyle FINAL : public InspectorStyleSheetBase { | 262 class InspectorStyleSheetForInlineStyle FINAL : public InspectorStyleSheetBase { |
263 public: | 263 public: |
264 static PassRefPtr<InspectorStyleSheetForInlineStyle> create(const String& id
, PassRefPtr<Element>, Listener*); | 264 static PassRefPtr<InspectorStyleSheetForInlineStyle> create(const String& id
, PassRefPtrWillBeRawPtr<Element>, Listener*); |
265 | 265 |
266 void didModifyElementAttribute(); | 266 void didModifyElementAttribute(); |
267 virtual Document* ownerDocument() const OVERRIDE; | 267 virtual Document* ownerDocument() const OVERRIDE; |
268 virtual bool setText(const String&, ExceptionState&) OVERRIDE; | 268 virtual bool setText(const String&, ExceptionState&) OVERRIDE; |
269 virtual bool getText(String* result) const OVERRIDE; | 269 virtual bool getText(String* result) const OVERRIDE; |
270 | 270 |
271 virtual CSSStyleDeclaration* styleForId(const InspectorCSSId& id) const OVER
RIDE { ASSERT_UNUSED(id, !id.ordinal()); return inlineStyle(); } | 271 virtual CSSStyleDeclaration* styleForId(const InspectorCSSId& id) const OVER
RIDE { ASSERT_UNUSED(id, !id.ordinal()); return inlineStyle(); } |
272 virtual InspectorCSSId styleId(CSSStyleDeclaration* style) const OVERRIDE {
return InspectorCSSId(id(), 0); } | 272 virtual InspectorCSSId styleId(CSSStyleDeclaration* style) const OVERRIDE {
return InspectorCSSId(id(), 0); } |
273 virtual bool setStyleText(const InspectorCSSId&, const String&) OVERRIDE; | 273 virtual bool setStyleText(const InspectorCSSId&, const String&) OVERRIDE; |
274 | 274 |
275 protected: | 275 protected: |
276 virtual PassRefPtr<InspectorStyle> inspectorStyleForId(const InspectorCSSId&
) OVERRIDE; | 276 virtual PassRefPtr<InspectorStyle> inspectorStyleForId(const InspectorCSSId&
) OVERRIDE; |
277 virtual unsigned ruleCount() OVERRIDE { return 1; } | 277 virtual unsigned ruleCount() OVERRIDE { return 1; } |
278 | 278 |
279 // Also accessed by friend class InspectorStyle. | 279 // Also accessed by friend class InspectorStyle. |
280 virtual bool ensureParsedDataReady() OVERRIDE; | 280 virtual bool ensureParsedDataReady() OVERRIDE; |
281 virtual PassRefPtrWillBeRawPtr<CSSRuleSourceData> ruleSourceDataAt(unsigned
ruleIndex) const OVERRIDE { ASSERT_UNUSED(ruleIndex, !ruleIndex); return m_ruleS
ourceData; } | 281 virtual PassRefPtrWillBeRawPtr<CSSRuleSourceData> ruleSourceDataAt(unsigned
ruleIndex) const OVERRIDE { ASSERT_UNUSED(ruleIndex, !ruleIndex); return m_ruleS
ourceData; } |
282 | 282 |
283 private: | 283 private: |
284 InspectorStyleSheetForInlineStyle(const String& id, PassRefPtr<Element>, Lis
tener*); | 284 InspectorStyleSheetForInlineStyle(const String& id, PassRefPtrWillBeRawPtr<E
lement>, Listener*); |
285 CSSStyleDeclaration* inlineStyle() const; | 285 CSSStyleDeclaration* inlineStyle() const; |
286 const String& elementStyleText() const; | 286 const String& elementStyleText() const; |
287 PassRefPtrWillBeRawPtr<CSSRuleSourceData> getStyleAttributeData() const; | 287 PassRefPtrWillBeRawPtr<CSSRuleSourceData> getStyleAttributeData() const; |
288 | 288 |
289 RefPtr<Element> m_element; | 289 RefPtrWillBePersistent<Element> m_element; |
290 RefPtrWillBePersistent<CSSRuleSourceData> m_ruleSourceData; | 290 RefPtrWillBePersistent<CSSRuleSourceData> m_ruleSourceData; |
291 RefPtr<InspectorStyle> m_inspectorStyle; | 291 RefPtr<InspectorStyle> m_inspectorStyle; |
292 | 292 |
293 // Contains "style" attribute value. | 293 // Contains "style" attribute value. |
294 mutable String m_styleText; | 294 mutable String m_styleText; |
295 mutable bool m_isStyleTextValid; | 295 mutable bool m_isStyleTextValid; |
296 }; | 296 }; |
297 | 297 |
298 | 298 |
299 } // namespace WebCore | 299 } // namespace WebCore |
300 | 300 |
301 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(WebCore::InspectorStyleProperty); | 301 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(WebCore::InspectorStyleProperty); |
302 | 302 |
303 #endif // !defined(InspectorStyleSheet_h) | 303 #endif // !defined(InspectorStyleSheet_h) |
OLD | NEW |