| 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 26 matching lines...) Expand all Loading... |
| 37 #include "core/css/CSSStyleSheet.h" | 37 #include "core/css/CSSStyleSheet.h" |
| 38 #include "core/css/CSSSupportsRule.h" | 38 #include "core/css/CSSSupportsRule.h" |
| 39 #include "core/css/StylePropertySet.h" | 39 #include "core/css/StylePropertySet.h" |
| 40 #include "core/css/StyleRule.h" | 40 #include "core/css/StyleRule.h" |
| 41 #include "core/css/StyleSheetContents.h" | 41 #include "core/css/StyleSheetContents.h" |
| 42 #include "core/css/parser/CSSParser.h" | 42 #include "core/css/parser/CSSParser.h" |
| 43 #include "core/css/parser/CSSParserObserver.h" | 43 #include "core/css/parser/CSSParserObserver.h" |
| 44 #include "core/dom/DOMNodeIds.h" | 44 #include "core/dom/DOMNodeIds.h" |
| 45 #include "core/dom/Document.h" | 45 #include "core/dom/Document.h" |
| 46 #include "core/dom/Element.h" | 46 #include "core/dom/Element.h" |
| 47 #include "core/dom/StyleEngine.h" |
| 47 #include "core/html/HTMLStyleElement.h" | 48 #include "core/html/HTMLStyleElement.h" |
| 48 #include "core/html/parser/HTMLParserIdioms.h" | 49 #include "core/html/parser/HTMLParserIdioms.h" |
| 49 #include "core/inspector/IdentifiersFactory.h" | 50 #include "core/inspector/IdentifiersFactory.h" |
| 50 #include "core/inspector/InspectorCSSAgent.h" | 51 #include "core/inspector/InspectorCSSAgent.h" |
| 51 #include "core/inspector/InspectorResourceAgent.h" | 52 #include "core/inspector/InspectorResourceAgent.h" |
| 52 #include "core/svg/SVGStyleElement.h" | 53 #include "core/svg/SVGStyleElement.h" |
| 53 #include "platform/v8_inspector/public/V8ContentSearchUtil.h" | 54 #include "platform/v8_inspector/public/V8ContentSearchUtil.h" |
| 54 #include "wtf/OwnPtr.h" | 55 #include "wtf/OwnPtr.h" |
| 55 #include "wtf/PassOwnPtr.h" | 56 #include "wtf/PassOwnPtr.h" |
| 56 #include "wtf/text/StringBuilder.h" | 57 #include "wtf/text/StringBuilder.h" |
| (...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 m_pageStyleSheet->clearChildRuleCSSOMWrappers(); | 980 m_pageStyleSheet->clearChildRuleCSSOMWrappers(); |
| 980 } | 981 } |
| 981 { | 982 { |
| 982 CSSStyleSheet::RuleMutationScope mutationScope(m_pageStyleSheet.get()); | 983 CSSStyleSheet::RuleMutationScope mutationScope(m_pageStyleSheet.get()); |
| 983 m_pageStyleSheet->contents()->parseString(text); | 984 m_pageStyleSheet->contents()->parseString(text); |
| 984 } | 985 } |
| 985 | 986 |
| 986 if (listener()) | 987 if (listener()) |
| 987 listener()->didReparseStyleSheet(); | 988 listener()->didReparseStyleSheet(); |
| 988 onStyleSheetTextChanged(); | 989 onStyleSheetTextChanged(); |
| 989 m_pageStyleSheet->ownerDocument()->styleResolverChanged(FullStyleUpdate); | 990 m_pageStyleSheet->ownerDocument()->styleEngine().resolverChanged(FullStyleUp
date); |
| 990 return true; | 991 return true; |
| 991 } | 992 } |
| 992 | 993 |
| 993 RefPtrWillBeRawPtr<CSSStyleRule> InspectorStyleSheet::setRuleSelector(const Sour
ceRange& range, const String& text, SourceRange* newRange, String* oldText, Exce
ptionState& exceptionState) | 994 RefPtrWillBeRawPtr<CSSStyleRule> InspectorStyleSheet::setRuleSelector(const Sour
ceRange& range, const String& text, SourceRange* newRange, String* oldText, Exce
ptionState& exceptionState) |
| 994 { | 995 { |
| 995 if (!verifySelectorText(m_pageStyleSheet->ownerDocument(), text)) { | 996 if (!verifySelectorText(m_pageStyleSheet->ownerDocument(), text)) { |
| 996 exceptionState.throwDOMException(SyntaxError, "Selector or media text is
not valid."); | 997 exceptionState.throwDOMException(SyntaxError, "Selector or media text is
not valid."); |
| 997 return nullptr; | 998 return nullptr; |
| 998 } | 999 } |
| 999 | 1000 |
| (...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1783 } | 1784 } |
| 1784 | 1785 |
| 1785 DEFINE_TRACE(InspectorStyleSheetForInlineStyle) | 1786 DEFINE_TRACE(InspectorStyleSheetForInlineStyle) |
| 1786 { | 1787 { |
| 1787 visitor->trace(m_element); | 1788 visitor->trace(m_element); |
| 1788 visitor->trace(m_inspectorStyle); | 1789 visitor->trace(m_inspectorStyle); |
| 1789 InspectorStyleSheetBase::trace(visitor); | 1790 InspectorStyleSheetBase::trace(visitor); |
| 1790 } | 1791 } |
| 1791 | 1792 |
| 1792 } // namespace blink | 1793 } // namespace blink |
| OLD | NEW |