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

Side by Side Diff: Source/WebCore/inspector/InspectorStyleSheet.cpp

Issue 11616012: Merge 137464 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years 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 | « LayoutTests/inspector/styles/undo-add-rule-crash-expected.txt ('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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 } 890 }
891 891
892 styleSheet->deleteRule(id.ordinal(), ec); 892 styleSheet->deleteRule(id.ordinal(), ec);
893 // |rule| MAY NOT be addressed after this line! 893 // |rule| MAY NOT be addressed after this line!
894 894
895 if (ec) 895 if (ec)
896 return false; 896 return false;
897 897
898 String sheetText = m_parsedStyleSheet->text(); 898 String sheetText = m_parsedStyleSheet->text();
899 sheetText.remove(sourceData->ruleHeaderRange.start, sourceData->ruleBodyRang e.end - sourceData->ruleHeaderRange.start + 1); 899 sheetText.remove(sourceData->ruleHeaderRange.start, sourceData->ruleBodyRang e.end - sourceData->ruleHeaderRange.start + 1);
900 m_parsedStyleSheet->setText(sheetText); 900 setText(sheetText);
901 fireStyleSheetChanged(); 901 fireStyleSheetChanged();
902 return true; 902 return true;
903 } 903 }
904 904
905 CSSStyleRule* InspectorStyleSheet::ruleForId(const InspectorCSSId& id) const 905 CSSStyleRule* InspectorStyleSheet::ruleForId(const InspectorCSSId& id) const
906 { 906 {
907 if (!m_pageStyleSheet) 907 if (!m_pageStyleSheet)
908 return 0; 908 return 0;
909 909
910 ASSERT(!id.isEmpty()); 910 ASSERT(!id.isEmpty());
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 } 1436 }
1437 1437
1438 RefPtr<StylePropertySet> tempDeclaration = StylePropertySet::create(); 1438 RefPtr<StylePropertySet> tempDeclaration = StylePropertySet::create();
1439 createCSSParser(m_element->document())->parseDeclaration(tempDeclaration.get (), m_styleText, result, m_element->document()->elementSheet()->contents()); 1439 createCSSParser(m_element->document())->parseDeclaration(tempDeclaration.get (), m_styleText, result, m_element->document()->elementSheet()->contents());
1440 return true; 1440 return true;
1441 } 1441 }
1442 1442
1443 } // namespace WebCore 1443 } // namespace WebCore
1444 1444
1445 #endif // ENABLE(INSPECTOR) 1445 #endif // ENABLE(INSPECTOR)
OLDNEW
« no previous file with comments | « LayoutTests/inspector/styles/undo-add-rule-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698