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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 | 646 |
647 setAnimationUpdateIfNeeded(state, *element); | 647 setAnimationUpdateIfNeeded(state, *element); |
648 | 648 |
649 if (state.style()->hasViewportUnits()) | 649 if (state.style()->hasViewportUnits()) |
650 document().setHasViewportUnits(); | 650 document().setHasViewportUnits(); |
651 | 651 |
652 // Now return the style. | 652 // Now return the style. |
653 return state.takeStyle(); | 653 return state.takeStyle(); |
654 } | 654 } |
655 | 655 |
656 PassRefPtr<RenderStyle> StyleResolver::styleForKeyframe(Element* element, const
RenderStyle& elementStyle, RenderStyle* parentStyle, const StyleKeyframe* keyfra
me, const AtomicString& animationName) | 656 PassRefPtr<RenderStyle> StyleResolver::styleForKeyframe(Element& element, const
RenderStyle& elementStyle, RenderStyle* parentStyle, const StyleKeyframe* keyfra
me, const AtomicString& animationName) |
657 { | 657 { |
658 ASSERT(document().frame()); | 658 ASSERT(document().frame()); |
659 ASSERT(document().settings()); | 659 ASSERT(document().settings()); |
660 ASSERT(!hasPendingAuthorStyleSheets()); | 660 ASSERT(!hasPendingAuthorStyleSheets()); |
661 | 661 |
662 if (element == document().documentElement()) | 662 if (&element == document().documentElement()) |
663 resetDirectionAndWritingModeOnDocument(document()); | 663 resetDirectionAndWritingModeOnDocument(document()); |
664 StyleResolverState state(document(), element, parentStyle); | 664 StyleResolverState state(document(), &element, parentStyle); |
665 | 665 |
666 MatchResult result; | 666 MatchResult result; |
667 result.addMatchedProperties(&keyframe->properties()); | 667 result.addMatchedProperties(&keyframe->properties()); |
668 | 668 |
669 ASSERT(!state.style()); | 669 ASSERT(!state.style()); |
670 | 670 |
671 // Create the style | 671 // Create the style |
672 state.setStyle(RenderStyle::clone(&elementStyle)); | 672 state.setStyle(RenderStyle::clone(&elementStyle)); |
673 state.setLineHeightValue(0); | 673 state.setLineHeightValue(0); |
674 | 674 |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 | 963 |
964 if (rulesToInclude & AuthorCSSRules) { | 964 if (rulesToInclude & AuthorCSSRules) { |
965 collector.setSameOriginOnly(!(rulesToInclude & CrossOriginCSSRules)); | 965 collector.setSameOriginOnly(!(rulesToInclude & CrossOriginCSSRules)); |
966 matchAuthorRules(element, collector, rulesToInclude & EmptyCSSRules); | 966 matchAuthorRules(element, collector, rulesToInclude & EmptyCSSRules); |
967 } | 967 } |
968 } | 968 } |
969 | 969 |
970 // -----------------------------------------------------------------------------
-------- | 970 // -----------------------------------------------------------------------------
-------- |
971 // this is mostly boring stuff on how to apply a certain rule to the renderstyle
... | 971 // this is mostly boring stuff on how to apply a certain rule to the renderstyle
... |
972 | 972 |
973 bool StyleResolver::applyAnimatedProperties(StyleResolverState& state, Element*
animatingElement) | 973 bool StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Ele
ment* animatingElement) |
974 { | 974 { |
975 const Element* element = state.element(); | 975 Element* element = state.element(); |
976 ASSERT(element); | 976 ASSERT(element); |
977 | 977 |
978 // The animating element may be this element, or its pseudo element. It is | 978 // The animating element may be this element, or its pseudo element. It is |
979 // null when calculating the style for a potential pseudo element that has | 979 // null when calculating the style for a potential pseudo element that has |
980 // yet to be created. | 980 // yet to be created. |
981 ASSERT(animatingElement == element || !animatingElement || animatingElement-
>parentOrShadowHostElement() == element); | 981 ASSERT(animatingElement == element || !animatingElement || animatingElement-
>parentOrShadowHostElement() == element); |
982 | 982 |
983 if (!(animatingElement && animatingElement->hasActiveAnimations()) | 983 if (!(animatingElement && animatingElement->hasActiveAnimations()) |
984 && !state.style()->transitions() && !state.style()->animations()) | 984 && !state.style()->transitions() && !state.style()->animations()) |
985 return false; | 985 return false; |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1592 visitor->trace(m_uncommonAttributeRuleSet); | 1592 visitor->trace(m_uncommonAttributeRuleSet); |
1593 visitor->trace(m_watchedSelectorsRules); | 1593 visitor->trace(m_watchedSelectorsRules); |
1594 visitor->trace(m_treeBoundaryCrossingRules); | 1594 visitor->trace(m_treeBoundaryCrossingRules); |
1595 visitor->trace(m_styleSharingLists); | 1595 visitor->trace(m_styleSharingLists); |
1596 visitor->trace(m_pendingStyleSheets); | 1596 visitor->trace(m_pendingStyleSheets); |
1597 visitor->trace(m_document); | 1597 visitor->trace(m_document); |
1598 #endif | 1598 #endif |
1599 } | 1599 } |
1600 | 1600 |
1601 } // namespace blink | 1601 } // namespace blink |
OLD | NEW |