Bug 1464782: Some manual fixups to be squashed above. r?xidorn draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 26 Jun 2018 20:58:58 +0200
changeset 811248 fac8efee41a6fcfa264c8fb9d2958ba854696944
parent 811247 06735c30610cdf0572a083d980f5c78dee0c5bd5
child 811249 d8adb636cf97ffc66c79613aa933b48442f0230f
push id114244
push userbmo:emilio@crisal.io
push dateWed, 27 Jun 2018 09:27:25 +0000
reviewersxidorn
bugs1464782
milestone63.0a1
Bug 1464782: Some manual fixups to be squashed above. r?xidorn MozReview-Commit-ID: 8mOPAtY4jPi
layout/reftests/abs-pos/reftest.list
layout/style/test/property_database.js
layout/style/test/test_logical_properties.html
--- a/layout/reftests/abs-pos/reftest.list
+++ b/layout/reftests/abs-pos/reftest.list
@@ -1,11 +1,11 @@
 == font-size-wrap.html font-size-wrap-ref.html
 == abs-pos-auto-margin-1.html abs-pos-auto-margin-1-ref.html
-fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,73,1) == auto-inset-inline-block-1.html auto-inset-inline-block-1-ref.html # bug 696670
+fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,73,1) == auto-offset-inline-block-1.html auto-offset-inline-block-1-ref.html # bug 696670
 == fieldset-1.html fieldset-1-ref.html
 == table-1.html table-1-ref.html
 == table-2.html table-2-ref.html
 == table-3.html table-3-ref.html
 == table-caption-1.html table-internal-1-ref.html
 == table-caption-2.html table-internal-2-ref.html
 == table-caption-3.html table-internal-3-ref.html
 == table-caption-4.html table-internal-8-ref.html
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -5953,17 +5953,17 @@ var gCSSProperties = {
       "calc(50%)",
       "calc(3*25px)",
       "calc(25px*3)",
       "calc(3*25px + 50%)",
     ],
     invalid_values: [ "none", "5" ]
   },
   "inset-block-end": {
-    domProp: "offsetBlockEnd",
+    domProp: "insetBlockEnd",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     logical: true,
     get_computed: logical_box_prop_get_computed,
     /* FIXME: run tests with multiple prerequisites */
     prerequisites: { "position": "relative" },
     /* XXX 0 may or may not be equal to auto */
     initial_values: [ "auto" ],
@@ -5973,17 +5973,17 @@ var gCSSProperties = {
       "calc(50%)",
       "calc(3*25px)",
       "calc(25px*3)",
       "calc(3*25px + 50%)",
     ],
     invalid_values: []
   },
   "inset-block-start": {
-    domProp: "offsetBlockStart",
+    domProp: "insetBlockStart",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     logical: true,
     get_computed: logical_box_prop_get_computed,
     /* FIXME: run tests with multiple prerequisites */
     prerequisites: { "position": "relative" },
     /* XXX 0 may or may not be equal to auto */
     initial_values: [ "auto" ],
@@ -5993,17 +5993,17 @@ var gCSSProperties = {
       "calc(50%)",
       "calc(3*25px)",
       "calc(25px*3)",
       "calc(3*25px + 50%)",
     ],
     invalid_values: []
   },
   "inset-inline-end": {
-    domProp: "offsetInlineEnd",
+    domProp: "insetInlineEnd",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     logical: true,
     get_computed: logical_box_prop_get_computed,
     /* FIXME: run tests with multiple prerequisites */
     prerequisites: { "position": "relative" },
     /* XXX 0 may or may not be equal to auto */
     initial_values: [ "auto" ],
@@ -6013,17 +6013,17 @@ var gCSSProperties = {
       "calc(50%)",
       "calc(3*25px)",
       "calc(25px*3)",
       "calc(3*25px + 50%)",
     ],
     invalid_values: []
   },
   "inset-inline-start": {
-    domProp: "offsetInlineStart",
+    domProp: "insetInlineStart",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     logical: true,
     get_computed: logical_box_prop_get_computed,
     /* FIXME: run tests with multiple prerequisites */
     prerequisites: { "position": "relative" },
     /* XXX 0 may or may not be equal to auto */
     initial_values: [ "auto" ],
@@ -6190,18 +6190,18 @@ function logical_box_prop_get_computed(c
       logicalSide = aLogicalPrefix + logicalSide;
       aProperty = aProperty.replace(logicalSide, physicalSide);
     }
     return aProperty;
   }
 
   if (/^-moz-/.test(property)) {
     property = physicalize(property.substring(5), inlineMapping, "");
-  } else if (/^offset-(block|inline)-(start|end)/.test(property)) {
-    property = property.substring(7);  // we want "top" not "offset-top", e.g.
+  } else if (/^(offset|inset)-(block|inline)-(start|end)/.test(property)) {
+    property = property.replace("offset-", "").replace("inset-", "");  // we want "top" not "offset-top", e.g.
     property = physicalize(property, blockMapping, "block-");
     property = physicalize(property, inlineMapping, "inline-");
   } else if (/-(block|inline)-(start|end)/.test(property)) {
     property = physicalize(property, blockMapping, "block-");
     property = physicalize(property, inlineMapping, "inline-");
   } else {
     throw "Unexpected property";
   }
--- a/layout/style/test/test_logical_properties.html
+++ b/layout/style/test/test_logical_properties.html
@@ -89,33 +89,33 @@ function init() {
 
   for (var p in gCSSProperties) {
     var type = gCSSProperties[p].type;
 
     if ((type == CSS_TYPE_SHORTHAND_AND_LONGHAND ||
          type == CSS_TYPE_LONGHAND && gCSSProperties[p].logical) &&
         /-inline-end/.test(p)) {
       var valueType;
-      if (/margin|padding|width|offset/.test(p)) {
+      if (/margin|padding|width|inset|offset/.test(p)) {
         valueType = "length";
       } else if (/color/.test(p)) {
         valueType = "color";
       } else if (/border.*style/.test(p)) {
         valueType = "border-style";
       } else {
         throw `unexpected property ${p}`;
       }
       var group = {
         inlineStart: p.replace("-inline-end", "-inline-start"),
         inlineEnd:   p,
         blockStart:  p.replace("-inline-end", "-block-start"),
         blockEnd:    p.replace("-inline-end", "-block-end"),
         type:        valueType
       };
-      if (/^offset/.test(p)) {
+      if (/^(offset|inset)/.test(p)) {
         group.left   = "left";
         group.right  = "right";
         group.top    = "top";
         group.bottom = "bottom";
       } else {
         group.left   = p.replace("-inline-end", "-left");
         group.right  = p.replace("-inline-end", "-right");
         group.top    = p.replace("-inline-end", "-top");