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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderS
tyle* defaultParent, StyleSharingBehavior sharingBehavior, | 596 PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderS
tyle* defaultParent, StyleSharingBehavior sharingBehavior, |
597 RuleMatchingBehavior matchingBehavior) | 597 RuleMatchingBehavior matchingBehavior) |
598 { | 598 { |
599 ASSERT(document().frame()); | 599 ASSERT(document().frame()); |
600 ASSERT(documentSettings()); | 600 ASSERT(documentSettings()); |
601 ASSERT(!hasPendingAuthorStyleSheets()); | 601 ASSERT(!hasPendingAuthorStyleSheets()); |
602 ASSERT(!m_needCollectFeatures); | 602 ASSERT(!m_needCollectFeatures); |
603 | 603 |
604 // Once an element has a renderer, we don't try to destroy it, since otherwi
se the renderer | 604 // Once an element has a renderer, we don't try to destroy it, since otherwi
se the renderer |
605 // will vanish if a style recalc happens during loading. | 605 // will vanish if a style recalc happens during loading. |
606 if (sharingBehavior == AllowStyleSharing && !document().styleEngine()->haveS
tylesheetsLoaded() && !element->renderer()) { | 606 if (sharingBehavior == AllowStyleSharing && !document().isRenderingReady() &
& !element->renderer()) { |
607 if (!s_styleNotYetAvailable) { | 607 if (!s_styleNotYetAvailable) { |
608 s_styleNotYetAvailable = RenderStyle::create().leakRef(); | 608 s_styleNotYetAvailable = RenderStyle::create().leakRef(); |
609 s_styleNotYetAvailable->setDisplay(NONE); | 609 s_styleNotYetAvailable->setDisplay(NONE); |
610 s_styleNotYetAvailable->font().update(document().styleEngine()->font
Selector()); | 610 s_styleNotYetAvailable->font().update(document().styleEngine()->font
Selector()); |
611 } | 611 } |
612 | 612 |
613 document().setHasNodesWithPlaceholderStyle(); | 613 document().setHasNodesWithPlaceholderStyle(); |
614 return s_styleNotYetAvailable; | 614 return s_styleNotYetAvailable; |
615 } | 615 } |
616 | 616 |
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1499 visitor->trace(m_viewportStyleResolver); | 1499 visitor->trace(m_viewportStyleResolver); |
1500 visitor->trace(m_siblingRuleSet); | 1500 visitor->trace(m_siblingRuleSet); |
1501 visitor->trace(m_uncommonAttributeRuleSet); | 1501 visitor->trace(m_uncommonAttributeRuleSet); |
1502 visitor->trace(m_watchedSelectorsRules); | 1502 visitor->trace(m_watchedSelectorsRules); |
1503 visitor->trace(m_treeBoundaryCrossingRules); | 1503 visitor->trace(m_treeBoundaryCrossingRules); |
1504 visitor->trace(m_pendingStyleSheets); | 1504 visitor->trace(m_pendingStyleSheets); |
1505 CSSFontSelectorClient::trace(visitor); | 1505 CSSFontSelectorClient::trace(visitor); |
1506 } | 1506 } |
1507 | 1507 |
1508 } // namespace WebCore | 1508 } // namespace WebCore |
OLD | NEW |