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 5651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5662 if (!page->focusController().isActive() || !page->focusController().isFocuse
d()) | 5662 if (!page->focusController().isActive() || !page->focusController().isFocuse
d()) |
5663 return false; | 5663 return false; |
5664 Frame* focusedFrame = page->focusController().focusedFrame(); | 5664 Frame* focusedFrame = page->focusController().focusedFrame(); |
5665 if (focusedFrame && focusedFrame->isLocalFrame()) { | 5665 if (focusedFrame && focusedFrame->isLocalFrame()) { |
5666 if (toLocalFrame(focusedFrame)->tree().isDescendantOf(frame())) | 5666 if (toLocalFrame(focusedFrame)->tree().isDescendantOf(frame())) |
5667 return true; | 5667 return true; |
5668 } | 5668 } |
5669 return false; | 5669 return false; |
5670 } | 5670 } |
5671 | 5671 |
| 5672 #if ENABLE(OILPAN) |
| 5673 template<unsigned type> |
| 5674 bool shouldInvalidateNodeListCachesForAttr(const HeapHashSet<WeakMember<const Li
veNodeListBase> > nodeLists[], const QualifiedName& attrName) |
| 5675 { |
| 5676 if (!nodeLists[type].isEmpty() && LiveNodeListBase::shouldInvalidateTypeOnAt
tributeChange(static_cast<NodeListInvalidationType>(type), attrName)) |
| 5677 return true; |
| 5678 return shouldInvalidateNodeListCachesForAttr<type + 1>(nodeLists, attrName); |
| 5679 } |
| 5680 |
| 5681 template<> |
| 5682 bool shouldInvalidateNodeListCachesForAttr<numNodeListInvalidationTypes>(const H
eapHashSet<WeakMember<const LiveNodeListBase> >[], const QualifiedName&) |
| 5683 { |
| 5684 return false; |
| 5685 } |
| 5686 #else |
| 5687 template<unsigned type> |
| 5688 bool shouldInvalidateNodeListCachesForAttr(const unsigned nodeListCounts[], cons
t QualifiedName& attrName) |
| 5689 { |
| 5690 if (nodeListCounts[type] && LiveNodeListBase::shouldInvalidateTypeOnAttribut
eChange(static_cast<NodeListInvalidationType>(type), attrName)) |
| 5691 return true; |
| 5692 return shouldInvalidateNodeListCachesForAttr<type + 1>(nodeListCounts, attrN
ame); |
| 5693 } |
| 5694 |
| 5695 template<> |
| 5696 bool shouldInvalidateNodeListCachesForAttr<numNodeListInvalidationTypes>(const u
nsigned[], const QualifiedName&) |
| 5697 { |
| 5698 return false; |
| 5699 } |
| 5700 #endif |
| 5701 |
5672 bool Document::shouldInvalidateNodeListCaches(const QualifiedName* attrName) con
st | 5702 bool Document::shouldInvalidateNodeListCaches(const QualifiedName* attrName) con
st |
5673 { | 5703 { |
5674 if (attrName) { | 5704 if (attrName) { |
5675 for (int type = 1; type < numNodeListInvalidationTypes; ++type) { | |
5676 #if ENABLE(OILPAN) | 5705 #if ENABLE(OILPAN) |
5677 if (m_nodeLists[type].isEmpty()) { | 5706 return shouldInvalidateNodeListCachesForAttr<DoNotInvalidateOnAttributeC
hanges + 1>(m_nodeLists, *attrName); |
5678 #else | 5707 #else |
5679 if (!m_nodeListCounts[type]) { | 5708 return shouldInvalidateNodeListCachesForAttr<DoNotInvalidateOnAttributeC
hanges + 1>(m_nodeListCounts, *attrName); |
5680 #endif | 5709 #endif |
5681 continue; | |
5682 } | |
5683 | |
5684 if (LiveNodeListBase::shouldInvalidateTypeOnAttributeChange(static_c
ast<NodeListInvalidationType>(type), *attrName)) | |
5685 return true; | |
5686 } | |
5687 } | 5710 } |
5688 | 5711 |
5689 for (int type = 0; type < numNodeListInvalidationTypes; ++type) { | 5712 for (int type = 0; type < numNodeListInvalidationTypes; ++type) { |
5690 #if ENABLE(OILPAN) | 5713 #if ENABLE(OILPAN) |
5691 if (!m_nodeLists[type].isEmpty()) | 5714 if (!m_nodeLists[type].isEmpty()) |
5692 #else | 5715 #else |
5693 if (m_nodeListCounts[type]) | 5716 if (m_nodeListCounts[type]) |
5694 #endif | 5717 #endif |
5695 return true; | 5718 return true; |
5696 } | 5719 } |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5759 visitor->trace(m_timeline); | 5782 visitor->trace(m_timeline); |
5760 visitor->trace(m_compositorPendingAnimations); | 5783 visitor->trace(m_compositorPendingAnimations); |
5761 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); | 5784 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); |
5762 DocumentSupplementable::trace(visitor); | 5785 DocumentSupplementable::trace(visitor); |
5763 TreeScope::trace(visitor); | 5786 TreeScope::trace(visitor); |
5764 ContainerNode::trace(visitor); | 5787 ContainerNode::trace(visitor); |
5765 ExecutionContext::trace(visitor); | 5788 ExecutionContext::trace(visitor); |
5766 } | 5789 } |
5767 | 5790 |
5768 } // namespace WebCore | 5791 } // namespace WebCore |
OLD | NEW |