Bug 1453702: followup: Fix Servo build. r=me
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 17 Apr 2018 19:50:49 +0200
changeset 467655 86badb90129d251ed51205dc9ca438b39f55f0bd
parent 467654 5f548a6b01e6f056743a83a9edd32f32c85216c9
child 467656 c6e99e5290a81e80e08c282e9f0bcb2c68e579e9
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1453702
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1453702: followup: Fix Servo build. r=me DONTBUILD MozReview-Commit-ID: 6MklMseUFzO
servo/components/layout_thread/dom_wrapper.rs
servo/components/style/style_adjuster.rs
--- a/servo/components/layout_thread/dom_wrapper.rs
+++ b/servo/components/layout_thread/dom_wrapper.rs
@@ -392,16 +392,24 @@ impl<'le> TElement for ServoLayoutElemen
     fn traversal_children(&self) -> LayoutIterator<Self::TraversalChildrenIterator> {
         LayoutIterator(self.as_node().dom_children())
     }
 
     fn is_html_element(&self) -> bool {
         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())
         }
     }
 
     fn state(&self) -> ElementState {
         self.element.get_state_for_layout()
--- a/servo/components/style/style_adjuster.rs
+++ b/servo/components/style/style_adjuster.rs
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 //! 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};
 use properties::computed_value_flags::ComputedValueFlags;
 use properties::longhands::display::computed_value::T as Display;
 use properties::longhands::float::computed_value::T as Float;
 use properties::longhands::overflow_x::computed_value::T as Overflow;
 use properties::longhands::position::computed_value::T as Position;
@@ -47,16 +46,18 @@ where
 }
 
 // https://drafts.csswg.org/css-display/#unbox
 #[cfg(feature = "gecko")]
 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] = [
             atom!("br"), atom!("wbr"), atom!("meter"), atom!("progress"),
             atom!("canvas"), atom!("embed"), atom!("object"), atom!("audio"),
             atom!("iframe"), atom!("img"), atom!("video"), atom!("frame"),
             atom!("frameset"), atom!("input"), atom!("textarea"),
             atom!("select"),