| 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 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1580 | 1580 |
| 1581 PassRefPtr<TypeBuilder::CSS::CSSRule> InspectorCSSAgent::buildObjectForRule(CSSS
tyleRule* rule, StyleResolver* styleResolver) | 1581 PassRefPtr<TypeBuilder::CSS::CSSRule> InspectorCSSAgent::buildObjectForRule(CSSS
tyleRule* rule, StyleResolver* styleResolver) |
| 1582 { | 1582 { |
| 1583 if (!rule) | 1583 if (!rule) |
| 1584 return 0; | 1584 return 0; |
| 1585 | 1585 |
| 1586 // CSSRules returned by StyleResolver::styleRulesForElement lack parent poin
ters since that infomation is not cheaply available. | 1586 // CSSRules returned by StyleResolver::styleRulesForElement lack parent poin
ters since that infomation is not cheaply available. |
| 1587 // Since the inspector wants to walk the parent chain, we construct the full
wrappers here. | 1587 // Since the inspector wants to walk the parent chain, we construct the full
wrappers here. |
| 1588 // FIXME: This could be factored better. StyleResolver::styleRulesForElement
should return a StyleRule vector, not a CSSRuleList. | 1588 // FIXME: This could be factored better. StyleResolver::styleRulesForElement
should return a StyleRule vector, not a CSSRuleList. |
| 1589 if (!rule->parentStyleSheet()) { | 1589 if (!rule->parentStyleSheet()) { |
| 1590 rule = styleResolver->inspectorCSSOMWrappers().getWrapperForRuleInSheets
(rule->styleRule(), styleResolver->document().styleSheetCollections()); | 1590 rule = styleResolver->inspectorCSSOMWrappers().getWrapperForRuleInSheets
(rule->styleRule(), styleResolver->document().styleEngine()); |
| 1591 if (!rule) | 1591 if (!rule) |
| 1592 return 0; | 1592 return 0; |
| 1593 } | 1593 } |
| 1594 return bindStyleSheet(rule->parentStyleSheet())->buildObjectForRule(rule, bu
ildMediaListChain(rule)); | 1594 return bindStyleSheet(rule->parentStyleSheet())->buildObjectForRule(rule, bu
ildMediaListChain(rule)); |
| 1595 } | 1595 } |
| 1596 | 1596 |
| 1597 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSRule> > InspectorCSSAgent::bu
ildArrayForRuleList(CSSRuleList* ruleList, StyleResolver* styleResolver) | 1597 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSRule> > InspectorCSSAgent::bu
ildArrayForRuleList(CSSRuleList* ruleList, StyleResolver* styleResolver) |
| 1598 { | 1598 { |
| 1599 RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSRule> > result = TypeBuilder:
:Array<TypeBuilder::CSS::CSSRule>::create(); | 1599 RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSRule> > result = TypeBuilder:
:Array<TypeBuilder::CSS::CSSRule>::create(); |
| 1600 if (!ruleList) | 1600 if (!ruleList) |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1777 documentsToChange.add(element->ownerDocument()); | 1777 documentsToChange.add(element->ownerDocument()); |
| 1778 } | 1778 } |
| 1779 | 1779 |
| 1780 m_nodeIdToForcedPseudoState.clear(); | 1780 m_nodeIdToForcedPseudoState.clear(); |
| 1781 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) | 1781 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) |
| 1782 (*it)->setNeedsStyleRecalc(); | 1782 (*it)->setNeedsStyleRecalc(); |
| 1783 } | 1783 } |
| 1784 | 1784 |
| 1785 } // namespace WebCore | 1785 } // namespace WebCore |
| 1786 | 1786 |
| OLD | NEW |