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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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) |
OLD | NEW |