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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 | 612 |
613 // Now check author rules, beginning first with presentational attributes ma
pped from HTML. | 613 // Now check author rules, beginning first with presentational attributes ma
pped from HTML. |
614 if (state.element()->isStyledElement()) { | 614 if (state.element()->isStyledElement()) { |
615 collector.addElementStyleProperties(state.element()->presentationAttribu
teStyle()); | 615 collector.addElementStyleProperties(state.element()->presentationAttribu
teStyle()); |
616 | 616 |
617 // Now we check additional mapped declarations. | 617 // Now we check additional mapped declarations. |
618 // Tables and table cells share an additional mapped rule that must be a
pplied | 618 // Tables and table cells share an additional mapped rule that must be a
pplied |
619 // after all attributes, since their mapped style depends on the values
of multiple attributes. | 619 // after all attributes, since their mapped style depends on the values
of multiple attributes. |
620 collector.addElementStyleProperties(state.element()->additionalPresentat
ionAttributeStyle()); | 620 collector.addElementStyleProperties(state.element()->additionalPresentat
ionAttributeStyle()); |
621 | 621 |
622 if (state.element()->isHTMLElement()) { | 622 if (state.element()->isHTMLElement() && toHTMLElement(state.element())->
hasDirectionAuto()) { |
623 bool isAuto; | 623 state.setHasDirAutoAttribute(true); |
624 TextDirection textDirection = toHTMLElement(state.element())->direct
ionalityIfhasDirAutoAttribute(isAuto); | 624 collector.addElementStyleProperties(state.element()->directionality(
) == LTR ? leftToRightDeclaration() : rightToLeftDeclaration()); |
625 if (isAuto) { | |
626 state.setHasDirAutoAttribute(true); | |
627 collector.addElementStyleProperties(textDirection == LTR ? leftT
oRightDeclaration() : rightToLeftDeclaration()); | |
628 } | |
629 } | 625 } |
630 } | 626 } |
631 | 627 |
632 matchAuthorRules(*state.element(), collector); | 628 matchAuthorRules(*state.element(), collector); |
633 | 629 |
634 if (state.element()->isStyledElement()) { | 630 if (state.element()->isStyledElement()) { |
635 // For Shadow DOM V1, inline style is already collected in matchScopedRu
les(). | 631 // For Shadow DOM V1, inline style is already collected in matchScopedRu
les(). |
636 if (document().shadowCascadeOrder() != ShadowCascadeOrder::ShadowCascade
V1 && state.element()->inlineStyle()) { | 632 if (document().shadowCascadeOrder() != ShadowCascadeOrder::ShadowCascade
V1 && state.element()->inlineStyle()) { |
637 // Inline style is immutable as long as there is no CSSOM wrapper. | 633 // Inline style is immutable as long as there is no CSSOM wrapper. |
638 bool isInlineStyleCacheable = !state.element()->inlineStyle()->isMut
able(); | 634 bool isInlineStyleCacheable = !state.element()->inlineStyle()->isMut
able(); |
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1734 visitor->trace(m_siblingRuleSet); | 1730 visitor->trace(m_siblingRuleSet); |
1735 visitor->trace(m_uncommonAttributeRuleSet); | 1731 visitor->trace(m_uncommonAttributeRuleSet); |
1736 visitor->trace(m_watchedSelectorsRules); | 1732 visitor->trace(m_watchedSelectorsRules); |
1737 visitor->trace(m_treeBoundaryCrossingScopes); | 1733 visitor->trace(m_treeBoundaryCrossingScopes); |
1738 visitor->trace(m_styleSharingLists); | 1734 visitor->trace(m_styleSharingLists); |
1739 visitor->trace(m_pendingStyleSheets); | 1735 visitor->trace(m_pendingStyleSheets); |
1740 visitor->trace(m_document); | 1736 visitor->trace(m_document); |
1741 } | 1737 } |
1742 | 1738 |
1743 } // namespace blink | 1739 } // namespace blink |
OLD | NEW |