mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Fix LayoutElementHelpers::get_classes_for_layout
It should not return a 'static reference
This commit is contained in:
parent
05c71dff88
commit
4279fe5933
1 changed files with 2 additions and 2 deletions
|
@ -624,7 +624,7 @@ pub trait LayoutElementHelpers<'dom> {
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
unsafe fn has_class_for_layout(self, name: &Atom, case_sensitivity: CaseSensitivity) -> bool;
|
unsafe fn has_class_for_layout(self, name: &Atom, case_sensitivity: CaseSensitivity) -> bool;
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
unsafe fn get_classes_for_layout(self) -> Option<&'static [Atom]>;
|
unsafe fn get_classes_for_layout(self) -> Option<&'dom [Atom]>;
|
||||||
|
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
unsafe fn synthesize_presentational_hints_for_legacy_attributes<V>(self, _: &mut V)
|
unsafe fn synthesize_presentational_hints_for_legacy_attributes<V>(self, _: &mut V)
|
||||||
|
@ -666,7 +666,7 @@ impl<'dom> LayoutElementHelpers<'dom> for LayoutDom<'dom, Element> {
|
||||||
|
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
#[inline]
|
#[inline]
|
||||||
unsafe fn get_classes_for_layout(self) -> Option<&'static [Atom]> {
|
unsafe fn get_classes_for_layout(self) -> Option<&'dom [Atom]> {
|
||||||
get_attr_for_layout(&*self.unsafe_get(), &ns!(), &local_name!("class"))
|
get_attr_for_layout(&*self.unsafe_get(), &ns!(), &local_name!("class"))
|
||||||
.map(|attr| attr.value_tokens_forever().unwrap())
|
.map(|attr| attr.value_tokens_forever().unwrap())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue