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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 if (m_pageStyleSheet && !m_pageStyleSheet->finalURL().isEmpty()) | 581 if (m_pageStyleSheet && !m_pageStyleSheet->finalURL().isEmpty()) |
582 return m_pageStyleSheet->finalURL().string(); | 582 return m_pageStyleSheet->finalURL().string(); |
583 return m_documentURL; | 583 return m_documentURL; |
584 } | 584 } |
585 | 585 |
586 void InspectorStyleSheet::reparseStyleSheet(const String& text) | 586 void InspectorStyleSheet::reparseStyleSheet(const String& text) |
587 { | 587 { |
588 for (unsigned i = 0, size = m_pageStyleSheet->length(); i < size; ++i) | 588 for (unsigned i = 0, size = m_pageStyleSheet->length(); i < size; ++i) |
589 m_pageStyleSheet->remove(i); | 589 m_pageStyleSheet->remove(i); |
590 m_pageStyleSheet->parseString(text, m_pageStyleSheet->useStrictParsing()); | 590 m_pageStyleSheet->parseString(text, m_pageStyleSheet->useStrictParsing()); |
| 591 m_pageStyleSheet->styleSheetChanged(); |
591 m_inspectorStyles.clear(); | 592 m_inspectorStyles.clear(); |
592 } | 593 } |
593 | 594 |
594 bool InspectorStyleSheet::setText(const String& text) | 595 bool InspectorStyleSheet::setText(const String& text) |
595 { | 596 { |
596 if (!m_parsedStyleSheet) | 597 if (!m_parsedStyleSheet) |
597 return false; | 598 return false; |
598 | 599 |
599 m_parsedStyleSheet->setText(text); | 600 m_parsedStyleSheet->setText(text); |
600 m_flatRules.clear(); | 601 m_flatRules.clear(); |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 | 1158 |
1158 RefPtr<CSSMutableStyleDeclaration> tempDeclaration = CSSMutableStyleDeclarat
ion::create(); | 1159 RefPtr<CSSMutableStyleDeclaration> tempDeclaration = CSSMutableStyleDeclarat
ion::create(); |
1159 CSSParser p; | 1160 CSSParser p; |
1160 p.parseDeclaration(tempDeclaration.get(), styleText, result); | 1161 p.parseDeclaration(tempDeclaration.get(), styleText, result); |
1161 return true; | 1162 return true; |
1162 } | 1163 } |
1163 | 1164 |
1164 } // namespace WebCore | 1165 } // namespace WebCore |
1165 | 1166 |
1166 #endif // ENABLE(INSPECTOR) | 1167 #endif // ENABLE(INSPECTOR) |
OLD | NEW |