| 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 | 559 |
| 560 if (sharingBehavior == AllowStyleSharing && (defaultParent || elementContext
.parentStyle())) { | 560 if (sharingBehavior == AllowStyleSharing && (defaultParent || elementContext
.parentStyle())) { |
| 561 SharedStyleFinder styleFinder(elementContext, m_features, m_siblingRuleS
et.get(), m_uncommonAttributeRuleSet.get(), *this); | 561 SharedStyleFinder styleFinder(elementContext, m_features, m_siblingRuleS
et.get(), m_uncommonAttributeRuleSet.get(), *this); |
| 562 if (RefPtr<LayoutStyle> sharedStyle = styleFinder.findSharedStyle()) | 562 if (RefPtr<LayoutStyle> sharedStyle = styleFinder.findSharedStyle()) |
| 563 return sharedStyle.release(); | 563 return sharedStyle.release(); |
| 564 } | 564 } |
| 565 | 565 |
| 566 StyleResolverState state(document(), elementContext, defaultParent); | 566 StyleResolverState state(document(), elementContext, defaultParent); |
| 567 | 567 |
| 568 ElementAnimations* elementAnimations = element->elementAnimations(); | 568 ElementAnimations* elementAnimations = element->elementAnimations(); |
| 569 const LayoutStyle* baseLayoutStyle = elementAnimations ? elementAnimations->
baseLayoutStyle() : nullptr; | 569 const LayoutStyle* baseLayoutStyle = elementAnimations ? elementAnimations->
validateBaseLayoutStyle() : nullptr; |
| 570 | 570 |
| 571 if (baseLayoutStyle) { | 571 if (baseLayoutStyle) { |
| 572 state.setStyle(LayoutStyle::clone(*baseLayoutStyle)); | 572 state.setStyle(LayoutStyle::clone(*baseLayoutStyle)); |
| 573 if (!state.parentStyle()) | 573 if (!state.parentStyle()) |
| 574 state.setParentStyle(initialStyleForElement()); | 574 state.setParentStyle(initialStyleForElement()); |
| 575 } else { | 575 } else { |
| 576 if (state.parentStyle()) { | 576 if (state.parentStyle()) { |
| 577 RefPtr<LayoutStyle> style = LayoutStyle::create(); | 577 RefPtr<LayoutStyle> style = LayoutStyle::create(); |
| 578 style->inheritFrom(*state.parentStyle(), isAtShadowBoundary(element)
? LayoutStyle::AtShadowBoundary : LayoutStyle::NotAtShadowBoundary); | 578 style->inheritFrom(*state.parentStyle(), isAtShadowBoundary(element)
? LayoutStyle::AtShadowBoundary : LayoutStyle::NotAtShadowBoundary); |
| 579 state.setStyle(style.release()); | 579 state.setStyle(style.release()); |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 ASSERT(document().frame()); | 766 ASSERT(document().frame()); |
| 767 ASSERT(document().settings()); | 767 ASSERT(document().settings()); |
| 768 ASSERT(pseudoStyleRequest.pseudoId != FIRST_LINE_INHERITED); | 768 ASSERT(pseudoStyleRequest.pseudoId != FIRST_LINE_INHERITED); |
| 769 ASSERT(state.parentStyle()); | 769 ASSERT(state.parentStyle()); |
| 770 | 770 |
| 771 StyleResolverParentScope::ensureParentStackIsPushed(); | 771 StyleResolverParentScope::ensureParentStackIsPushed(); |
| 772 | 772 |
| 773 Element* pseudoElement = element.pseudoElement(pseudoStyleRequest.pseudoId); | 773 Element* pseudoElement = element.pseudoElement(pseudoStyleRequest.pseudoId); |
| 774 | 774 |
| 775 ElementAnimations* elementAnimations = pseudoElement ? pseudoElement->elemen
tAnimations() : nullptr; | 775 ElementAnimations* elementAnimations = pseudoElement ? pseudoElement->elemen
tAnimations() : nullptr; |
| 776 const LayoutStyle* baseLayoutStyle = elementAnimations ? elementAnimations->
baseLayoutStyle() : nullptr; | 776 const LayoutStyle* baseLayoutStyle = elementAnimations ? elementAnimations->
validateBaseLayoutStyle() : nullptr; |
| 777 | 777 |
| 778 if (baseLayoutStyle) { | 778 if (baseLayoutStyle) { |
| 779 state.setStyle(LayoutStyle::clone(*baseLayoutStyle)); | 779 state.setStyle(LayoutStyle::clone(*baseLayoutStyle)); |
| 780 } else if (pseudoStyleRequest.allowsInheritance(state.parentStyle())) { | 780 } else if (pseudoStyleRequest.allowsInheritance(state.parentStyle())) { |
| 781 RefPtr<LayoutStyle> style = LayoutStyle::create(); | 781 RefPtr<LayoutStyle> style = LayoutStyle::create(); |
| 782 style->inheritFrom(*state.parentStyle()); | 782 style->inheritFrom(*state.parentStyle()); |
| 783 state.setStyle(style.release()); | 783 state.setStyle(style.release()); |
| 784 } else { | 784 } else { |
| 785 state.setStyle(initialStyleForElement()); | 785 state.setStyle(initialStyleForElement()); |
| 786 state.setParentStyle(LayoutStyle::clone(*state.style())); | 786 state.setParentStyle(LayoutStyle::clone(*state.style())); |
| (...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1500 visitor->trace(m_watchedSelectorsRules); | 1500 visitor->trace(m_watchedSelectorsRules); |
| 1501 visitor->trace(m_treeBoundaryCrossingRules); | 1501 visitor->trace(m_treeBoundaryCrossingRules); |
| 1502 visitor->trace(m_styleResourceLoader); | 1502 visitor->trace(m_styleResourceLoader); |
| 1503 visitor->trace(m_styleSharingLists); | 1503 visitor->trace(m_styleSharingLists); |
| 1504 visitor->trace(m_pendingStyleSheets); | 1504 visitor->trace(m_pendingStyleSheets); |
| 1505 visitor->trace(m_document); | 1505 visitor->trace(m_document); |
| 1506 #endif | 1506 #endif |
| 1507 } | 1507 } |
| 1508 | 1508 |
| 1509 } // namespace blink | 1509 } // namespace blink |
| OLD | NEW |