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 2980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2991 currentFrame = ancestorFrame; | 2991 currentFrame = ancestorFrame; |
2992 ancestorFrame = ancestorFrame->tree().parent(); | 2992 ancestorFrame = ancestorFrame->tree().parent(); |
2993 } | 2993 } |
2994 return 0; | 2994 return 0; |
2995 } | 2995 } |
2996 | 2996 |
2997 void Document::didLoadAllImports() | 2997 void Document::didLoadAllImports() |
2998 { | 2998 { |
2999 if (!haveStylesheetsLoaded()) | 2999 if (!haveStylesheetsLoaded()) |
3000 return; | 3000 return; |
3001 setNeedsStyleRecalc(SubtreeStyleChange); | 3001 if (!importLoader()) |
| 3002 styleResolverMayHaveChanged(); |
3002 didLoadAllScriptBlockingResources(); | 3003 didLoadAllScriptBlockingResources(); |
3003 } | 3004 } |
3004 | 3005 |
3005 void Document::didRemoveAllPendingStylesheet() | 3006 void Document::didRemoveAllPendingStylesheet() |
3006 { | 3007 { |
3007 m_needsNotifyRemoveAllPendingStylesheet = false; | 3008 m_needsNotifyRemoveAllPendingStylesheet = false; |
3008 | 3009 |
3009 styleResolverChanged(RecalcStyleDeferred, hasNodesWithPlaceholderStyle() ? F
ullStyleUpdate : AnalyzedStyleUpdate); | 3010 styleResolverMayHaveChanged(); |
3010 | 3011 |
| 3012 // Only imports on master documents can trigger rendering. |
3011 if (HTMLImportLoader* import = importLoader()) | 3013 if (HTMLImportLoader* import = importLoader()) |
3012 import->didRemoveAllPendingStylesheet(); | 3014 import->didRemoveAllPendingStylesheet(); |
3013 | |
3014 if (!haveImportsLoaded()) | 3015 if (!haveImportsLoaded()) |
3015 return; | 3016 return; |
3016 didLoadAllScriptBlockingResources(); | 3017 didLoadAllScriptBlockingResources(); |
3017 } | 3018 } |
3018 | 3019 |
3019 void Document::didLoadAllScriptBlockingResources() | 3020 void Document::didLoadAllScriptBlockingResources() |
3020 { | 3021 { |
3021 executeScriptsWaitingForResourcesIfNeeded(); | 3022 executeScriptsWaitingForResourcesIfNeeded(); |
3022 | 3023 |
3023 if (m_gotoAnchorNeededAfterStylesheetsLoad && view()) | 3024 if (m_gotoAnchorNeededAfterStylesheetsLoad && view()) |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3458 if (!change.needsStyleRecalc()) | 3459 if (!change.needsStyleRecalc()) |
3459 return; | 3460 return; |
3460 | 3461 |
3461 m_evaluateMediaQueriesOnStyleRecalc = true; | 3462 m_evaluateMediaQueriesOnStyleRecalc = true; |
3462 setNeedsStyleRecalc(SubtreeStyleChange); | 3463 setNeedsStyleRecalc(SubtreeStyleChange); |
3463 | 3464 |
3464 if (updateTime == RecalcStyleImmediately) | 3465 if (updateTime == RecalcStyleImmediately) |
3465 updateRenderTreeIfNeeded(); | 3466 updateRenderTreeIfNeeded(); |
3466 } | 3467 } |
3467 | 3468 |
| 3469 void Document::styleResolverMayHaveChanged() |
| 3470 { |
| 3471 styleResolverChanged(RecalcStyleDeferred, hasNodesWithPlaceholderStyle() ? F
ullStyleUpdate : AnalyzedStyleUpdate); |
| 3472 } |
| 3473 |
3468 void Document::setHoverNode(PassRefPtr<Node> newHoverNode) | 3474 void Document::setHoverNode(PassRefPtr<Node> newHoverNode) |
3469 { | 3475 { |
3470 m_hoverNode = newHoverNode; | 3476 m_hoverNode = newHoverNode; |
3471 } | 3477 } |
3472 | 3478 |
3473 void Document::setActiveHoverElement(PassRefPtr<Element> newActiveElement) | 3479 void Document::setActiveHoverElement(PassRefPtr<Element> newActiveElement) |
3474 { | 3480 { |
3475 if (!newActiveElement) { | 3481 if (!newActiveElement) { |
3476 m_activeHoverElement.clear(); | 3482 m_activeHoverElement.clear(); |
3477 return; | 3483 return; |
(...skipping 2230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5708 visitor->trace(m_visibilityObservers); | 5714 visitor->trace(m_visibilityObservers); |
5709 visitor->trace(m_userActionElements); | 5715 visitor->trace(m_userActionElements); |
5710 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); | 5716 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); |
5711 DocumentSupplementable::trace(visitor); | 5717 DocumentSupplementable::trace(visitor); |
5712 TreeScope::trace(visitor); | 5718 TreeScope::trace(visitor); |
5713 ContainerNode::trace(visitor); | 5719 ContainerNode::trace(visitor); |
5714 ExecutionContext::trace(visitor); | 5720 ExecutionContext::trace(visitor); |
5715 } | 5721 } |
5716 | 5722 |
5717 } // namespace WebCore | 5723 } // namespace WebCore |
OLD | NEW |