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 3427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3438 setNeedsStyleRecalcForViewportUnits(); | 3438 setNeedsStyleRecalcForViewportUnits(); |
3439 } | 3439 } |
3440 | 3440 |
3441 void Document::styleResolverChanged(StyleResolverUpdateMode updateMode) | 3441 void Document::styleResolverChanged(StyleResolverUpdateMode updateMode) |
3442 { | 3442 { |
3443 // styleResolverChanged() can be invoked during Document destruction. | 3443 // styleResolverChanged() can be invoked during Document destruction. |
3444 // We just skip that case. | 3444 // We just skip that case. |
3445 if (!m_styleEngine) | 3445 if (!m_styleEngine) |
3446 return; | 3446 return; |
3447 | 3447 |
3448 StyleResolverChange change = m_styleEngine->resolverChanged(updateMode); | 3448 m_styleEngine->resolverChanged(updateMode); |
3449 if (change.needsRepaint()) { | 3449 |
| 3450 if (didLayoutWithPendingStylesheets() && haveStylesheetsLoaded()) { |
3450 // We need to manually repaint because we avoid doing all repaints in la
yout or style | 3451 // We need to manually repaint because we avoid doing all repaints in la
yout or style |
3451 // recalc while sheets are still loading to avoid FOUC. | 3452 // recalc while sheets are still loading to avoid FOUC. |
3452 m_pendingSheetLayout = IgnoreLayoutWithPendingSheets; | 3453 m_pendingSheetLayout = IgnoreLayoutWithPendingSheets; |
3453 renderView()->repaintViewAndCompositedLayers(); | 3454 renderView()->repaintViewAndCompositedLayers(); |
3454 } | 3455 } |
3455 | 3456 |
3456 if (!change.needsStyleRecalc()) | |
3457 return; | |
3458 | |
3459 m_evaluateMediaQueriesOnStyleRecalc = true; | 3457 m_evaluateMediaQueriesOnStyleRecalc = true; |
3460 setNeedsStyleRecalc(SubtreeStyleChange); | |
3461 } | 3458 } |
3462 | 3459 |
3463 void Document::styleResolverMayHaveChanged() | 3460 void Document::styleResolverMayHaveChanged() |
3464 { | 3461 { |
3465 styleResolverChanged(hasNodesWithPlaceholderStyle() ? FullStyleUpdate : Anal
yzedStyleUpdate); | 3462 styleResolverChanged(hasNodesWithPlaceholderStyle() ? FullStyleUpdate : Anal
yzedStyleUpdate); |
3466 } | 3463 } |
3467 | 3464 |
3468 void Document::setHoverNode(PassRefPtrWillBeRawPtr<Node> newHoverNode) | 3465 void Document::setHoverNode(PassRefPtrWillBeRawPtr<Node> newHoverNode) |
3469 { | 3466 { |
3470 m_hoverNode = newHoverNode; | 3467 m_hoverNode = newHoverNode; |
(...skipping 2367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5838 visitor->trace(m_compositorPendingAnimations); | 5835 visitor->trace(m_compositorPendingAnimations); |
5839 visitor->trace(m_contextDocument); | 5836 visitor->trace(m_contextDocument); |
5840 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); | 5837 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); |
5841 DocumentSupplementable::trace(visitor); | 5838 DocumentSupplementable::trace(visitor); |
5842 TreeScope::trace(visitor); | 5839 TreeScope::trace(visitor); |
5843 ContainerNode::trace(visitor); | 5840 ContainerNode::trace(visitor); |
5844 ExecutionContext::trace(visitor); | 5841 ExecutionContext::trace(visitor); |
5845 } | 5842 } |
5846 | 5843 |
5847 } // namespace WebCore | 5844 } // namespace WebCore |
OLD | NEW |