style: Fix build after 1bc30a6732.

This commit is contained in:
Emilio Cobos Álvarez 2018-04-17 19:50:49 +02:00
parent 827b82dc39
commit a82ed50257
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 10 additions and 1 deletions

View file

@ -397,6 +397,14 @@ impl<'le> TElement for ServoLayoutElement<'le> {
unsafe { self.element.is_html_element() }
}
fn is_mathml_element(&self) -> bool {
*self.element.namespace() == ns!(mathml)
}
fn is_svg_element(&self) -> bool {
*self.element.namespace() == ns!(svg)
}
fn style_attribute(&self) -> Option<ArcBorrow<StyleLocked<PropertyDeclarationBlock>>> {
unsafe {
(*self.element.style_attribute()).as_ref().map(|x| x.borrow_arc())

View file

@ -5,7 +5,6 @@
//! A struct to encapsulate all the style fixups and flags propagations
//! a computed style needs in order for it to adhere to the CSS spec.
use Atom;
use app_units::Au;
use dom::TElement;
use properties::{self, CascadeFlags, ComputedValues, StyleBuilder};
@ -52,6 +51,8 @@ fn is_effective_display_none_for_display_contents<E>(element: E) -> bool
where
E: TElement,
{
use Atom;
// FIXME(emilio): This should be an actual static.
lazy_static! {
static ref SPECIAL_HTML_ELEMENTS: [Atom; 16] = [