Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1466)

Unified Diff: Source/web/WebNode.cpp

Issue 270573008: Oilpan: Prepare to support garbage-collected Node in WebNode hierarchy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add FIXME comments Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | Source/web/WebOptionElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebNode.cpp
diff --git a/Source/web/WebNode.cpp b/Source/web/WebNode.cpp
index 2cb629edfb26b734c2d894f6c6647d9416449cc7..ab0d5fc1ee8e57f72c1a36691c46bc27b778c344 100644
--- a/Source/web/WebNode.cpp
+++ b/Source/web/WebNode.cpp
@@ -204,8 +204,15 @@ WebElement WebNode::querySelector(const WebString& tag, WebExceptionCode& ec) co
{
TrackExceptionState exceptionState;
WebElement element;
- if (m_private->isContainerNode())
+ if (m_private->isContainerNode()) {
+#if ENABLE(OILPAN)
+ // FIXME: ContainerNode::querySelector should return an Element raw
+ // pointer.
+ element = toContainerNode(m_private.get())->querySelector(tag, exceptionState).get();
+#else
element = toContainerNode(m_private.get())->querySelector(tag, exceptionState);
+#endif
+ }
ec = exceptionState.code();
return element;
}
@@ -257,18 +264,18 @@ WebElement WebNode::shadowHost() const
return WebElement(coreNode->shadowHost());
}
-WebNode::WebNode(const PassRefPtr<Node>& node)
+WebNode::WebNode(const PassRefPtrWillBeRawPtr<Node>& node)
: m_private(node)
{
}
-WebNode& WebNode::operator=(const PassRefPtr<Node>& node)
+WebNode& WebNode::operator=(const PassRefPtrWillBeRawPtr<Node>& node)
{
m_private = node;
return *this;
}
-WebNode::operator PassRefPtr<Node>() const
+WebNode::operator PassRefPtrWillBeRawPtr<Node>() const
{
return m_private.get();
}
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | Source/web/WebOptionElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698