| 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 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1013 | 1013 |
| 1014 String InspectorStyleSheet::finalURL() | 1014 String InspectorStyleSheet::finalURL() |
| 1015 { | 1015 { |
| 1016 String url = styleSheetURL(m_pageStyleSheet.get()); | 1016 String url = styleSheetURL(m_pageStyleSheet.get()); |
| 1017 return url.isEmpty() ? m_documentURL : url; | 1017 return url.isEmpty() ? m_documentURL : url; |
| 1018 } | 1018 } |
| 1019 | 1019 |
| 1020 bool InspectorStyleSheet::setText(const String& text, ExceptionState&) | 1020 bool InspectorStyleSheet::setText(const String& text, ExceptionState&) |
| 1021 { | 1021 { |
| 1022 innerSetText(text, true); | 1022 innerSetText(text, true); |
| 1023 | |
| 1024 if (listener()) | |
| 1025 listener()->willReparseStyleSheet(); | |
| 1026 | |
| 1027 m_pageStyleSheet->setText(text); | 1023 m_pageStyleSheet->setText(text); |
| 1028 | |
| 1029 if (listener()) | |
| 1030 listener()->didReparseStyleSheet(); | |
| 1031 onStyleSheetTextChanged(); | 1024 onStyleSheetTextChanged(); |
| 1032 return true; | 1025 return true; |
| 1033 } | 1026 } |
| 1034 | 1027 |
| 1035 CSSStyleRule* InspectorStyleSheet::setRuleSelector(const SourceRange& range, con
st String& text, SourceRange* newRange, String* oldText, ExceptionState& excepti
onState) | 1028 CSSStyleRule* InspectorStyleSheet::setRuleSelector(const SourceRange& range, con
st String& text, SourceRange* newRange, String* oldText, ExceptionState& excepti
onState) |
| 1036 { | 1029 { |
| 1037 if (!verifySelectorText(m_pageStyleSheet->ownerDocument(), text)) { | 1030 if (!verifySelectorText(m_pageStyleSheet->ownerDocument(), text)) { |
| 1038 exceptionState.throwDOMException(SyntaxError, "Selector or media text is
not valid."); | 1031 exceptionState.throwDOMException(SyntaxError, "Selector or media text is
not valid."); |
| 1039 return nullptr; | 1032 return nullptr; |
| 1040 } | 1033 } |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1839 } | 1832 } |
| 1840 | 1833 |
| 1841 DEFINE_TRACE(InspectorStyleSheetForInlineStyle) | 1834 DEFINE_TRACE(InspectorStyleSheetForInlineStyle) |
| 1842 { | 1835 { |
| 1843 visitor->trace(m_element); | 1836 visitor->trace(m_element); |
| 1844 visitor->trace(m_inspectorStyle); | 1837 visitor->trace(m_inspectorStyle); |
| 1845 InspectorStyleSheetBase::trace(visitor); | 1838 InspectorStyleSheetBase::trace(visitor); |
| 1846 } | 1839 } |
| 1847 | 1840 |
| 1848 } // namespace blink | 1841 } // namespace blink |
| OLD | NEW |