Commit 50fcd223 authored by Hayato Ito's avatar Hayato Ito Committed by Commit Bot

Rename TreeScope::IsInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf

OlderSiblingShadowRoot no longer makes sense here because it is for multiple shadow roots.

Change-Id: I6f3f1404a0b0bf48a548ea8a021871506f591ad3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1531923
Auto-Submit: Hayato Ito <hayato@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#642439}
parent ebb15c4a
...@@ -407,13 +407,13 @@ void EventPath::EnsureWindowEventContext() { ...@@ -407,13 +407,13 @@ void EventPath::EnsureWindowEventContext() {
#if DCHECK_IS_ON() #if DCHECK_IS_ON()
void EventPath::CheckReachability(TreeScope& tree_scope, void EventPath::CheckReachability(TreeScope& tree_scope,
TouchList& touch_list) { TouchList& touch_list) {
for (wtf_size_t i = 0; i < touch_list.length(); ++i) for (wtf_size_t i = 0; i < touch_list.length(); ++i) {
DCHECK(touch_list.item(i) DCHECK(touch_list.item(i)
->target() ->target()
->ToNode() ->ToNode()
->GetTreeScope() ->GetTreeScope()
.IsInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf( .IsInclusiveAncestorTreeScopeOf(tree_scope));
tree_scope)); }
} }
#endif #endif
......
...@@ -107,10 +107,8 @@ inline void TreeScopeEventContext::CheckReachableNode(EventTarget& target) { ...@@ -107,10 +107,8 @@ inline void TreeScopeEventContext::CheckReachableNode(EventTarget& target) {
// FIXME: Checks also for SVG elements. // FIXME: Checks also for SVG elements.
if (target.ToNode()->IsSVGElement()) if (target.ToNode()->IsSVGElement())
return; return;
DCHECK(target.ToNode() DCHECK(target.ToNode()->GetTreeScope().IsInclusiveAncestorTreeScopeOf(
->GetTreeScope() GetTreeScope()));
.IsInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf(
GetTreeScope()));
} }
#else #else
inline void TreeScopeEventContext::CheckReachableNode(EventTarget&) {} inline void TreeScopeEventContext::CheckReachableNode(EventTarget&) {}
......
...@@ -82,8 +82,7 @@ void TreeScope::ResetTreeScope() { ...@@ -82,8 +82,7 @@ void TreeScope::ResetTreeScope() {
selection_ = nullptr; selection_ = nullptr;
} }
bool TreeScope::IsInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf( bool TreeScope::IsInclusiveAncestorTreeScopeOf(const TreeScope& scope) const {
const TreeScope& scope) const {
for (const TreeScope* current = &scope; current; for (const TreeScope* current = &scope; current;
current = current->ParentTreeScope()) { current = current->ParentTreeScope()) {
if (current == this) if (current == this)
......
...@@ -64,8 +64,7 @@ class CORE_EXPORT TreeScope : public GarbageCollectedMixin { ...@@ -64,8 +64,7 @@ class CORE_EXPORT TreeScope : public GarbageCollectedMixin {
TreeScope* ParentTreeScope() const { return parent_tree_scope_; } TreeScope* ParentTreeScope() const { return parent_tree_scope_; }
bool IsInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf( bool IsInclusiveAncestorTreeScopeOf(const TreeScope&) const;
const TreeScope&) const;
Element* AdjustedFocusedElement() const; Element* AdjustedFocusedElement() const;
// Finds a retargeted element to the given argument, when the retargeted // Finds a retargeted element to the given argument, when the retargeted
......
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