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 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1791 } | 1791 } |
1792 | 1792 |
1793 void Document::updateStyleIfNeeded() | 1793 void Document::updateStyleIfNeeded() |
1794 { | 1794 { |
1795 ASSERT(isMainThread()); | 1795 ASSERT(isMainThread()); |
1796 ASSERT(!view() || (!view()->isInLayout() && !view()->isPainting())); | 1796 ASSERT(!view() || (!view()->isInLayout() && !view()->isPainting())); |
1797 | 1797 |
1798 if (!needsStyleRecalc() && !childNeedsStyleRecalc() && !childNeedsDistributi
onRecalc()) | 1798 if (!needsStyleRecalc() && !childNeedsStyleRecalc() && !childNeedsDistributi
onRecalc()) |
1799 return; | 1799 return; |
1800 | 1800 |
1801 AnimationUpdateBlock animationUpdateBlock(m_frame ? m_frame->animation() : 0
); | 1801 AnimationUpdateBlock animationUpdateBlock(m_frame ? m_frame->animation().get
() : 0); |
1802 recalcStyle(NoChange); | 1802 recalcStyle(NoChange); |
1803 } | 1803 } |
1804 | 1804 |
1805 void Document::updateStyleForNodeIfNeeded(Node* node) | 1805 void Document::updateStyleForNodeIfNeeded(Node* node) |
1806 { | 1806 { |
1807 if (!hasPendingForcedStyleRecalc() && !childNeedsStyleRecalc() && !needsStyl
eRecalc()) | 1807 if (!hasPendingForcedStyleRecalc() && !childNeedsStyleRecalc() && !needsStyl
eRecalc()) |
1808 return; | 1808 return; |
1809 | 1809 |
1810 bool needsStyleRecalc = hasPendingForcedStyleRecalc(); | 1810 bool needsStyleRecalc = hasPendingForcedStyleRecalc(); |
1811 for (Node* ancestor = node; ancestor && !needsStyleRecalc; ancestor = ancest
or->parentOrShadowHostNode()) | 1811 for (Node* ancestor = node; ancestor && !needsStyleRecalc; ancestor = ancest
or->parentOrShadowHostNode()) |
(...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3360 } | 3360 } |
3361 | 3361 |
3362 m_activeElement = newActiveElement; | 3362 m_activeElement = newActiveElement; |
3363 } | 3363 } |
3364 | 3364 |
3365 void Document::removeFocusedElementOfSubtree(Node* node, bool amongChildrenOnly) | 3365 void Document::removeFocusedElementOfSubtree(Node* node, bool amongChildrenOnly) |
3366 { | 3366 { |
3367 if (!m_focusedElement) | 3367 if (!m_focusedElement) |
3368 return; | 3368 return; |
3369 | 3369 |
3370 Element* focusedElement = node->treeScope().adjustedFocusedElement(); | 3370 Element* focusedElement = node->treeScope()->adjustedFocusedElement(); |
3371 if (!focusedElement) | 3371 if (!focusedElement) |
3372 return; | 3372 return; |
3373 | 3373 |
3374 bool nodeInSubtree = false; | 3374 bool nodeInSubtree = false; |
3375 if (amongChildrenOnly) | 3375 if (amongChildrenOnly) |
3376 nodeInSubtree = focusedElement->isDescendantOf(node); | 3376 nodeInSubtree = focusedElement->isDescendantOf(node); |
3377 else | 3377 else |
3378 nodeInSubtree = (focusedElement == node) || focusedElement->isDescendant
Of(node); | 3378 nodeInSubtree = (focusedElement == node) || focusedElement->isDescendant
Of(node); |
3379 | 3379 |
3380 if (nodeInSubtree) | 3380 if (nodeInSubtree) |
(...skipping 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5449 { | 5449 { |
5450 return DocumentLifecycleNotifier::create(this); | 5450 return DocumentLifecycleNotifier::create(this); |
5451 } | 5451 } |
5452 | 5452 |
5453 DocumentLifecycleNotifier* Document::lifecycleNotifier() | 5453 DocumentLifecycleNotifier* Document::lifecycleNotifier() |
5454 { | 5454 { |
5455 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec
ycleNotifier()); | 5455 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec
ycleNotifier()); |
5456 } | 5456 } |
5457 | 5457 |
5458 } // namespace WebCore | 5458 } // namespace WebCore |
OLD | NEW |