| 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 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1514 void InspectorStyleSheet::revalidateStyle(CSSStyleDeclaration* pageStyle) | 1514 void InspectorStyleSheet::revalidateStyle(CSSStyleDeclaration* pageStyle) |
| 1515 { | 1515 { |
| 1516 if (m_isRevalidating) | 1516 if (m_isRevalidating) |
| 1517 return; | 1517 return; |
| 1518 | 1518 |
| 1519 m_isRevalidating = true; | 1519 m_isRevalidating = true; |
| 1520 ensureFlatRules(); | 1520 ensureFlatRules(); |
| 1521 for (unsigned i = 0, size = m_flatRules.size(); i < size; ++i) { | 1521 for (unsigned i = 0, size = m_flatRules.size(); i < size; ++i) { |
| 1522 CSSStyleRule* parsedRule = InspectorCSSAgent::asCSSStyleRule(m_flatRules
.at(i).get()); | 1522 CSSStyleRule* parsedRule = InspectorCSSAgent::asCSSStyleRule(m_flatRules
.at(i).get()); |
| 1523 if (parsedRule && parsedRule->style() == pageStyle) { | 1523 if (parsedRule && parsedRule->style() == pageStyle) { |
| 1524 if (parsedRule->styleRule()->properties()->asText() != pageStyle->cs
sText()) | 1524 if (parsedRule->styleRule()->properties().asText() != pageStyle->css
Text()) |
| 1525 setStyleText(pageStyle, pageStyle->cssText()); | 1525 setStyleText(pageStyle, pageStyle->cssText()); |
| 1526 break; | 1526 break; |
| 1527 } | 1527 } |
| 1528 } | 1528 } |
| 1529 m_isRevalidating = false; | 1529 m_isRevalidating = false; |
| 1530 } | 1530 } |
| 1531 | 1531 |
| 1532 bool InspectorStyleSheet::originalStyleSheetText(String* result) const | 1532 bool InspectorStyleSheet::originalStyleSheetText(String* result) const |
| 1533 { | 1533 { |
| 1534 bool success = inlineStyleSheetText(result); | 1534 bool success = inlineStyleSheetText(result); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1693 | 1693 |
| 1694 RefPtr<MutableStylePropertySet> tempDeclaration = MutableStylePropertySet::c
reate(); | 1694 RefPtr<MutableStylePropertySet> tempDeclaration = MutableStylePropertySet::c
reate(); |
| 1695 RuleSourceDataList ruleSourceDataResult; | 1695 RuleSourceDataList ruleSourceDataResult; |
| 1696 StyleSheetHandler handler(m_styleText, &m_element->document(), m_element->do
cument().elementSheet().contents(), &ruleSourceDataResult); | 1696 StyleSheetHandler handler(m_styleText, &m_element->document(), m_element->do
cument().elementSheet().contents(), &ruleSourceDataResult); |
| 1697 createCSSParser(&m_element->document())->parseDeclaration(tempDeclaration.ge
t(), m_styleText, &handler, m_element->document().elementSheet().contents()); | 1697 createCSSParser(&m_element->document())->parseDeclaration(tempDeclaration.ge
t(), m_styleText, &handler, m_element->document().elementSheet().contents()); |
| 1698 return ruleSourceDataResult.first().release(); | 1698 return ruleSourceDataResult.first().release(); |
| 1699 } | 1699 } |
| 1700 | 1700 |
| 1701 } // namespace WebCore | 1701 } // namespace WebCore |
| 1702 | 1702 |
| OLD | NEW |