mirror of
https://github.com/servo/servo.git
synced 2025-08-01 03:30:33 +01:00
style: Add a way to optimize the "attribute in no namespace exists" check
Go through the slow path by default. No behavior change. Differential Revision: https://phabricator.services.mozilla.com/D180528
This commit is contained in:
parent
c36a22a97f
commit
54a783db17
2 changed files with 12 additions and 5 deletions
|
@ -730,11 +730,7 @@ where
|
|||
Component::AttributeInNoNamespaceExists {
|
||||
ref local_name,
|
||||
ref local_name_lower,
|
||||
} => element.attr_matches(
|
||||
&NamespaceConstraint::Specific(&crate::parser::namespace_empty_string::<E::Impl>()),
|
||||
select_name(element, local_name, local_name_lower),
|
||||
&AttrSelectorOperation::Exists,
|
||||
),
|
||||
} => element.has_attr_in_no_namespace(select_name(element, local_name, local_name_lower)),
|
||||
Component::AttributeInNoNamespace {
|
||||
ref local_name,
|
||||
ref value,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue