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 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1516 return nullptr; | 1516 return nullptr; |
1517 } | 1517 } |
1518 | 1518 |
1519 Document* ownerDocument = element->ownerDocument(); | 1519 Document* ownerDocument = element->ownerDocument(); |
1520 // A non-active document has no styles. | 1520 // A non-active document has no styles. |
1521 if (!ownerDocument->isActive()) | 1521 if (!ownerDocument->isActive()) |
1522 return nullptr; | 1522 return nullptr; |
1523 | 1523 |
1524 String longhand = getPropertyNameString(propertyId); | 1524 String longhand = getPropertyNameString(propertyId); |
1525 | 1525 |
1526 RefPtrWillBeRawPtr<CSSStyleDeclaration> foundStyle; | 1526 RefPtrWillBeRawPtr<CSSStyleDeclaration> foundStyle = nullptr; |
1527 bool isImportant = false; | 1527 bool isImportant = false; |
1528 | 1528 |
1529 if (inlineStyle && !inlineStyle->getPropertyValue(longhand).isEmpty()) { | 1529 if (inlineStyle && !inlineStyle->getPropertyValue(longhand).isEmpty()) { |
1530 foundStyle = inlineStyle; | 1530 foundStyle = inlineStyle; |
1531 isImportant = inlineStyle->getPropertyPriority(longhand) == "important"; | 1531 isImportant = inlineStyle->getPropertyPriority(longhand) == "important"; |
1532 } | 1532 } |
1533 | 1533 |
1534 StyleResolver& styleResolver = ownerDocument->ensureStyleResolver(); | 1534 StyleResolver& styleResolver = ownerDocument->ensureStyleResolver(); |
1535 element->updateDistribution(); | 1535 element->updateDistribution(); |
1536 RefPtrWillBeRawPtr<CSSRuleList> ruleList = styleResolver.pseudoCSSRulesForEl
ement(element, elementPseudoId, StyleResolver::AllCSSRules); | 1536 RefPtrWillBeRawPtr<CSSRuleList> ruleList = styleResolver.pseudoCSSRulesForEl
ement(element, elementPseudoId, StyleResolver::AllCSSRules); |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1672 visitor->trace(m_documentToCSSStyleSheets); | 1672 visitor->trace(m_documentToCSSStyleSheets); |
1673 visitor->trace(m_invalidatedDocuments); | 1673 visitor->trace(m_invalidatedDocuments); |
1674 visitor->trace(m_nodeToInspectorStyleSheet); | 1674 visitor->trace(m_nodeToInspectorStyleSheet); |
1675 visitor->trace(m_documentToViaInspectorStyleSheet); | 1675 visitor->trace(m_documentToViaInspectorStyleSheet); |
1676 #endif | 1676 #endif |
1677 visitor->trace(m_inspectorUserAgentStyleSheet); | 1677 visitor->trace(m_inspectorUserAgentStyleSheet); |
1678 InspectorBaseAgent::trace(visitor); | 1678 InspectorBaseAgent::trace(visitor); |
1679 } | 1679 } |
1680 | 1680 |
1681 } // namespace blink | 1681 } // namespace blink |
OLD | NEW |