Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp

Issue 2319533004: Removed m_isSettingStyleSheetText from InspectorCSSAgent. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorStyleSheet.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorStyleSheet.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698