mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Stop using get_unsigned_integer_attribute_for_layout in has_nonzero_border.
This commit is contained in:
parent
1b99fd7ecb
commit
52afa1dc34
1 changed files with 3 additions and 3 deletions
|
@ -40,6 +40,7 @@ use data::{LayoutDataAccess, LayoutDataFlags, LayoutDataWrapper, PrivateLayoutDa
|
||||||
use opaque_node::OpaqueNodeMethods;
|
use opaque_node::OpaqueNodeMethods;
|
||||||
|
|
||||||
use gfx::display_list::OpaqueNode;
|
use gfx::display_list::OpaqueNode;
|
||||||
|
use script::dom::attr::AttrValue;
|
||||||
use script::dom::bindings::codegen::InheritTypes::{CharacterDataCast, ElementCast};
|
use script::dom::bindings::codegen::InheritTypes::{CharacterDataCast, ElementCast};
|
||||||
use script::dom::bindings::codegen::InheritTypes::{HTMLIFrameElementCast, HTMLCanvasElementCast};
|
use script::dom::bindings::codegen::InheritTypes::{HTMLIFrameElementCast, HTMLCanvasElementCast};
|
||||||
use script::dom::bindings::codegen::InheritTypes::{HTMLImageElementCast, HTMLInputElementCast};
|
use script::dom::bindings::codegen::InheritTypes::{HTMLImageElementCast, HTMLInputElementCast};
|
||||||
|
@ -638,9 +639,8 @@ impl<'le> TElement<'le> for LayoutElement<'le> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn has_nonzero_border(self) -> bool {
|
fn has_nonzero_border(self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
match self.element.get_unsigned_integer_attribute_for_layout(
|
match self.element.get_attr_for_layout(&ns!(""), &atom!("border")) {
|
||||||
UnsignedIntegerAttribute::Border) {
|
None | Some(&AttrValue::UInt(_, 0)) => false,
|
||||||
None | Some(0) => false,
|
|
||||||
_ => true,
|
_ => true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue