OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 | 945 |
946 Node* parentNode = NodeRenderingTraversal::parent(textNode); | 946 Node* parentNode = NodeRenderingTraversal::parent(textNode); |
947 if (!parentNode || !parentNode->renderStyle()) | 947 if (!parentNode || !parentNode->renderStyle()) |
948 return defaultStyleForElement(); | 948 return defaultStyleForElement(); |
949 return parentNode->renderStyle(); | 949 return parentNode->renderStyle(); |
950 } | 950 } |
951 | 951 |
952 void StyleResolver::updateFont(StyleResolverState& state) | 952 void StyleResolver::updateFont(StyleResolverState& state) |
953 { | 953 { |
954 state.fontBuilder().createFont(document().styleEngine()->fontSelector(), sta
te.parentStyle(), state.style()); | 954 state.fontBuilder().createFont(document().styleEngine()->fontSelector(), sta
te.parentStyle(), state.style()); |
955 if (state.fontBuilder().fontSizeHasViewportUnits()) | |
956 state.style()->setHasViewportUnits(); | |
957 } | 955 } |
958 | 956 |
959 PassRefPtrWillBeRawPtr<StyleRuleList> StyleResolver::styleRulesForElement(Elemen
t* element, unsigned rulesToInclude) | 957 PassRefPtrWillBeRawPtr<StyleRuleList> StyleResolver::styleRulesForElement(Elemen
t* element, unsigned rulesToInclude) |
960 { | 958 { |
961 ASSERT(element); | 959 ASSERT(element); |
962 StyleResolverState state(document(), element); | 960 StyleResolverState state(document(), element); |
963 ElementRuleCollector collector(state.elementContext(), m_selectorFilter, sta
te.style()); | 961 ElementRuleCollector collector(state.elementContext(), m_selectorFilter, sta
te.style()); |
964 collector.setMode(SelectorChecker::CollectingStyleRules); | 962 collector.setMode(SelectorChecker::CollectingStyleRules); |
965 collectPseudoRulesForElement(element, collector, NOPSEUDO, rulesToInclude); | 963 collectPseudoRulesForElement(element, collector, NOPSEUDO, rulesToInclude); |
966 return collector.matchedStyleRuleList(); | 964 return collector.matchedStyleRuleList(); |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1603 visitor->trace(m_uncommonAttributeRuleSet); | 1601 visitor->trace(m_uncommonAttributeRuleSet); |
1604 visitor->trace(m_watchedSelectorsRules); | 1602 visitor->trace(m_watchedSelectorsRules); |
1605 visitor->trace(m_treeBoundaryCrossingRules); | 1603 visitor->trace(m_treeBoundaryCrossingRules); |
1606 visitor->trace(m_styleSharingLists); | 1604 visitor->trace(m_styleSharingLists); |
1607 visitor->trace(m_pendingStyleSheets); | 1605 visitor->trace(m_pendingStyleSheets); |
1608 visitor->trace(m_document); | 1606 visitor->trace(m_document); |
1609 #endif | 1607 #endif |
1610 } | 1608 } |
1611 | 1609 |
1612 } // namespace blink | 1610 } // namespace blink |
OLD | NEW |