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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 RefPtr<CSSStyleSheet> m_pageStyleSheet; | 247 RefPtr<CSSStyleSheet> m_pageStyleSheet; |
248 TypeBuilder::CSS::StyleSheetOrigin::Enum m_origin; | 248 TypeBuilder::CSS::StyleSheetOrigin::Enum m_origin; |
249 String m_documentURL; | 249 String m_documentURL; |
250 bool m_isRevalidating; | 250 bool m_isRevalidating; |
251 ParsedStyleSheet* m_parsedStyleSheet; | 251 ParsedStyleSheet* m_parsedStyleSheet; |
252 mutable CSSRuleVector m_flatRules; | 252 mutable CSSRuleVector m_flatRules; |
253 Listener* m_listener; | 253 Listener* m_listener; |
254 mutable String m_sourceURL; | 254 mutable String m_sourceURL; |
255 }; | 255 }; |
256 | 256 |
257 class InspectorStyleSheetForInlineStyle : public InspectorStyleSheet { | 257 class InspectorStyleSheetForInlineStyle FINAL : public InspectorStyleSheet { |
258 public: | 258 public: |
259 static PassRefPtr<InspectorStyleSheetForInlineStyle> create(InspectorPageAge
nt*, InspectorResourceAgent*, const String& id, PassRefPtr<Element>, TypeBuilder
::CSS::StyleSheetOrigin::Enum, Listener*); | 259 static PassRefPtr<InspectorStyleSheetForInlineStyle> create(InspectorPageAge
nt*, InspectorResourceAgent*, const String& id, PassRefPtr<Element>, TypeBuilder
::CSS::StyleSheetOrigin::Enum, Listener*); |
260 | 260 |
261 void didModifyElementAttribute(); | 261 void didModifyElementAttribute(); |
262 virtual bool getText(String* result) const; | 262 virtual bool getText(String* result) const OVERRIDE; |
263 virtual CSSStyleDeclaration* styleForId(const InspectorCSSId& id) const { AS
SERT_UNUSED(id, !id.ordinal()); return inlineStyle(); } | 263 virtual CSSStyleDeclaration* styleForId(const InspectorCSSId& id) const OVER
RIDE { ASSERT_UNUSED(id, !id.ordinal()); return inlineStyle(); } |
264 virtual TypeBuilder::CSS::StyleSheetOrigin::Enum origin() const { return Typ
eBuilder::CSS::StyleSheetOrigin::Regular; } | 264 virtual TypeBuilder::CSS::StyleSheetOrigin::Enum origin() const OVERRIDE { r
eturn TypeBuilder::CSS::StyleSheetOrigin::Regular; } |
265 | 265 |
266 protected: | 266 protected: |
267 InspectorStyleSheetForInlineStyle(InspectorPageAgent*, InspectorResourceAgen
t*, const String& id, PassRefPtr<Element>, TypeBuilder::CSS::StyleSheetOrigin::E
num, Listener*); | 267 InspectorStyleSheetForInlineStyle(InspectorPageAgent*, InspectorResourceAgen
t*, const String& id, PassRefPtr<Element>, TypeBuilder::CSS::StyleSheetOrigin::E
num, Listener*); |
268 | 268 |
269 virtual Document* ownerDocument() const; | 269 virtual Document* ownerDocument() const OVERRIDE; |
270 virtual PassRefPtr<CSSRuleSourceData> ruleSourceDataFor(CSSStyleDeclaration*
style) const { ASSERT_UNUSED(style, style == inlineStyle()); return m_ruleSourc
eData; } | 270 virtual PassRefPtr<CSSRuleSourceData> ruleSourceDataFor(CSSStyleDeclaration*
style) const OVERRIDE { ASSERT_UNUSED(style, style == inlineStyle()); return m_
ruleSourceData; } |
271 virtual unsigned ruleIndexByStyle(CSSStyleDeclaration*) const { return 0; } | 271 virtual unsigned ruleIndexByStyle(CSSStyleDeclaration*) const OVERRIDE { ret
urn 0; } |
272 virtual bool ensureParsedDataReady(); | 272 virtual bool ensureParsedDataReady() OVERRIDE; |
273 virtual PassRefPtr<InspectorStyle> inspectorStyleForId(const InspectorCSSId&
); | 273 virtual PassRefPtr<InspectorStyle> inspectorStyleForId(const InspectorCSSId&
) OVERRIDE; |
274 virtual String sourceMapURL() const OVERRIDE { return String(); } | 274 virtual String sourceMapURL() const OVERRIDE { return String(); } |
275 virtual String sourceURL() const OVERRIDE { return String(); } | 275 virtual String sourceURL() const OVERRIDE { return String(); } |
276 | 276 |
277 // Also accessed by friend class InspectorStyle. | 277 // Also accessed by friend class InspectorStyle. |
278 virtual bool setStyleText(CSSStyleDeclaration*, const String&); | 278 virtual bool setStyleText(CSSStyleDeclaration*, const String&) OVERRIDE; |
279 virtual PassOwnPtr<Vector<unsigned> > lineEndings() const; | 279 virtual PassOwnPtr<Vector<unsigned> > lineEndings() const OVERRIDE; |
280 | 280 |
281 private: | 281 private: |
282 CSSStyleDeclaration* inlineStyle() const; | 282 CSSStyleDeclaration* inlineStyle() const; |
283 const String& elementStyleText() const; | 283 const String& elementStyleText() const; |
284 PassRefPtr<CSSRuleSourceData> getStyleAttributeData() const; | 284 PassRefPtr<CSSRuleSourceData> getStyleAttributeData() const; |
285 | 285 |
286 RefPtr<Element> m_element; | 286 RefPtr<Element> m_element; |
287 RefPtr<CSSRuleSourceData> m_ruleSourceData; | 287 RefPtr<CSSRuleSourceData> m_ruleSourceData; |
288 RefPtr<InspectorStyle> m_inspectorStyle; | 288 RefPtr<InspectorStyle> m_inspectorStyle; |
289 | 289 |
290 // Contains "style" attribute value. | 290 // Contains "style" attribute value. |
291 mutable String m_styleText; | 291 mutable String m_styleText; |
292 mutable bool m_isStyleTextValid; | 292 mutable bool m_isStyleTextValid; |
293 }; | 293 }; |
294 | 294 |
295 | 295 |
296 } // namespace WebCore | 296 } // namespace WebCore |
297 | 297 |
298 #endif // !defined(InspectorStyleSheet_h) | 298 #endif // !defined(InspectorStyleSheet_h) |
OLD | NEW |