Commit 591eb3d4 authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

DOM: Stop inlining Node::parentNode().

This is a preparation to add a UseCounter in Node::parentNode().

Bug: 859391
Change-Id: I056f60207e000b6f9b1acd6e412444f96a8daee2
Reviewed-on: https://chromium-review.googlesource.com/1121944Reviewed-by: default avatarHayato Ito <hayato@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571831}
parent d5cd3dcb
...@@ -357,6 +357,10 @@ void Node::setNodeValue(const String&) { ...@@ -357,6 +357,10 @@ void Node::setNodeValue(const String&) {
// By default, setting nodeValue has no effect. // By default, setting nodeValue has no effect.
} }
ContainerNode* Node::parentNode() const {
return IsShadowRoot() ? nullptr : ParentOrShadowHostNode();
}
NodeList* Node::childNodes() { NodeList* Node::childNodes() {
ThreadState::MainThreadGCForbiddenScope gc_forbidden; ThreadState::MainThreadGCForbiddenScope gc_forbidden;
if (IsContainerNode()) if (IsContainerNode())
......
...@@ -1030,10 +1030,6 @@ inline ContainerNode* Node::ParentOrShadowHostNode() const { ...@@ -1030,10 +1030,6 @@ inline ContainerNode* Node::ParentOrShadowHostNode() const {
return reinterpret_cast<ContainerNode*>(parent_or_shadow_host_node_.Get()); return reinterpret_cast<ContainerNode*>(parent_or_shadow_host_node_.Get());
} }
inline ContainerNode* Node::parentNode() const {
return IsShadowRoot() ? nullptr : ParentOrShadowHostNode();
}
inline void Node::LazyReattachIfAttached() { inline void Node::LazyReattachIfAttached() {
if (NeedsAttach()) if (NeedsAttach())
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment