From 841aef06e0c8a9009e38af00ed9c5dfd8cc681ba Mon Sep 17 00:00:00 2001 From: Mauricio Collares Date: Mon, 4 Apr 2016 23:11:04 -0300 Subject: [PATCH] Move CSS content property from Box to Counters --- components/layout/incremental.rs | 2 +- components/layout/wrapper.rs | 2 +- components/style/properties.mako.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/layout/incremental.rs b/components/layout/incremental.rs index 1142c947142..09aba3adb46 100644 --- a/components/layout/incremental.rs +++ b/components/layout/incremental.rs @@ -176,7 +176,7 @@ pub fn compute_damage(old: Option<&Arc>, new: &ServoCompute REFLOW, RECONSTRUCT_FLOW ], [ - get_box.float, get_box.display, get_box.position, get_box.content, + get_box.float, get_box.display, get_box.position, get_counters.content, get_counters.counter_reset, get_counters.counter_increment, get_list.quotes, get_list.list_style_type, diff --git a/components/layout/wrapper.rs b/components/layout/wrapper.rs index a0f7c54de93..ad8ce2f5141 100644 --- a/components/layout/wrapper.rs +++ b/components/layout/wrapper.rs @@ -1034,7 +1034,7 @@ impl<'ln> ThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> { data.per_pseudo.get(&PseudoElement::After).unwrap() }; - return match style.as_ref().get_box().content { + return match style.as_ref().get_counters().content { content::T::Content(ref value) if !value.is_empty() => { TextContent::GeneratedContent((*value).clone()) } diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs index bc6bbf5c020..51346788d40 100644 --- a/components/style/properties.mako.rs +++ b/components/style/properties.mako.rs @@ -904,7 +904,7 @@ pub mod longhands { // CSS 2.1, Section 12 - Generated content, automatic numbering, and lists - ${switch_to_style_struct("Box")} + ${new_style_struct("Counters", is_inherited=False)} <%self:longhand name="content"> use cssparser::Token; @@ -1217,7 +1217,7 @@ pub mod longhands { } - ${new_style_struct("Counters", is_inherited=False)} + ${switch_to_style_struct("Counters")} <%self:longhand name="counter-increment"> use std::fmt;