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() {
#if DCHECK_IS_ON()
void EventPath::CheckReachability(TreeScope& tree_scope,
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)
->target()
->ToNode()
->GetTreeScope()
.IsInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf(
tree_scope));
.IsInclusiveAncestorTreeScopeOf(tree_scope));
}
}
#endif
......
......@@ -107,10 +107,8 @@ inline void TreeScopeEventContext::CheckReachableNode(EventTarget& target) {
// FIXME: Checks also for SVG elements.
if (target.ToNode()->IsSVGElement())
return;
DCHECK(target.ToNode()
->GetTreeScope()
.IsInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf(
GetTreeScope()));
DCHECK(target.ToNode()->GetTreeScope().IsInclusiveAncestorTreeScopeOf(
GetTreeScope()));
}
#else
inline void TreeScopeEventContext::CheckReachableNode(EventTarget&) {}
......
......@@ -82,8 +82,7 @@ void TreeScope::ResetTreeScope() {
selection_ = nullptr;
}
bool TreeScope::IsInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf(
const TreeScope& scope) const {
bool TreeScope::IsInclusiveAncestorTreeScopeOf(const TreeScope& scope) const {
for (const TreeScope* current = &scope; current;
current = current->ParentTreeScope()) {
if (current == this)
......
......@@ -64,8 +64,7 @@ class CORE_EXPORT TreeScope : public GarbageCollectedMixin {
TreeScope* ParentTreeScope() const { return parent_tree_scope_; }
bool IsInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf(
const TreeScope&) const;
bool IsInclusiveAncestorTreeScopeOf(const TreeScope&) const;
Element* AdjustedFocusedElement() const;
// 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