Skip to main content

ancestor_quick_reject

Function ancestor_quick_reject 

Source
fn ancestor_quick_reject(node: &Node, simple: &SimpleSelector) -> bool
Expand description

祖先位置のコンパウンドが明らかに一致しないか(要素でない・タグ・id・クラスの不一致)。 本照合(matches_selector_step_node)の前の枝刈り。true なら一致し得ない。

【2026-10-24】従来はタグと id だけを見ていた。YouTube(Polymer)の規則はほぼ .ytd-xxx .yyy のクラスの子孫セレクタで、祖先ごとに本照合と disabled 判定 (祖先全体をたどる)が走り、深さの二乗の照合になっていた。