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 5437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5448 // process. See http://crbug.com/339659. | 5448 // process. See http://crbug.com/339659. |
5449 void Document::defaultEventHandler(Event* event) | 5449 void Document::defaultEventHandler(Event* event) |
5450 { | 5450 { |
5451 if (frame() && frame()->remotePlatformLayer()) { | 5451 if (frame() && frame()->remotePlatformLayer()) { |
5452 frame()->chromeClient().forwardInputEvent(this, event); | 5452 frame()->chromeClient().forwardInputEvent(this, event); |
5453 return; | 5453 return; |
5454 } | 5454 } |
5455 Node::defaultEventHandler(event); | 5455 Node::defaultEventHandler(event); |
5456 } | 5456 } |
5457 | 5457 |
| 5458 template<unsigned type> |
| 5459 bool shouldInvalidateNodeListCachesForAttr(const unsigned nodeListCounts[], cons
t QualifiedName& attrName) |
| 5460 { |
| 5461 if (nodeListCounts[type] && LiveNodeListBase::shouldInvalidateTypeOnAttribut
eChange(static_cast<NodeListInvalidationType>(type), attrName)) |
| 5462 return true; |
| 5463 return shouldInvalidateNodeListCachesForAttr<type + 1>(nodeListCounts, attrN
ame); |
| 5464 } |
| 5465 |
| 5466 template<> |
| 5467 bool shouldInvalidateNodeListCachesForAttr<numNodeListInvalidationTypes>(const u
nsigned[], const QualifiedName&) |
| 5468 { |
| 5469 return false; |
| 5470 } |
| 5471 |
| 5472 bool Document::shouldInvalidateNodeListCaches(const QualifiedName* attrName) con
st |
| 5473 { |
| 5474 if (attrName) |
| 5475 return shouldInvalidateNodeListCachesForAttr<DoNotInvalidateOnAttributeC
hanges + 1>(m_nodeListCounts, *attrName); |
| 5476 |
| 5477 for (int type = 0; type < numNodeListInvalidationTypes; type++) { |
| 5478 if (m_nodeListCounts[type]) |
| 5479 return true; |
| 5480 } |
| 5481 |
| 5482 return false; |
| 5483 } |
| 5484 |
| 5485 void Document::invalidateNodeListCaches(const QualifiedName* attrName) |
| 5486 { |
| 5487 HashSet<LiveNodeListBase*>::iterator end = m_listsInvalidatedAtDocument.end(
); |
| 5488 for (HashSet<LiveNodeListBase*>::iterator it = m_listsInvalidatedAtDocument.
begin(); it != end; ++it) |
| 5489 (*it)->invalidateCache(attrName); |
| 5490 } |
| 5491 |
5458 } // namespace WebCore | 5492 } // namespace WebCore |
OLD | NEW |