Index: Source/core/dom/Document.h |
diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h |
index e3762f430142df3d486aa4b9296c01ef05a7fb15..5463f3280dbe944ab25bddfba16a10d0df03d335 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; } |
@@ -663,8 +663,13 @@ public: |
void registerNodeList(LiveNodeListBase*); |
void unregisterNodeList(LiveNodeListBase*); |
+#if ENABLE(OILPAN) |
+ void incrementNodeListWithIdNameCacheCount(const LiveNodeListBase*); |
+ void decrementNodeListWithIdNameCacheCount(const LiveNodeListBase*); |
+#else |
void incrementNodeListWithIdNameCacheCount(); |
void decrementNodeListWithIdNameCacheCount(); |
+#endif |
bool shouldInvalidateNodeListCaches(const QualifiedName* attrName = 0) const; |
void invalidateNodeListCaches(const QualifiedName* attrName); |
@@ -1152,14 +1157,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 +1309,16 @@ private: |
InheritedBool m_designMode; |
- HashSet<LiveNodeListBase*> m_listsInvalidatedAtDocument; |
+ WillBeHeapHashSet<RawPtrWillBeWeakMember<LiveNodeListBase> > m_listsInvalidatedAtDocument; |
+#if ENABLE(OILPAN) |
+ // Oilpan keeps track of all registered NodeLists. |
+ // |
+ // FIXME: Oilpan: improve - only need to know if a NodeList is |
+ // is currently alive or not for the different types. |
Mads Ager (chromium)
2014/05/15 10:54:24
is is -> is
sof
2014/05/15 22:15:57
Done.
|
+ HeapHashSet<WeakMember<LiveNodeListBase> > m_nodeLists[numNodeListInvalidationTypes]; |
+#else |
unsigned m_nodeListCounts[numNodeListInvalidationTypes]; |
+#endif |
OwnPtrWillBeMember<SVGDocumentExtensions> m_svgExtensions; |
@@ -1414,6 +1427,7 @@ inline bool Document::shouldOverrideLegacyDescription(ViewportDescription::Type |
return origin >= m_legacyViewportDescription.type; |
} |
+#if !ENABLE(OILPAN) |
inline void Document::incrementNodeListWithIdNameCacheCount() |
{ |
m_nodeListCounts[InvalidateOnIdNameAttrChange]++; |
@@ -1424,6 +1438,7 @@ inline void Document::decrementNodeListWithIdNameCacheCount() |
ASSERT(m_nodeListCounts[InvalidateOnIdNameAttrChange] > 0); |
m_nodeListCounts[InvalidateOnIdNameAttrChange]--; |
} |
+#endif |
inline void Document::scheduleRenderTreeUpdateIfNeeded() |
{ |