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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 String InspectorStyleSheet::finalURL() const | 579 String InspectorStyleSheet::finalURL() const |
580 { | 580 { |
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(0); |
590 m_pageStyleSheet->parseString(text, m_pageStyleSheet->useStrictParsing()); | 590 m_pageStyleSheet->parseString(text, m_pageStyleSheet->useStrictParsing()); |
591 m_pageStyleSheet->styleSheetChanged(); | 591 m_pageStyleSheet->styleSheetChanged(); |
592 m_inspectorStyles.clear(); | 592 m_inspectorStyles.clear(); |
593 } | 593 } |
594 | 594 |
595 bool InspectorStyleSheet::setText(const String& text) | 595 bool InspectorStyleSheet::setText(const String& text) |
596 { | 596 { |
597 if (!m_parsedStyleSheet) | 597 if (!m_parsedStyleSheet) |
598 return false; | 598 return false; |
599 | 599 |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 | 1161 |
1162 RefPtr<CSSMutableStyleDeclaration> tempDeclaration = CSSMutableStyleDeclarat
ion::create(); | 1162 RefPtr<CSSMutableStyleDeclaration> tempDeclaration = CSSMutableStyleDeclarat
ion::create(); |
1163 CSSParser p; | 1163 CSSParser p; |
1164 p.parseDeclaration(tempDeclaration.get(), styleText, result); | 1164 p.parseDeclaration(tempDeclaration.get(), styleText, result); |
1165 return true; | 1165 return true; |
1166 } | 1166 } |
1167 | 1167 |
1168 } // namespace WebCore | 1168 } // namespace WebCore |
1169 | 1169 |
1170 #endif // ENABLE(INSPECTOR) | 1170 #endif // ENABLE(INSPECTOR) |
OLD | NEW |