From a82ed50257ebafe33dac5595606a4c4e548102b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 17 Apr 2018 19:50:49 +0200 Subject: [PATCH] style: Fix build after 1bc30a67320ce90f2e07988925a340b457f1a43a. --- components/layout_thread/dom_wrapper.rs | 8 ++++++++ components/style/style_adjuster.rs | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/components/layout_thread/dom_wrapper.rs b/components/layout_thread/dom_wrapper.rs index 55bacd037cb..309ddaf7e93 100644 --- a/components/layout_thread/dom_wrapper.rs +++ b/components/layout_thread/dom_wrapper.rs @@ -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>> { unsafe { (*self.element.style_attribute()).as_ref().map(|x| x.borrow_arc()) diff --git a/components/style/style_adjuster.rs b/components/style/style_adjuster.rs index d86639300e9..b7270976ead 100644 --- a/components/style/style_adjuster.rs +++ b/components/style/style_adjuster.rs @@ -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(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] = [