Index: Source/core/dom/Document.h |
diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h |
index ba3991c01785e3cb0400f646c9eb302f30e6591f..60c5e83ea7da3238fe0b215752c03e61983a78f4 100644 |
--- a/Source/core/dom/Document.h |
+++ b/Source/core/dom/Document.h |
@@ -346,7 +346,7 @@ public: |
* @param bottomPadding How much to expand the bottom of the rectangle |
* @param leftPadding How much to expand the left of the rectangle |
*/ |
- PassRefPtr<NodeList> nodesFromRect(int centerX, int centerY, |
+ PassRefPtrWillBeRawPtr<NodeList> nodesFromRect(int centerX, int centerY, |
unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding, |
HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::ConfusingAndOftenMisusedDisallowShadowContent) const; |
Element* elementFromPoint(int x, int y) const; |
@@ -393,18 +393,18 @@ public: |
PassRefPtrWillBeRawPtr<Node> adoptNode(PassRefPtrWillBeRawPtr<Node> source, ExceptionState&); |
- PassRefPtr<HTMLCollection> images(); |
- PassRefPtr<HTMLCollection> embeds(); |
- PassRefPtr<HTMLCollection> applets(); |
- PassRefPtr<HTMLCollection> links(); |
- PassRefPtr<HTMLCollection> forms(); |
- PassRefPtr<HTMLCollection> anchors(); |
- PassRefPtr<HTMLCollection> scripts(); |
- PassRefPtr<HTMLAllCollection> allForBinding(); |
- PassRefPtr<HTMLAllCollection> all(); |
+ PassRefPtrWillBeRawPtr<HTMLCollection> images(); |
+ PassRefPtrWillBeRawPtr<HTMLCollection> embeds(); |
+ PassRefPtrWillBeRawPtr<HTMLCollection> applets(); |
+ PassRefPtrWillBeRawPtr<HTMLCollection> links(); |
+ PassRefPtrWillBeRawPtr<HTMLCollection> forms(); |
+ PassRefPtrWillBeRawPtr<HTMLCollection> anchors(); |
+ PassRefPtrWillBeRawPtr<HTMLCollection> scripts(); |
+ PassRefPtrWillBeRawPtr<HTMLAllCollection> allForBinding(); |
+ PassRefPtrWillBeRawPtr<HTMLAllCollection> all(); |
- PassRefPtr<HTMLCollection> windowNamedItems(const AtomicString& name); |
- PassRefPtr<HTMLCollection> documentNamedItems(const AtomicString& name); |
+ PassRefPtrWillBeRawPtr<HTMLCollection> windowNamedItems(const AtomicString& name); |
+ PassRefPtrWillBeRawPtr<HTMLCollection> documentNamedItems(const AtomicString& name); |
bool isHTMLDocument() const { return m_documentClasses & HTMLDocumentClass; } |
bool isXHTMLDocument() const { return m_documentClasses & XHTMLDocumentClass; } |
@@ -661,10 +661,10 @@ public: |
void scheduleRenderTreeUpdateIfNeeded(); |
bool hasPendingForcedStyleRecalc() const; |
- void registerNodeList(LiveNodeListBase*); |
- void unregisterNodeList(LiveNodeListBase*); |
- void incrementNodeListWithIdNameCacheCount(); |
- void decrementNodeListWithIdNameCacheCount(); |
+ void registerNodeList(const LiveNodeListBase*); |
+ void unregisterNodeList(const LiveNodeListBase*); |
+ void registerNodeListWithIdNameCache(const LiveNodeListBase*); |
+ void unregisterNodeListWithIdNameCache(const LiveNodeListBase*); |
bool shouldInvalidateNodeListCaches(const QualifiedName* attrName = 0) const; |
void invalidateNodeListCaches(const QualifiedName* attrName); |
@@ -1152,14 +1152,14 @@ private: |
void executeScriptsWaitingForResourcesIfNeeded(); |
- PassRefPtr<NodeList> handleZeroPadding(const HitTestRequest&, HitTestResult&) const; |
+ PassRefPtrWillBeRawPtr<NodeList> handleZeroPadding(const HitTestRequest&, HitTestResult&) const; |
void loadEventDelayTimerFired(Timer<Document>*); |
void pluginLoadingTimerFired(Timer<Document>*); |
PageVisibilityState pageVisibilityState() const; |
- PassRefPtr<HTMLCollection> ensureCachedCollection(CollectionType); |
+ PassRefPtrWillBeRawPtr<HTMLCollection> ensureCachedCollection(CollectionType); |
// Note that dispatching a window load event may cause the DOMWindow to be detached from |
// the LocalFrame, so callers should take a reference to the DOMWindow (which owns us) to |
@@ -1304,8 +1304,16 @@ private: |
InheritedBool m_designMode; |
- HashSet<LiveNodeListBase*> m_listsInvalidatedAtDocument; |
+ WillBeHeapHashSet<RawPtrWillBeWeakMember<const LiveNodeListBase> > m_listsInvalidatedAtDocument; |
+#if ENABLE(OILPAN) |
+ // Oilpan keeps track of all registered NodeLists. |
+ // |
+ // FIXME: Oilpan: improve - only need to know if a NodeList |
+ // is currently alive or not for the different types. |
+ HeapHashSet<WeakMember<const LiveNodeListBase> > m_nodeLists[numNodeListInvalidationTypes]; |
+#else |
unsigned m_nodeListCounts[numNodeListInvalidationTypes]; |
+#endif |
OwnPtrWillBeMember<SVGDocumentExtensions> m_svgExtensions; |
@@ -1414,17 +1422,6 @@ inline bool Document::shouldOverrideLegacyDescription(ViewportDescription::Type |
return origin >= m_legacyViewportDescription.type; |
} |
-inline void Document::incrementNodeListWithIdNameCacheCount() |
-{ |
- m_nodeListCounts[InvalidateOnIdNameAttrChange]++; |
-} |
- |
-inline void Document::decrementNodeListWithIdNameCacheCount() |
-{ |
- ASSERT(m_nodeListCounts[InvalidateOnIdNameAttrChange] > 0); |
- m_nodeListCounts[InvalidateOnIdNameAttrChange]--; |
-} |
- |
inline void Document::scheduleRenderTreeUpdateIfNeeded() |
{ |
// Inline early out to avoid the function calls below. |