diff options
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r-- | components/layout/construct.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs index 05231a091e4..81910a2d915 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -57,6 +57,7 @@ use script::dom::node::{CommentNodeTypeId, DoctypeNodeTypeId, DocumentFragmentNo use script::dom::node::{DocumentNodeTypeId, ElementNodeTypeId, ProcessingInstructionNodeTypeId}; use script::dom::node::{TextNodeTypeId}; use script::dom::htmlobjectelement::is_image_data; +use servo_util::atom::Atom; use servo_util::namespace; use std::mem; use std::sync::atomics::Relaxed; @@ -108,14 +109,17 @@ pub struct InlineFragmentsConstructionResult { /// Represents an {ib} split that has not yet found the containing block that it belongs to. This /// is somewhat tricky. An example may be helpful. For this DOM fragment: /// +/// ```html /// <span> /// A /// <div>B</div> /// C /// </span> +/// ``` /// /// The resulting `ConstructionItem` for the outer `span` will be: /// +/// ```ignore /// InlineFragmentsConstructionItem(Some(~[ /// InlineBlockSplit { /// predecessor_fragments: ~[ @@ -127,6 +131,7 @@ pub struct InlineFragmentsConstructionResult { /// }),~[ /// C /// ]) +/// ``` pub struct InlineBlockSplit { /// The inline fragments that precede the flow. pub predecessors: InlineFragments, @@ -1047,7 +1052,8 @@ trait ObjectElement { impl<'ln> ObjectElement for ThreadSafeLayoutNode<'ln> { fn get_type_and_data(&self) -> (Option<&'static str>, Option<&'static str>) { let elem = self.as_element(); - (elem.get_attr(&namespace::Null, "type"), elem.get_attr(&namespace::Null, "data")) + (elem.get_attr(&namespace::Null, &satom!("type")), + elem.get_attr(&namespace::Null, &satom!("data"))) } fn has_object_data(&self) -> bool { |