| 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 18 matching lines...) Expand all Loading... |
| 29 #include "core/css/CSSPropertySourceData.h" | 29 #include "core/css/CSSPropertySourceData.h" |
| 30 #include "core/css/CSSStyleDeclaration.h" | 30 #include "core/css/CSSStyleDeclaration.h" |
| 31 #include "platform/JSONValues.h" | 31 #include "platform/JSONValues.h" |
| 32 #include "platform/heap/Handle.h" | 32 #include "platform/heap/Handle.h" |
| 33 #include "wtf/HashMap.h" | 33 #include "wtf/HashMap.h" |
| 34 #include "wtf/PassRefPtr.h" | 34 #include "wtf/PassRefPtr.h" |
| 35 #include "wtf/RefPtr.h" | 35 #include "wtf/RefPtr.h" |
| 36 #include "wtf/Vector.h" | 36 #include "wtf/Vector.h" |
| 37 #include "wtf/text/WTFString.h" | 37 #include "wtf/text/WTFString.h" |
| 38 | 38 |
| 39 class ParsedStyleSheet; | |
| 40 | |
| 41 namespace blink { | 39 namespace blink { |
| 42 | 40 |
| 43 class CSSMediaRule; | 41 class CSSMediaRule; |
| 44 class CSSStyleDeclaration; | 42 class CSSStyleDeclaration; |
| 45 class CSSStyleRule; | 43 class CSSStyleRule; |
| 46 class CSSStyleSheet; | 44 class CSSStyleSheet; |
| 47 class Document; | 45 class Document; |
| 48 class Element; | 46 class Element; |
| 49 class ExceptionState; | 47 class ExceptionState; |
| 50 class InspectorCSSAgent; | 48 class InspectorCSSAgent; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 private: | 149 private: |
| 152 InspectorStyleSheet(InspectorResourceAgent*, const String& id, PassRefPtrWil
lBeRawPtr<CSSStyleSheet> pageStyleSheet, TypeBuilder::CSS::StyleSheetOrigin::Enu
m, const String& documentURL, InspectorCSSAgent*); | 150 InspectorStyleSheet(InspectorResourceAgent*, const String& id, PassRefPtrWil
lBeRawPtr<CSSStyleSheet> pageStyleSheet, TypeBuilder::CSS::StyleSheetOrigin::Enu
m, const String& documentURL, InspectorCSSAgent*); |
| 153 unsigned ruleIndexBySourceRange(const CSSMediaRule* parentMediaRule, const S
ourceRange&); | 151 unsigned ruleIndexBySourceRange(const CSSMediaRule* parentMediaRule, const S
ourceRange&); |
| 154 bool findRuleByHeaderRange(const SourceRange&, CSSRule**, CSSRuleSourceData*
*); | 152 bool findRuleByHeaderRange(const SourceRange&, CSSRule**, CSSRuleSourceData*
*); |
| 155 bool findRuleByBodyRange(const SourceRange&, CSSRule**, CSSRuleSourceData**)
; | 153 bool findRuleByBodyRange(const SourceRange&, CSSRule**, CSSRuleSourceData**)
; |
| 156 CSSStyleRule* insertCSSOMRuleInStyleSheet(const SourceRange&, const String&
ruleText, ExceptionState&); | 154 CSSStyleRule* insertCSSOMRuleInStyleSheet(const SourceRange&, const String&
ruleText, ExceptionState&); |
| 157 CSSStyleRule* insertCSSOMRuleInMediaRule(CSSMediaRule*, const SourceRange&,
const String& ruleText, ExceptionState&); | 155 CSSStyleRule* insertCSSOMRuleInMediaRule(CSSMediaRule*, const SourceRange&,
const String& ruleText, ExceptionState&); |
| 158 CSSStyleRule* insertCSSOMRuleBySourceRange(const SourceRange&, const String&
ruleText, ExceptionState&); | 156 CSSStyleRule* insertCSSOMRuleBySourceRange(const SourceRange&, const String&
ruleText, ExceptionState&); |
| 159 String sourceMapURL(); | 157 String sourceMapURL(); |
| 160 String sourceURL(); | 158 String sourceURL(); |
| 161 bool ensureText(); | |
| 162 void ensureFlatRules(); | 159 void ensureFlatRules(); |
| 163 bool originalStyleSheetText(String* result); | |
| 164 bool resourceStyleSheetText(String* result); | 160 bool resourceStyleSheetText(String* result); |
| 165 bool inlineStyleSheetText(String* result); | 161 bool inlineStyleSheetText(String* result); |
| 166 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::Selector> > selectorsFromSou
rce(const CSSRuleSourceData*, const String&); | 162 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::Selector> > selectorsFromSou
rce(const CSSRuleSourceData*, const String&); |
| 167 PassRefPtr<TypeBuilder::CSS::SelectorList> buildObjectForSelectorList(CSSSty
leRule*); | 163 PassRefPtr<TypeBuilder::CSS::SelectorList> buildObjectForSelectorList(CSSSty
leRule*); |
| 168 String url(); | 164 String url(); |
| 169 bool hasSourceURL(); | 165 bool hasSourceURL(); |
| 170 bool startsAtZero(); | 166 bool startsAtZero(); |
| 171 | 167 |
| 172 unsigned indexOf(CSSStyleDeclaration*); | 168 unsigned indexOf(CSSStyleDeclaration*); |
| 173 bool ensureParsedDataReady(); | |
| 174 void replaceText(const SourceRange&, const String& text, SourceRange* newRan
ge, String* oldText); | 169 void replaceText(const SourceRange&, const String& text, SourceRange* newRan
ge, String* oldText); |
| 175 void innerSetText(const String& newText); | 170 void innerSetText(const String& newText, bool markAsLocallyModified); |
| 176 Element* ownerStyleElement(); | 171 Element* ownerStyleElement(); |
| 177 | 172 |
| 178 RawPtrWillBeMember<InspectorCSSAgent> m_cssAgent; | 173 RawPtrWillBeMember<InspectorCSSAgent> m_cssAgent; |
| 179 RawPtrWillBeMember<InspectorResourceAgent> m_resourceAgent; | 174 RawPtrWillBeMember<InspectorResourceAgent> m_resourceAgent; |
| 180 RefPtrWillBeMember<CSSStyleSheet> m_pageStyleSheet; | 175 RefPtrWillBeMember<CSSStyleSheet> m_pageStyleSheet; |
| 181 TypeBuilder::CSS::StyleSheetOrigin::Enum m_origin; | 176 TypeBuilder::CSS::StyleSheetOrigin::Enum m_origin; |
| 182 String m_documentURL; | 177 String m_documentURL; |
| 183 OwnPtrWillBeMember<ParsedStyleSheet> m_parsedStyleSheet; | 178 OwnPtrWillBeMember<RuleSourceDataList> m_sourceData; |
| 179 String m_text; |
| 184 CSSRuleVector m_flatRules; | 180 CSSRuleVector m_flatRules; |
| 185 String m_sourceURL; | 181 String m_sourceURL; |
| 186 }; | 182 }; |
| 187 | 183 |
| 188 class InspectorStyleSheetForInlineStyle final : public InspectorStyleSheetBase { | 184 class InspectorStyleSheetForInlineStyle final : public InspectorStyleSheetBase { |
| 189 public: | 185 public: |
| 190 static PassRefPtrWillBeRawPtr<InspectorStyleSheetForInlineStyle> create(cons
t String& id, PassRefPtrWillBeRawPtr<Element>, Listener*); | 186 static PassRefPtrWillBeRawPtr<InspectorStyleSheetForInlineStyle> create(cons
t String& id, PassRefPtrWillBeRawPtr<Element>, Listener*); |
| 191 | 187 |
| 192 void didModifyElementAttribute(); | 188 void didModifyElementAttribute(); |
| 193 virtual bool setText(const String&, ExceptionState&) override; | 189 virtual bool setText(const String&, ExceptionState&) override; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 206 InspectorStyleSheetForInlineStyle(const String& id, PassRefPtrWillBeRawPtr<E
lement>, Listener*); | 202 InspectorStyleSheetForInlineStyle(const String& id, PassRefPtrWillBeRawPtr<E
lement>, Listener*); |
| 207 const String& elementStyleText(); | 203 const String& elementStyleText(); |
| 208 | 204 |
| 209 RefPtrWillBeMember<Element> m_element; | 205 RefPtrWillBeMember<Element> m_element; |
| 210 RefPtrWillBeMember<InspectorStyle> m_inspectorStyle; | 206 RefPtrWillBeMember<InspectorStyle> m_inspectorStyle; |
| 211 }; | 207 }; |
| 212 | 208 |
| 213 } // namespace blink | 209 } // namespace blink |
| 214 | 210 |
| 215 #endif // !defined(InspectorStyleSheet_h) | 211 #endif // !defined(InspectorStyleSheet_h) |
| OLD | NEW |