OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 2974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2985 currentFrame = ancestorFrame; | 2985 currentFrame = ancestorFrame; |
2986 ancestorFrame = ancestorFrame->tree().parent(); | 2986 ancestorFrame = ancestorFrame->tree().parent(); |
2987 } | 2987 } |
2988 return 0; | 2988 return 0; |
2989 } | 2989 } |
2990 | 2990 |
2991 void Document::didLoadAllImports() | 2991 void Document::didLoadAllImports() |
2992 { | 2992 { |
2993 if (!haveStylesheetsLoaded()) | 2993 if (!haveStylesheetsLoaded()) |
2994 return; | 2994 return; |
2995 | 2995 if (!importLoader()) |
| 2996 styleResolverMayHaveChanged(); |
2996 didLoadAllScriptBlockingResources(); | 2997 didLoadAllScriptBlockingResources(); |
2997 } | 2998 } |
2998 | 2999 |
2999 void Document::didRemoveAllPendingStylesheet() | 3000 void Document::didRemoveAllPendingStylesheet() |
3000 { | 3001 { |
3001 m_needsNotifyRemoveAllPendingStylesheet = false; | 3002 m_needsNotifyRemoveAllPendingStylesheet = false; |
3002 | 3003 |
3003 styleResolverChanged(RecalcStyleDeferred, hasNodesWithPlaceholderStyle() ? F
ullStyleUpdate : AnalyzedStyleUpdate); | 3004 styleResolverMayHaveChanged(); |
3004 | 3005 |
| 3006 // Only imports on master documents can trigger rendering. |
3005 if (HTMLImportLoader* import = importLoader()) | 3007 if (HTMLImportLoader* import = importLoader()) |
3006 import->didRemoveAllPendingStylesheet(); | 3008 import->didRemoveAllPendingStylesheet(); |
3007 | |
3008 if (!haveImportsLoaded()) | 3009 if (!haveImportsLoaded()) |
3009 return; | 3010 return; |
3010 | |
3011 didLoadAllScriptBlockingResources(); | 3011 didLoadAllScriptBlockingResources(); |
3012 } | 3012 } |
3013 | 3013 |
3014 void Document::didLoadAllScriptBlockingResources() | 3014 void Document::didLoadAllScriptBlockingResources() |
3015 { | 3015 { |
3016 executeScriptsWaitingForResourcesIfNeeded(); | 3016 executeScriptsWaitingForResourcesIfNeeded(); |
3017 | 3017 |
3018 if (m_gotoAnchorNeededAfterStylesheetsLoad && view()) | 3018 if (m_gotoAnchorNeededAfterStylesheetsLoad && view()) |
3019 view()->scrollToFragment(m_url); | 3019 view()->scrollToFragment(m_url); |
3020 } | 3020 } |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3453 if (!change.needsStyleRecalc()) | 3453 if (!change.needsStyleRecalc()) |
3454 return; | 3454 return; |
3455 | 3455 |
3456 m_evaluateMediaQueriesOnStyleRecalc = true; | 3456 m_evaluateMediaQueriesOnStyleRecalc = true; |
3457 setNeedsStyleRecalc(SubtreeStyleChange); | 3457 setNeedsStyleRecalc(SubtreeStyleChange); |
3458 | 3458 |
3459 if (updateTime == RecalcStyleImmediately) | 3459 if (updateTime == RecalcStyleImmediately) |
3460 updateRenderTreeIfNeeded(); | 3460 updateRenderTreeIfNeeded(); |
3461 } | 3461 } |
3462 | 3462 |
| 3463 void Document::styleResolverMayHaveChanged() |
| 3464 { |
| 3465 styleResolverChanged(RecalcStyleDeferred, hasNodesWithPlaceholderStyle() ? F
ullStyleUpdate : AnalyzedStyleUpdate); |
| 3466 } |
| 3467 |
3463 void Document::setHoverNode(PassRefPtr<Node> newHoverNode) | 3468 void Document::setHoverNode(PassRefPtr<Node> newHoverNode) |
3464 { | 3469 { |
3465 m_hoverNode = newHoverNode; | 3470 m_hoverNode = newHoverNode; |
3466 } | 3471 } |
3467 | 3472 |
3468 void Document::setActiveHoverElement(PassRefPtr<Element> newActiveElement) | 3473 void Document::setActiveHoverElement(PassRefPtr<Element> newActiveElement) |
3469 { | 3474 { |
3470 if (!newActiveElement) { | 3475 if (!newActiveElement) { |
3471 m_activeHoverElement.clear(); | 3476 m_activeHoverElement.clear(); |
3472 return; | 3477 return; |
(...skipping 2229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5702 visitor->trace(m_visibilityObservers); | 5707 visitor->trace(m_visibilityObservers); |
5703 visitor->trace(m_userActionElements); | 5708 visitor->trace(m_userActionElements); |
5704 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); | 5709 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); |
5705 DocumentSupplementable::trace(visitor); | 5710 DocumentSupplementable::trace(visitor); |
5706 TreeScope::trace(visitor); | 5711 TreeScope::trace(visitor); |
5707 ContainerNode::trace(visitor); | 5712 ContainerNode::trace(visitor); |
5708 ExecutionContext::trace(visitor); | 5713 ExecutionContext::trace(visitor); |
5709 } | 5714 } |
5710 | 5715 |
5711 } // namespace WebCore | 5716 } // namespace WebCore |
OLD | NEW |