mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
style: Do not use borrowed types in the selectors::Element trait.
Closes #22972 Closes #23463
This commit is contained in:
parent
2e5078e9c5
commit
6f1df517e0
8 changed files with 100 additions and 42 deletions
|
@ -391,7 +391,7 @@ pub trait ThreadSafeLayoutElement:
|
|||
|
||||
#[inline]
|
||||
fn get_details_summary_pseudo(&self) -> Option<Self> {
|
||||
if self.local_name() == &local_name!("details") && self.namespace() == &ns!(html) {
|
||||
if self.has_local_name(&local_name!("details")) && self.has_namespace(&ns!(html)) {
|
||||
Some(self.with_pseudo(PseudoElementType::DetailsSummary))
|
||||
} else {
|
||||
None
|
||||
|
@ -400,8 +400,8 @@ pub trait ThreadSafeLayoutElement:
|
|||
|
||||
#[inline]
|
||||
fn get_details_content_pseudo(&self) -> Option<Self> {
|
||||
if self.local_name() == &local_name!("details") &&
|
||||
self.namespace() == &ns!(html) &&
|
||||
if self.has_local_name(&local_name!("details")) &&
|
||||
self.has_namespace(&ns!(html)) &&
|
||||
self.get_attr(&ns!(), &local_name!("open")).is_some()
|
||||
{
|
||||
Some(self.with_pseudo(PseudoElementType::DetailsContent))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue