servo: Merge #15002 - Fix filling of two vector fields for geckolib (from upsuper:background-fields); r=Manishearth
authorXidorn Quan <me@upsuper.org>
Thu, 12 Jan 2017 21:49:04 -0800
changeset 340557 76dfd36216da415b878ed5358476fede4c5921ca
parent 340556 638716c8f497802f52e8ab536c348d39726cd197
child 340558 ba30bedfb5f08be39b43cc6d353c073a31de320d
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersManishearth
servo: Merge #15002 - Fix filling of two vector fields for geckolib (from upsuper:background-fields); r=Manishearth <!-- Please describe your changes on the following line: --> This fixes a crash of stylo when you do the following: ```javascript p.setAttribute("style", "background-blend-mode: multiply"); alert(getComputedStyle(p).backgroundBlendMode); p.setAttribute("style", "background-blend-mode: normal, normal"); alert(getComputedStyle(p).backgroundBlendMode); ``` r? @Manishearth Source-Repo: https://github.com/servo/servo Source-Revision: 93d7298a90c400456e3cea8428ad1c1f3254cc22
servo/components/style/properties/gecko.mako.rs
servo/components/style/properties/longhand/background.mako.rs
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -1769,19 +1769,19 @@ fn static_assert() {
                     _ => () // we need to support url valeus
                 }
             % endif
 
         }
     }
 
     <%
-        fill_fields = "mRepeat mClip mOrigin mPositionX mPositionY mImage"
+        fill_fields = "mRepeat mClip mOrigin mPositionX mPositionY mImage mSize"
         if shorthand == "background":
-            fill_fields += " mAttachment"
+            fill_fields += " mAttachment mBlendMode"
         else:
             # mSourceURI uses mImageCount
             fill_fields += " mMaskMode mComposite"
     %>
     pub fn fill_arrays(&mut self) {
         use gecko_bindings::bindings::Gecko_FillAll${shorthand.title()}Lists;
         use std::cmp;
         let mut max_len = 1;
--- a/servo/components/style/properties/longhand/background.mako.rs
+++ b/servo/components/style/properties/longhand/background.mako.rs
@@ -411,10 +411,10 @@
     }
 </%helpers:vector_longhand>
 
 // https://drafts.fxtf.org/compositing/#background-blend-mode
 ${helpers.single_keyword("background-blend-mode",
                          """normal multiply screen overlay darken lighten color-dodge
                             color-burn hard-light soft-light difference exclusion hue
                             saturation color luminosity""",
-                         vector="true", products="gecko", animatable=False,
+                         vector=True, products="gecko", animatable=False,
                          spec="https://drafts.fxtf.org/compositing/#background-blend-mode")}