Bug 1371115 - Part 6: implements nsStyleQuoteValues type properties animatable. r?hiro
In this patch, implements following properties:
* quotes
MozReview-Commit-ID: E3tUyS5r1GG
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -3298,16 +3298,27 @@ fn static_assert() {
unsafe { self.gecko.mQuotes.set_move(refptr.get()) }
}
pub fn copy_quotes_from(&mut self, other: &Self) {
unsafe { self.gecko.mQuotes.set(&other.gecko.mQuotes); }
}
+ pub fn clone_quotes(&self) -> longhands::quotes::computed_value::T {
+ unsafe {
+ let ref gecko_quote_values = *self.gecko.mQuotes.mRawPtr;
+ longhands::quotes::computed_value::T(
+ gecko_quote_values.mQuotePairs.iter().map(|gecko_pair| {
+ (gecko_pair.first.to_string(), gecko_pair.second.to_string())
+ }).collect()
+ )
+ }
+ }
+
#[allow(non_snake_case)]
pub fn set__moz_image_region(&mut self, v: longhands::_moz_image_region::computed_value::T) {
use values::Either;
match v {
Either::Second(_auto) => {
self.gecko.mImageRegion.x = 0;
self.gecko.mImageRegion.y = 0;
--- a/servo/components/style/properties/longhand/list.mako.rs
+++ b/servo/components/style/properties/longhand/list.mako.rs
@@ -137,17 +137,17 @@
% else :
let value = input.try(|input| UrlOrNone::parse(context, input))?;
% endif
return Ok(SpecifiedValue(value));
}
</%helpers:longhand>
-<%helpers:longhand name="quotes" animation_value_type="none"
+<%helpers:longhand name="quotes" animation_value_type="discrete"
spec="https://drafts.csswg.org/css-content/#propdef-quotes">
use cssparser::serialize_string;
use std::fmt;
use style_traits::ToCss;
use values::computed::ComputedValueAsSpecified;
pub use self::computed_value::T as SpecifiedValue;