| 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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 | 704 |
| 705 // Start loading resources referenced by this style. | 705 // Start loading resources referenced by this style. |
| 706 void StyleResolver::loadPendingResources(StyleResolverState& state) | 706 void StyleResolver::loadPendingResources(StyleResolverState& state) |
| 707 { | 707 { |
| 708 state.elementStyleResources().loadPendingResources(state.style()); | 708 state.elementStyleResources().loadPendingResources(state.style()); |
| 709 } | 709 } |
| 710 | 710 |
| 711 PassRefPtr<ComputedStyle> StyleResolver::styleForElement(Element* element, const
ComputedStyle* defaultParent, StyleSharingBehavior sharingBehavior, | 711 PassRefPtr<ComputedStyle> StyleResolver::styleForElement(Element* element, const
ComputedStyle* defaultParent, StyleSharingBehavior sharingBehavior, |
| 712 RuleMatchingBehavior matchingBehavior) | 712 RuleMatchingBehavior matchingBehavior) |
| 713 { | 713 { |
| 714 ASSERT(document().frame()); | |
| 715 ASSERT(document().settings()); | 714 ASSERT(document().settings()); |
| 716 ASSERT(!hasPendingAuthorStyleSheets()); | 715 ASSERT(!hasPendingAuthorStyleSheets()); |
| 717 ASSERT(!m_needCollectFeatures); | 716 ASSERT(!m_needCollectFeatures); |
| 718 | 717 |
| 719 // Once an element has a layoutObject, we don't try to destroy it, since oth
erwise the layoutObject | 718 // Once an element has a layoutObject, we don't try to destroy it, since oth
erwise the layoutObject |
| 720 // will vanish if a style recalc happens during loading. | 719 // will vanish if a style recalc happens during loading. |
| 721 if (sharingBehavior == AllowStyleSharing && !document().isRenderingReady() &
& !element->layoutObject()) { | 720 if (sharingBehavior == AllowStyleSharing && !document().isRenderingReady() &
& !element->layoutObject()) { |
| 722 if (!s_styleNotYetAvailable) { | 721 if (!s_styleNotYetAvailable) { |
| 723 s_styleNotYetAvailable = ComputedStyle::create().leakRef(); | 722 s_styleNotYetAvailable = ComputedStyle::create().leakRef(); |
| 724 s_styleNotYetAvailable->setDisplay(NONE); | 723 s_styleNotYetAvailable->setDisplay(NONE); |
| (...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1744 visitor->trace(m_siblingRuleSet); | 1743 visitor->trace(m_siblingRuleSet); |
| 1745 visitor->trace(m_uncommonAttributeRuleSet); | 1744 visitor->trace(m_uncommonAttributeRuleSet); |
| 1746 visitor->trace(m_watchedSelectorsRules); | 1745 visitor->trace(m_watchedSelectorsRules); |
| 1747 visitor->trace(m_treeBoundaryCrossingScopes); | 1746 visitor->trace(m_treeBoundaryCrossingScopes); |
| 1748 visitor->trace(m_styleSharingLists); | 1747 visitor->trace(m_styleSharingLists); |
| 1749 visitor->trace(m_pendingStyleSheets); | 1748 visitor->trace(m_pendingStyleSheets); |
| 1750 visitor->trace(m_document); | 1749 visitor->trace(m_document); |
| 1751 } | 1750 } |
| 1752 | 1751 |
| 1753 } // namespace blink | 1752 } // namespace blink |
| OLD | NEW |