mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Make HTMLFontElementLayoutHelpers methods take self
This commit is contained in:
parent
56ef9b5170
commit
fea4a2e629
1 changed files with 6 additions and 6 deletions
|
@ -101,14 +101,14 @@ impl VirtualMethods for HTMLFontElement {
|
|||
}
|
||||
|
||||
pub trait HTMLFontElementLayoutHelpers {
|
||||
fn get_color(&self) -> Option<RGBA>;
|
||||
fn get_face(&self) -> Option<Atom>;
|
||||
fn get_size(&self) -> Option<u32>;
|
||||
fn get_color(self) -> Option<RGBA>;
|
||||
fn get_face(self) -> Option<Atom>;
|
||||
fn get_size(self) -> Option<u32>;
|
||||
}
|
||||
|
||||
impl HTMLFontElementLayoutHelpers for LayoutDom<'_, HTMLFontElement> {
|
||||
#[allow(unsafe_code)]
|
||||
fn get_color(&self) -> Option<RGBA> {
|
||||
fn get_color(self) -> Option<RGBA> {
|
||||
unsafe {
|
||||
(*self.upcast::<Element>().unsafe_get())
|
||||
.get_attr_for_layout(&ns!(), &local_name!("color"))
|
||||
|
@ -118,7 +118,7 @@ impl HTMLFontElementLayoutHelpers for LayoutDom<'_, HTMLFontElement> {
|
|||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
fn get_face(&self) -> Option<Atom> {
|
||||
fn get_face(self) -> Option<Atom> {
|
||||
unsafe {
|
||||
(*self.upcast::<Element>().unsafe_get())
|
||||
.get_attr_for_layout(&ns!(), &local_name!("face"))
|
||||
|
@ -128,7 +128,7 @@ impl HTMLFontElementLayoutHelpers for LayoutDom<'_, HTMLFontElement> {
|
|||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
fn get_size(&self) -> Option<u32> {
|
||||
fn get_size(self) -> Option<u32> {
|
||||
let size = unsafe {
|
||||
(*self.upcast::<Element>().unsafe_get())
|
||||
.get_attr_for_layout(&ns!(), &local_name!("size"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue