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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 #include "core/events/ThreadLocalEventNames.h" | 111 #include "core/events/ThreadLocalEventNames.h" |
112 #include "core/fetch/ResourceFetcher.h" | 112 #include "core/fetch/ResourceFetcher.h" |
113 #include "core/frame/ContentSecurityPolicy.h" | 113 #include "core/frame/ContentSecurityPolicy.h" |
114 #include "core/frame/DOMWindow.h" | 114 #include "core/frame/DOMWindow.h" |
115 #include "core/frame/Frame.h" | 115 #include "core/frame/Frame.h" |
116 #include "core/frame/FrameHost.h" | 116 #include "core/frame/FrameHost.h" |
117 #include "core/frame/FrameView.h" | 117 #include "core/frame/FrameView.h" |
118 #include "core/frame/History.h" | 118 #include "core/frame/History.h" |
119 #include "core/frame/PageConsole.h" | 119 #include "core/frame/PageConsole.h" |
120 #include "core/frame/Settings.h" | 120 #include "core/frame/Settings.h" |
121 #include "core/frame/animation/AnimationController.h" | |
122 #include "core/html/HTMLAllCollection.h" | 121 #include "core/html/HTMLAllCollection.h" |
123 #include "core/html/HTMLAnchorElement.h" | 122 #include "core/html/HTMLAnchorElement.h" |
124 #include "core/html/HTMLCanvasElement.h" | 123 #include "core/html/HTMLCanvasElement.h" |
125 #include "core/html/HTMLCollection.h" | 124 #include "core/html/HTMLCollection.h" |
126 #include "core/html/HTMLDialogElement.h" | 125 #include "core/html/HTMLDialogElement.h" |
127 #include "core/html/HTMLDocument.h" | 126 #include "core/html/HTMLDocument.h" |
128 #include "core/html/HTMLFrameOwnerElement.h" | 127 #include "core/html/HTMLFrameOwnerElement.h" |
129 #include "core/html/HTMLHeadElement.h" | 128 #include "core/html/HTMLHeadElement.h" |
130 #include "core/html/HTMLIFrameElement.h" | 129 #include "core/html/HTMLIFrameElement.h" |
131 #include "core/html/HTMLImport.h" | 130 #include "core/html/HTMLImport.h" |
(...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1804 | 1803 |
1805 void Document::updateStyleIfNeeded() | 1804 void Document::updateStyleIfNeeded() |
1806 { | 1805 { |
1807 ASSERT(isMainThread()); | 1806 ASSERT(isMainThread()); |
1808 ASSERT(!view() || (!view()->isInPerformLayout() && !view()->isPainting())); | 1807 ASSERT(!view() || (!view()->isInPerformLayout() && !view()->isPainting())); |
1809 | 1808 |
1810 if (!shouldCallRecalcStyleForDocument()) | 1809 if (!shouldCallRecalcStyleForDocument()) |
1811 return; | 1810 return; |
1812 | 1811 |
1813 RefPtr<Frame> holder(m_frame); | 1812 RefPtr<Frame> holder(m_frame); |
1814 AnimationUpdateBlock animationUpdateBlock(m_frame ? &m_frame->animation() :
0); | |
1815 recalcStyle(NoChange); | 1813 recalcStyle(NoChange); |
1816 DocumentAnimations::serviceAfterStyleRecalc(*this); | 1814 DocumentAnimations::serviceAfterStyleRecalc(*this); |
1817 } | 1815 } |
1818 | 1816 |
1819 void Document::updateStyleForNodeIfNeeded(Node* node) | 1817 void Document::updateStyleForNodeIfNeeded(Node* node) |
1820 { | 1818 { |
1821 if (!shouldCallRecalcStyleForDocument()) | 1819 if (!shouldCallRecalcStyleForDocument()) |
1822 return; | 1820 return; |
1823 | 1821 |
1824 // At this point, we know that we need to recalc some style on the document
in order to fully update styles. | 1822 // At this point, we know that we need to recalc some style on the document
in order to fully update styles. |
(...skipping 3553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5378 if (!page->focusController().isActive() || !page->focusController().isFocuse
d()) | 5376 if (!page->focusController().isActive() || !page->focusController().isFocuse
d()) |
5379 return false; | 5377 return false; |
5380 if (Frame* focusedFrame = page->focusController().focusedFrame()) { | 5378 if (Frame* focusedFrame = page->focusController().focusedFrame()) { |
5381 if (focusedFrame->tree().isDescendantOf(frame())) | 5379 if (focusedFrame->tree().isDescendantOf(frame())) |
5382 return true; | 5380 return true; |
5383 } | 5381 } |
5384 return false; | 5382 return false; |
5385 } | 5383 } |
5386 | 5384 |
5387 } // namespace WebCore | 5385 } // namespace WebCore |
OLD | NEW |