--- a/devtools/server/tests/mochitest/test_inspector-anonymous.html
+++ b/devtools/server/tests/mochitest/test_inspector-anonymous.html
@@ -18,18 +18,16 @@ window.onload = function() {
require("devtools/shared/fronts/inspector");
const {DocumentWalker: _documentWalker} =
require("devtools/server/actors/inspector/document-walker");
const nodeFilterConstants =
require("devtools/shared/dom-node-filter-constants");
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
- const isStylo = SpecialPowers.DOMWindowUtils.isStyledByServo;
-
SpecialPowers.pushPrefEnv({"set": [
["dom.webcomponents.shadowdom.enabled", true]
]});
SimpleTest.waitForExplicitFinish();
let gWalker = null;
let gInspectee = null;
@@ -144,18 +142,18 @@ window.onload = function() {
ok(!before._form.isXBLAnonymous, "Child is not XBL anonymous");
ok(!before._form.isShadowAnonymous, "Child is not shadow anonymous");
ok(before._form.isNativeAnonymous, "Child is native anonymous");
runNextTest();
});
addAsyncTest(async function testShadowAnonymous() {
- // Stylo doesn't currently support shadow DOM (bug 1293844)
- if (isStylo) {
+ if (true) {
+ // FIXME(bug 1465114)
runNextTest();
return;
}
info("Testing shadow DOM content.");
let shadow = await gWalker.querySelector(gWalker.rootNode, "#shadow");
let children = await gWalker.children(shadow);
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -4273,23 +4273,16 @@ nsDOMWindowUtils::EnsureDirtyRootFrame()
return NS_ERROR_FAILURE;
}
presShell->FrameNeedsReflow(frame, nsIPresShell::eStyleChange,
NS_FRAME_IS_DIRTY);
return NS_OK;
}
-NS_IMETHODIMP
-nsDOMWindowUtils::GetIsStyledByServo(bool* aStyledByServo)
-{
- *aStyledByServo = true;
- return NS_OK;
-}
-
NS_INTERFACE_MAP_BEGIN(nsTranslationNodeList)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_ENTRY(nsITranslationNodeList)
NS_INTERFACE_MAP_END
NS_IMPL_ADDREF(nsTranslationNodeList)
NS_IMPL_RELEASE(nsTranslationNodeList)
--- a/dom/base/test/file_domwindowutils_animation.html
+++ b/dom/base/test/file_domwindowutils_animation.html
@@ -122,35 +122,33 @@ function test_getUnanimatedComputedStyle
"NS_ERROR_INVALID_ARG",
"FLUSH_LAYOUT option should throw");
SimpleTest.doesThrow(
() => utils.getUnanimatedComputedStyle(div, null, "opacity", utils.FLUSH_DISPLAY),
"NS_ERROR_INVALID_ARG",
"FLUSH_DISPLAY option should throw");
- if (utils.isStyledByServo) {
- SimpleTest.doesThrow(
- () => utils.getUnanimatedComputedStyle(div, "::before", "opacity", utils.FLUSH_NONE),
- "NS_ERROR_FAILURE",
- "Non-existent pseudo should throw");
+ SimpleTest.doesThrow(
+ () => utils.getUnanimatedComputedStyle(div, "::before", "opacity", utils.FLUSH_NONE),
+ "NS_ERROR_FAILURE",
+ "Non-existent pseudo should throw");
- // Flush styles since getUnanimatedComputedStyle flushes pending styles even
- // with FLUSH_NONE option if the element hasn't yet styled.
- getComputedStyle(div).opacity;
+ // Flush styles since getUnanimatedComputedStyle flushes pending styles even
+ // with FLUSH_NONE option if the element hasn't yet styled.
+ getComputedStyle(div).opacity;
- div.style.opacity = "0";
- is(utils.getUnanimatedComputedStyle(div, null, "opacity", utils.FLUSH_NONE),
- "1",
- "getUnanimatedComputedStyle with FLUSH_NONE should not flush pending styles");
+ div.style.opacity = "0";
+ is(utils.getUnanimatedComputedStyle(div, null, "opacity", utils.FLUSH_NONE),
+ "1",
+ "getUnanimatedComputedStyle with FLUSH_NONE should not flush pending styles");
- is(utils.getUnanimatedComputedStyle(div, null, "opacity", utils.FLUSH_STYLE),
- "0",
- "getUnanimatedComputedStyle with FLUSH_STYLE should flush pending styles");
- }
+ is(utils.getUnanimatedComputedStyle(div, null, "opacity", utils.FLUSH_STYLE),
+ "0",
+ "getUnanimatedComputedStyle with FLUSH_STYLE should flush pending styles");
div.remove();
test_needsFlushWithThrottledAnimations();
}
function checkUnanimatedComputedStyle(property, initialStyle, pseudoType,
expectedBeforeAnimation,
--- a/dom/canvas/test/test_canvas_font_setter.html
+++ b/dom/canvas/test/test_canvas_font_setter.html
@@ -25,19 +25,20 @@ cx.font = "bold 12px serif; background:
is(cx.font, "italic 16px sans-serif", "invalid font should be ignored");
cx.font = "bold 12px/3.0 serif";
is(cx.font, "bold 12px serif", "line-height should be dropped");
cx.font = "inherit";
is(cx.font, "bold 12px serif", "inherit should be ignored");
cx.font = "boold 18px sans-serif";
is(cx.font, "bold 12px serif", "syntax error should be ignored");
-let systemFontCheck = SpecialPowers.DOMWindowUtils.isStyledByServo ? is : todo_is;
+
+// FIXME(emilio): This disagrees with the WPT test: 2dcontext/text-styles/2d.text.font.parse.system.html
cx.font = "menu";
-systemFontCheck(cx.font, "menu", "system fonts should work");
+is(cx.font, "menu", "system fonts should work");
function textmeas() {
return cx.measureText("hello").width;
}
cx.font = "66px serif";
var w_at_66 = textmeas();
cx.font = "20px serif";
--- a/dom/html/test/test_fullscreen-api.html
+++ b/dom/html/test/test_fullscreen-api.html
@@ -70,22 +70,16 @@ var gLinuxE10sSkipList = [
function shouldSkipTest(test) {
if (SpecialPowers.Cc["@mozilla.org/gfx/info;1"].getService(SpecialPowers.Ci.nsIGfxInfo).isHeadless &&
test == "file_fullscreen-plugins.html") {
todo(false, `${test} skipped due to bug 1409805`);
return true;
}
- if (!SpecialPowers.DOMWindowUtils.isStyledByServo &&
- test == "file_fullscreen-shadowdom.html") {
- // Shadow DOM is stylo-only.
- return true;
- }
-
if (!SpecialPowers.isMainProcess() &&
navigator.platform.includes('Linux')) {
for (let item of gLinuxE10sSkipList) {
if (item.test == test) {
todo(false, `${test} skipped due to ${item.reason}`);
return true;
}
}
--- a/dom/interfaces/base/nsIDOMWindowUtils.idl
+++ b/dom/interfaces/base/nsIDOMWindowUtils.idl
@@ -1904,23 +1904,16 @@ interface nsIDOMWindowUtils : nsISupport
* Calls FrameNeedsReflow on that root frame so that a layout flush
* will be necessary.
*
* This should only be used for testing.
*/
void ensureDirtyRootFrame();
/**
- * Whether the current document is styled by Servo's style engine.
- *
- * Always true, pending removal.
- */
- readonly attribute boolean isStyledByServo;
-
- /**
* Capture the contents of the current WebRender frame and
* save them to a folder relative to the current working directory.
*/
void wrCapture();
// These consts are only for testing purposes.
const long DEFAULT_MOUSE_POINTER_ID = 0;
const long DEFAULT_PEN_POINTER_ID = 1;
--- a/dom/smil/test/db_smilCSSFromBy.js
+++ b/dom/smil/test/db_smilCSSFromBy.js
@@ -3,18 +3,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* testcase data for simple "from-by" animations of CSS properties */
// NOTE: This js file requires db_smilCSSPropertyList.js
-const isServoEnabled = SpecialPowers.DOMWindowUtils.isStyledByServo;
-
// Lists of testcases for re-use across multiple properties of the same type
var _fromByTestLists =
{
color: [
new AnimTestcaseFromBy("rgb(10, 20, 30)", "currentColor",
{ midComp: "rgb(35, 45, 55)",
toComp: "rgb(60, 70, 80)"}),
new AnimTestcaseFromBy("currentColor", "rgb(30, 20, 10)",
@@ -42,19 +40,17 @@ var _fromByTestLists =
//
// Gecko, however, clamps the "to" value and interpolates up to that
// clamped result giving:
//
// midComp = (rgb(100, 100, 100) * 0.6 * 0.5 + rgb(255, 255, 255) * 1.0 * 0.5) * (1 / 0.8)
// = rgb(197, 197, 197)
//
new AnimTestcaseFromBy("rgba(100, 100, 100, 0.6)", "rgba(240, 240, 240, 1)",
- { midComp:
- isServoEnabled ? "rgba(225, 225, 225, 0.8)"
- : "rgba(197, 197, 197, 0.8)",
+ { midComp: "rgba(225, 225, 225, 0.8)",
toComp: "rgb(255, 255, 255)"}),
],
lengthNoUnits: [
new AnimTestcaseFromBy("0", "50", { fromComp: "0px", // 0 acts like 0px
midComp: "25px",
toComp: "50px"}),
new AnimTestcaseFromBy("30", "10", { fromComp: "30px",
midComp: "35px",
--- a/dom/tests/mochitest/webcomponents/test_shadowroot_style.html
+++ b/dom/tests/mochitest/webcomponents/test_shadowroot_style.html
@@ -8,20 +8,16 @@ https://bugzilla.mozilla.org/show_bug.cg
<script type="text/javascript" src="head.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=806506">Bug 806506</a>
<script>
-if (!SpecialPowers.DOMWindowUtils.isStyledByServo) {
- SimpleTest.expectAssertions(3, 3); // GeckoRestyleManager stuff.
-}
-
SimpleTest.waitForExplicitFinish();
var content = '<div class="tall" id="bodydiv"></div>' +
'<div id="container"></div>';
setShadowDOMPrefAndCreateIframe(content)
.then((aDocument) => {
var iframeWin = aDocument.defaultView;
--- a/layout/inspector/tests/test_getRelativeRuleLine.html
+++ b/layout/inspector/tests/test_getRelativeRuleLine.html
@@ -23,18 +23,17 @@
#test {
color: blue;
}
</style>
<script type="application/javascript">
const InspectorUtils = SpecialPowers.InspectorUtils;
- const supportsRuleColumn = SpecialPowers.DOMWindowUtils.isStyledByServo ? 14
- : 15;
+ const supportsRuleColumn = 14;
let tests = [
{ sheetNo: 0, ruleNo: 0, lineNo: 1, columnNo: 1 },
{ sheetNo: 1, ruleNo: 0, lineNo: 2, columnNo: supportsRuleColumn },
{ sheetNo: 1, ruleNo: 1, lineNo: 8, columnNo: 5 },
{ sheetNo: 2, ruleNo: 0, lineNo: 1, columnNo: 1 },
{ sheetNo: 2, ruleNo: 1, lineNo: 0, columnNo: 1 },
{ sheetNo: 3, ruleNo: 0, lineNo: 5, columnNo: 6 },
];
--- a/layout/style/test/chrome/test_bug1371453.html
+++ b/layout/style/test/chrome/test_bug1371453.html
@@ -17,18 +17,17 @@ runTest();
async function runTest() {
document.getElementsByTagName("link")[1].sheet.insertRule('@import url("blahblah")', 0);
// Await and then process the event we expect to arrive.
let event = await ContentTaskUtils.waitForEvent(document, "StyleRuleAdded", true);
is(event.rule.type, CSSRule.IMPORT_RULE, "Got expected import rule.");
- let non_stylo_todo_isnot = SpecialPowers.DOMWindowUtils.isStyledByServo ? isnot : todo_isnot;
- non_stylo_todo_isnot(event.rule.styleSheet, null, "Import rule contains a stylesheet.");
+ isnot(event.rule.styleSheet, null, "Import rule contains a stylesheet.");
isnot(event.rule.media, null, "Import rule contains a media list.");
is(event.rule.href, "blahblah", "Import rule contains expected href.");
SimpleTest.finish();
}
deleted file mode 100644
--- a/layout/style/test/file_blank_doc_backend.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE html>
-<iframe></iframe>
-<script>
-let iframe = document.querySelector("iframe");
-iframe.contentDocument.writeln("<style></style>");
-iframe.contentDocument.close();
-opener.finish(window, iframe.contentWindow);
-</script>
--- a/layout/style/test/file_specified_value_serialization_individual_transforms.html
+++ b/layout/style/test/file_specified_value_serialization_individual_transforms.html
@@ -12,22 +12,16 @@
const is = opener.is.bind(opener);
function finish() {
const o = opener;
self.close();
o.SimpleTest.finish();
}
function runTest() {
- // The individual transform functions are not implemented in the Gecko style
- // system.
- if (!SpecialPowers.DOMWindowUtils.isStyledByServo) {
- return;
- }
-
// Test for rotate property serialization.
[
[" 90deg ", "90deg"],
[" 100grad ", "100grad"],
[" 100gRaD ", "100grad"],
[" 0.25turn ", "0.25turn"],
[" 0.25tUrN ", "0.25turn"],
[" 1.57RaD ", "1.57rad"],
--- a/layout/style/test/mochitest.ini
+++ b/layout/style/test/mochitest.ini
@@ -65,18 +65,16 @@ support-files = Ahem.ttf file_animations
[test_animations_variable_changes.html]
[test_animations_with_disabled_properties.html]
support-files = file_animations_with_disabled_properties.html
[test_any_dynamic.html]
[test_asyncopen2.html]
[test_at_rule_parse_serialize.html]
[test_attribute_selector_eof_behavior.html]
[test_background_blend_mode.html]
-[test_blank_doc_backend.html]
-support-files = file_blank_doc_backend.html
[test_box_size_keywords.html]
[test_bug73586.html]
[test_bug74880.html]
[test_bug98997.html]
[test_bug160403.html]
[test_bug200089.html]
[test_bug221428.html]
[test_bug229915.html]
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -222,17 +222,23 @@ var validGradientAndElementValues = [
"radial-gradient(at left calc(25px), red, blue)",
"radial-gradient(at calc(-25%) top, red, blue)",
"radial-gradient(at left calc(-25%), red, blue)",
"radial-gradient(at calc(-25px) top, red, blue)",
"radial-gradient(at left calc(-25px), red, blue)",
"radial-gradient(at calc(100px + -25%) top, red, blue)",
"radial-gradient(at left calc(100px + -25%), red, blue)",
"radial-gradient(at calc(100px + -25px) top, red, blue)",
- "radial-gradient(at left calc(100px + -25px), red, blue)"
+ "radial-gradient(at left calc(100px + -25px), red, blue)",
+
+ "-webkit-linear-gradient(top, red, blue)",
+ "-moz-linear-gradient(top, red, blue)",
+ "-moz-linear-gradient(center 0%, red, blue)",
+ "-moz-linear-gradient(50% top, red, blue)",
+ "-moz-linear-gradient(50% 0%, red, blue)",
];
var invalidGradientAndElementValues = [
"-moz-element(#a:1)",
"-moz-element(a#a)",
"-moz-element(#a a)",
"-moz-element(#a+a)",
"-moz-element(#a())",
/* no quirks mode colors */
@@ -313,17 +319,18 @@ var invalidGradientAndElementValues = [
"radial-gradient(99deg, cover, red, blue)",
"radial-gradient(-1.2345rad, circle, red, blue)",
"radial-gradient(399grad, ellipse closest-corner, red, blue)",
"radial-gradient(399grad, farthest-side circle, red, blue)",
"radial-gradient(top left 99deg, cover, red, blue)",
"radial-gradient(15% 20% -1.2345rad, circle, red, blue)",
"radial-gradient(45px 399grad, ellipse closest-corner, red, blue)",
- "radial-gradient(45px 399grad, farthest-side circle, red, blue)"
+ "radial-gradient(45px 399grad, farthest-side circle, red, blue)",
+ "radial-gradient(circle red, blue)",
];
var unbalancedGradientAndElementValues = [
"-moz-element(#a()",
];
var basicShapeSVGBoxValues = [
"fill-box",
"stroke-box",
@@ -503,36 +510,16 @@ var basicShapeUnbalancedValues = [
// Gradient values that are incorrectly accepted in Gecko, but are correctly
// rejected with Servo's style-system backend (stylo):
let gradientsNewlyRejectedInStylo = [
"radial-gradient(circle red, blue)",
];
-// Gradient values that are consistently serialized in Stylo but not
-// in Gecko. Gecko drops the prefix during roundtrip.
-let gradientsValidInStyloBrokenInGecko = [
- "-webkit-linear-gradient(top, red, blue)",
- "-moz-linear-gradient(top, red, blue)",
- "-moz-linear-gradient(center 0%, red, blue)",
- "-moz-linear-gradient(50% top, red, blue)",
- "-moz-linear-gradient(50% 0%, red, blue)",
-];
-
-if (SpecialPowers.DOMWindowUtils.isStyledByServo) {
- invalidGradientAndElementValues.push(...gradientsNewlyRejectedInStylo);
- validGradientAndElementValues.push(...gradientsValidInStyloBrokenInGecko);
-} else {
- // NOTE: These are technically invalid, but Gecko's CSS parser thinks they're
- // valid. So, if we're using Gecko's style system, we add them to the
- // "valid" list, so we can at least detect if the behavior changes.
- validGradientAndElementValues.push(...gradientsNewlyRejectedInStylo);
-}
-
if (IsCSSPropertyPrefEnabled("layout.css.prefixes.webkit")) {
// Extend gradient lists with valid/invalid webkit-prefixed expressions:
validGradientAndElementValues.push(
// 2008 GRADIENTS: -webkit-gradient()
// ----------------------------------
// linear w/ no color stops (valid) and a variety of position values:
"-webkit-gradient(linear, 1 2, 3 4)",
"-webkit-gradient(linear,1 2,3 4)", // (no extra space)
@@ -3514,17 +3501,17 @@ var gCSSProperties = {
applies_to_placeholder: true,
initial_values: [ "normal" ],
other_values: [
"'liga' on", "'liga'", "\"liga\" 1", "'liga', 'clig' 1",
"\"liga\" off", "\"liga\" 0", '"cv01" 3, "cv02" 4',
'"cswh", "smcp" off, "salt" 4', '"cswh" 1, "smcp" off, "salt" 4',
'"cswh" 0, \'blah\', "liga", "smcp" off, "salt" 4',
'"liga" ,"smcp" 0 , "blah"',
- '"ab\\"c"', '"ab\\\\c"'
+ '"ab\\"c"', '"ab\\\\c"', "'vert' calc(2)"
],
invalid_values: [
'liga', 'liga 1', 'liga normal', '"liga" normal', 'normal liga',
'normal "liga"', 'normal, "liga"', '"liga=1"', "'foobar' on",
'"blahblah" 0', '"liga" 3.14', '"liga" 1 3.14', '"liga" 1 normal',
'"liga" 1 off', '"liga" on off', '"liga" , 0 "smcp"', '"liga" "smcp"'
]
},
@@ -6242,18 +6229,17 @@ function get_computed_value(cs, property
}
return results.join(" ; ");
}
if (info.get_computed)
return info.get_computed(cs, property);
return cs.getPropertyValue(property);
}
-if (SpecialPowers.DOMWindowUtils.isStyledByServo &&
- IsCSSPropertyPrefEnabled("layout.css.individual-transform.enabled")) {
+if (IsCSSPropertyPrefEnabled("layout.css.individual-transform.enabled")) {
gCSSProperties.rotate = {
domProp: "rotate",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "none" ],
other_values: [ "45deg", "45grad", "72rad", "0.25turn", ".57rad",
"0 0 0 0rad", "0 0 1 45deg", "0 0 1 0rad",
/* valid calc() values */
@@ -6366,24 +6352,18 @@ if (IsCSSPropertyPrefEnabled("layout.css
applies_to_first_letter: true,
applies_to_first_line: true,
applies_to_placeholder: true,
initial_values: [ "auto" ],
other_values: [ "none" ],
invalid_values: [ "on" ]
};
gCSSProperties["font"].subproperties.push("font-optical-sizing");
- if (SpecialPowers.DOMWindowUtils.isStyledByServo) {
- gCSSProperties["font-variation-settings"].other_values
- .push("'vert' calc(2.5)");
- }
-}
-
-if (SpecialPowers.DOMWindowUtils.isStyledByServo) {
- gCSSProperties["font-feature-settings"].other_values.push("'vert' calc(2)");
+ gCSSProperties["font-variation-settings"].other_values
+ .push("'vert' calc(2.5)");
}
if (IsCSSPropertyPrefEnabled("layout.css.frames-timing.enabled")) {
gCSSProperties["animation-timing-function"].other_values.push(
"frames(2)", "frames(1000)", "frames( 2 )");
gCSSProperties["animation-timing-function"].invalid_values.push(
"frames(1)", "frames(-2)", "frames", "frames()", "frames(,)",
"frames(a)", "frames(2.0)", "frames(2.5)", "frames(2 3)");
@@ -6674,24 +6654,17 @@ if (IsCSSPropertyPrefEnabled("layout.css
"sepia(0.5,)",
"sepia(0.5, 0.5)",
"sepia(#my-filter)",
"sepia(10px)",
"sepia(-1)",
]
};
- // See https://github.com/w3c/fxtf-drafts/issues/228.
- //
- // This is updated in Stylo but not Gecko.
- if (SpecialPowers.DOMWindowUtils.isStyledByServo) {
- gCSSProperties["filter"].other_values.push("hue-rotate(0)");
- } else {
- gCSSProperties["filter"].invalid_values.push("hue-rotate(0)");
- }
+ gCSSProperties["filter"].other_values.push("hue-rotate(0)");
}
var isGridTemplateSubgridValueEnabled =
IsCSSPropertyPrefEnabled("layout.css.grid-template-subgrid-value.enabled");
gCSSProperties["display"].other_values.push("grid", "inline-grid");
gCSSProperties["grid-auto-flow"] = {
domProp: "gridAutoFlow",
--- a/layout/style/test/test_align_justify_computed_values.html
+++ b/layout/style/test/test_align_justify_computed_values.html
@@ -164,67 +164,61 @@ function main() {
var child = document.getElementById("display");
var abs = document.getElementById("absChild");
is(getComputedAlignItems(elem), 'normal', "default align-items value for block container");
is(getComputedAlignSelf(child), 'auto', "default align-self value for block child");
is(getComputedAlignSelf(abs), 'auto', "default align-self value for block container abs.pos. child");
elem.style.alignItems = "end";
is(getComputedAlignSelf(child), 'auto', "align-self:auto value persists for block child");
is(getComputedAlignSelf(abs), 'auto', "align-self:auto value persists for block container abs.pos. child");
- if (SpecialPowers.DOMWindowUtils.isStyledByServo) {
- elem.style.alignItems = "left";
- is(getComputedAlignItems(elem), 'end', "align-items:left is an invalid declaration");
- is(getComputedAlignSelf(child), 'auto', "align-self:auto persists for block child");
- is(getComputedAlignSelf(abs), 'auto', "align-self:auto value persists for block container abs.pos. child");
- elem.style.alignItems = "right";
- is(getComputedAlignItems(elem), 'end', "align-items:right is an invalid declaration");
- is(getComputedAlignSelf(child), 'auto', "align-self:auto value persists for block child");
- is(getComputedAlignSelf(abs), 'auto', "align-self:auto value persists for block container abs.pos. child");
- }
+ elem.style.alignItems = "left";
+ is(getComputedAlignItems(elem), 'end', "align-items:left is an invalid declaration");
+ is(getComputedAlignSelf(child), 'auto', "align-self:auto persists for block child");
+ is(getComputedAlignSelf(abs), 'auto', "align-self:auto value persists for block container abs.pos. child");
+ elem.style.alignItems = "right";
+ is(getComputedAlignItems(elem), 'end', "align-items:right is an invalid declaration");
+ is(getComputedAlignSelf(child), 'auto', "align-self:auto value persists for block child");
+ is(getComputedAlignSelf(abs), 'auto', "align-self:auto value persists for block container abs.pos. child");
//// Flexbox tests
function testFlexAlignItemsSelf(elem) {
var item = elem.firstChild;
var abs = elem.children[1];
is(getComputedAlignItems(elem), 'normal', "default align-items value for flex container");
is(getComputedAlignSelf(item), 'auto', "default align-self value for flex item");
is(getComputedAlignSelf(abs), 'auto', "default align-self value for flex container abs.pos. child");
elem.style.alignItems = "flex-end";
is(getComputedAlignSelf(item), 'auto', "align-self:auto value persists for flex container child");
is(getComputedAlignSelf(abs), 'auto', "align-self:auto value persists for flex container abs.pos. child");
- if (SpecialPowers.DOMWindowUtils.isStyledByServo) {
- elem.style.alignItems = "left";
- is(getComputedAlignItems(elem), 'flex-end', "align-items:left is an invalid declaration");
- }
+ elem.style.alignItems = "left";
+ is(getComputedAlignItems(elem), 'flex-end', "align-items:left is an invalid declaration");
elem.style.alignItems = "";
}
testFlexAlignItemsSelf(document.getElementById("flexContainer"));
testFlexAlignItemsSelf(document.getElementById("flexContainerGrid"));
//// Grid tests
function testGridAlignItemsSelf(elem) {
var item = elem.firstChild;
var abs = elem.children[1];
is(getComputedAlignItems(elem), 'normal', "default align-items value for grid container");
is(getComputedAlignSelf(item), 'auto', "default align-self value for grid item");
is(getComputedAlignSelf(abs), 'auto', "default align-self value for grid container abs.pos. child");
elem.style.alignItems = "end";
is(getComputedAlignSelf(item), 'auto', "align-self:auto value persists for grid container child");
is(getComputedAlignSelf(abs), 'auto', "align-self:auto value persists for grid container abs.pos. child");
- if (SpecialPowers.DOMWindowUtils.isStyledByServo) {
- elem.style.alignItems = "left";
- is(getComputedAlignItems(elem), 'end', "align-items:left is an invalid declaration");
- is(getComputedAlignSelf(item), 'auto', "align-self:auto value persists for grid container child");
- is(getComputedAlignSelf(abs), 'auto', "align-self:auto value persists for grid container abs.pos. child");
- elem.style.alignItems = "right";
- is(getComputedAlignItems(elem), 'end', "align-items:right is an invalid declaration");
- is(getComputedAlignSelf(item), 'auto', "align-self:auto value persists for grid container child");
- is(getComputedAlignSelf(abs), 'auto', "align-self:auto value persists for grid container abs.pos. child");
- }
+ elem.style.alignItems = "left";
+ is(getComputedAlignItems(elem), 'end', "align-items:left is an invalid declaration");
+ is(getComputedAlignSelf(item), 'auto', "align-self:auto value persists for grid container child");
+ is(getComputedAlignSelf(abs), 'auto', "align-self:auto value persists for grid container abs.pos. child");
+ elem.style.alignItems = "right";
+ is(getComputedAlignItems(elem), 'end', "align-items:right is an invalid declaration");
+ is(getComputedAlignSelf(item), 'auto', "align-self:auto value persists for grid container child");
+ is(getComputedAlignSelf(abs), 'auto', "align-self:auto value persists for grid container abs.pos. child");
item.style.alignSelf = "";
abs.style.alignSelf = "";
elem.style.alignItems = "";
item.style.alignSelf = "";
}
testGridAlignItemsSelf(document.getElementById("gridContainer"));
testGridAlignItemsSelf(document.getElementById("gridContainerFlex"));
@@ -338,24 +332,22 @@ function main() {
var child = document.getElementById("display");
var abs = document.getElementById("absChild");
is(getComputedAlignContent(elem), 'normal', "default align-content value for block container");
is(getComputedAlignContent(child), 'normal', "default align-content value for block child");
is(getComputedAlignContent(abs), 'normal', "default align-content value for block container abs.pos. child");
elem.style.alignContent = "end";
is(getComputedAlignContent(child), 'normal', "default align-content isn't affected by parent align-content value for in-flow child");
is(getComputedAlignContent(abs), 'normal', "default align-content isn't affected by parent align-content value for block container abs.pos. child");
- if (SpecialPowers.DOMWindowUtils.isStyledByServo) {
- elem.style.alignContent = "left";
- is(getComputedAlignContent(elem), 'end', "align-content:left isn't a valid declaration");
- is(getComputedAlignContent(abs), 'normal', "default align-content isn't affected by parent align-content value for block container abs.pos. child");
- elem.style.alignContent = "right";
- is(getComputedAlignContent(elem), 'end', "align-content:right isn't a valid declaration");
- is(getComputedAlignContent(abs), 'normal', "default align-content isn't affected by parent align-content value for block container abs.pos. child");
- }
+ elem.style.alignContent = "left";
+ is(getComputedAlignContent(elem), 'end', "align-content:left isn't a valid declaration");
+ is(getComputedAlignContent(abs), 'normal', "default align-content isn't affected by parent align-content value for block container abs.pos. child");
+ elem.style.alignContent = "right";
+ is(getComputedAlignContent(elem), 'end', "align-content:right isn't a valid declaration");
+ is(getComputedAlignContent(abs), 'normal', "default align-content isn't affected by parent align-content value for block container abs.pos. child");
elem.style.alignContent = "";
//// Flexbox tests
function testFlexAlignContent(elem) {
var item = elem.firstChild;
var abs = elem.children[1];
is(getComputedAlignContent(elem), 'normal', "default align-content value for flex container");
is(getComputedAlignContent(item), 'normal', "default align-content value for flex item");
deleted file mode 100644
--- a/layout/style/test/test_blank_doc_backend.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test backend of blank document</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<iframe></iframe>
-<pre id="log">
-<script>
-SimpleTest.waitForExplicitFinish();
-let win = window.open("file_blank_doc_backend.html", "", "width=500,height=500");
-function finish(parentWin, iframeWin) {
- let parentDOMUtils = SpecialPowers.getDOMWindowUtils(parentWin);
- let iframeDOMUtils = SpecialPowers.getDOMWindowUtils(iframeWin);
- is(parentDOMUtils.isStyledByServo, iframeDOMUtils.isStyledByServo,
- "Blank document backend should match the parent document");
- win.close();
- SimpleTest.finish();
-};
-</script>
-</pre>
-</body>
-</html>
--- a/layout/style/test/test_grid_shorthand_serialization.html
+++ b/layout/style/test/test_grid_shorthand_serialization.html
@@ -21,18 +21,16 @@ var initial_values = {
gridTemplateColumns: "none",
gridAutoFlow: "row",
gridAutoRows: "auto",
gridAutoColumns: "auto",
gridRowGap: "0px",
gridColumnGap: "0px",
};
-const isStylo = SpecialPowers.DOMWindowUtils.isStyledByServo;
-
// For various specified values of the grid-template subproperties,
// test the serialization of the shorthand.
var grid_template_test_cases = [
{
gridTemplateColumns: "100px",
shorthand: "none / 100px",
},
{
@@ -65,23 +63,23 @@ var grid_template_test_cases = [
{
gridTemplateAreas: "\"a\"",
gridTemplateRows: "[foo] 20px [bar]",
shorthand: "[foo] \"a\" 20px [bar]",
},
{
gridTemplateAreas: "\"a\"",
gridTemplateRows: "[foo] repeat(1, 20px) [bar]",
- shorthand: isStylo ? "" : "[foo] \"a\" 20px [bar]",
+ shorthand: "",
},
{
gridTemplateAreas: "\"a a\"",
gridTemplateColumns: "repeat(2, 100px)",
gridTemplateRows: "auto",
- shorthand: isStylo ? "" : "\"a a\" auto / 100px 100px",
+ shorthand: "",
},
// Combinations of longhands that make the shorthand non-serializable:
{
gridTemplateAreas: "\"a\"",
gridTemplateRows: "20px 100px",
shorthand: "",
},
{
--- a/layout/style/test/test_keyframes_vendor_prefix.html
+++ b/layout/style/test/test_keyframes_vendor_prefix.html
@@ -57,18 +57,16 @@ function addDiv(t, attrs) {
if (t && typeof t.add_cleanup === 'function') {
t.add_cleanup(function() {
div.remove();
});
}
return div;
}
-const isStylo = SpecialPowers.DOMWindowUtils.isStyledByServo;
-
test(function(t) {
addStyle(t,
{ '@-webkit-keyframes anim': 'from,to { color: rgb(0, 255, 0); }' });
var div = addDiv(t, { style: 'animation: anim 100s' });
assert_equals(getComputedStyle(div).color, 'rgb(0, 255, 0)');
}, '-webkit- prefix keyframes');
@@ -105,38 +103,26 @@ test(function(t) {
{ '@-webkit-KEYFRAMES anim': 'from,to { color: rgb(0, 255, 0); }' });
var div = addDiv(t, { style: 'animation: anim 100s' });
assert_equals(getComputedStyle(div).color, 'rgb(0, 255, 0)');
}, '-webkit- prefix KEYFRAMES');
test(function(t) {
- if (!isStylo) {
- // FIXME: Bug 1312918: later prefixed rule incorrectly overrides earlier
- // non-prefixed on gecko.
- return;
- }
-
addStyle(t,
{ '@keyframes anim': 'from,to { color: rgb(0, 255, 0); }',
'@-webkit-keyframes anim': 'from,to { color: rgb(255, 0, 0); }' });
var div = addDiv(t, { style: 'animation: anim 100s' });
assert_equals(getComputedStyle(div).color, 'rgb(0, 255, 0)');
}, '-webkit-keyframes should not override earlier non-prefix keyframes');
test(function(t) {
- if (!isStylo) {
- // FIXME: Bug 1312918: later prefixed rule incorrectly overrides earlier
- // non-prefixed on gecko.
- return;
- }
-
addStyle(t,
{ '@keyframes anim': 'from,to { color: rgb(0, 255, 0); }',
'@-moz-keyframes anim': 'from,to { color: rgb(255, 0, 0); }' });
var div = addDiv(t, { style: 'animation: anim 100s' });
assert_equals(getComputedStyle(div).color, 'rgb(0, 255, 0)');
}, '-moz-keyframes should not override earlier non-prefix keyframes');
--- a/layout/style/test/test_parser_diagnostics_unprintables.html
+++ b/layout/style/test/test_parser_diagnostics_unprintables.html
@@ -13,18 +13,16 @@
>Mozilla Bug 229827</a>
<style id="testbench"></style>
<script type="application/javascript">
// This test has intimate knowledge of how to get the CSS parser to
// emit diagnostics that contain text under control of the user.
// That's not the point of the test, though; the point is only that
// *that text* is properly escaped.
-const isStylo = SpecialPowers.DOMWindowUtils.isStyledByServo;
-
SpecialPowers.wrap(document).docShell.cssErrorReportingEnabled = true;
// There is one "pattern" for each code path through the error reporter
// that might need to escape some kind of user-supplied text.
// Each "pattern" is tested once with each of the "substitution"s below:
// <t>, <i>, and <s> are replaced by the t:, i:, and s: fields of
// each substitution object in turn.
let patterns = [
@@ -38,33 +36,21 @@ let patterns = [
{ i: "@namespace fnord #<t>;", o: "within @namespace: \u2018#<i>\u2019" },
// _Function
{ i: "@namespace fnord <t>();", o: "within @namespace: \u2018<i>(\u2019" },
// _Dimension
{ i: "@namespace fnord 14<t>;", o: "within @namespace: \u201814<i>\u2019" },
// _AtKeyword
{ i: "x{@<t>: }", o: "declaration but found \u2018@<i>\u2019." },
// _String
- { i: "x{ '<t>'}" , o: isStylo ? 'declaration but found \u2018"<s>"\u2019.'
- : "declaration but found \u2018'<s>'\u2019." },
+ { i: "x{ '<t>'}" , o: 'declaration but found \u2018"<s>"\u2019.' },
// _Bad_String
- { i: "x{ '<t>\n}", o: isStylo ? 'declaration but found \u2018"<s>\u2019.'
- : "declaration but found \u2018'<s>\u2019." },
+ { i: "x{ '<t>\n}", o: 'declaration but found \u2018"<s>\u2019.' },
];
-// Stylo's CSS parser only reports the 'url(' token, not the actual bad URL.
-if (!isStylo) {
- patterns.push(
- // _URL
- { i: "x{ url('<t>')}", o: "declaration but found \u2018url('<s>')\u2019." })
- patterns.push(
- // _Bad_URL
- { i: "x{ url('<t>'.)}" , o: "declaration but found \u2018url('<s>'\u2019." });
-}
-
// Blocks of characters to test, and how they should be escaped when
// they appear in identifiers and string constants.
const substitutions = [
// ASCII printables that _can_ normally appear in identifiers,
// so should of course _not_ be escaped.
{ t: "-_0123456789", i: "-_0123456789",
s: "-_0123456789" },
{ t: "abcdefghijklmnopqrstuvwxyz", i: "abcdefghijklmnopqrstuvwxyz",
@@ -96,17 +82,17 @@ const substitutions = [
{ t: "-\\36 ", i: "-\\36 ", s: "-6" },
{ t: "-\\37 ", i: "-\\37 ", s: "-7" },
{ t: "-\\38 ", i: "-\\38 ", s: "-8" },
{ t: "-\\39 ", i: "-\\39 ", s: "-9" },
// ASCII printables that must be escaped in identifiers.
// Most of these should not be escaped in strings.
{ t: "\\!\\\"\\#\\$", i: "\\!\\\"\\#\\$", s: "!\\\"#$" },
- { t: "\\%\\&\\'\\(", i: "\\%\\&\\'\\(", s: isStylo ? "%&'(" : "%&\\'(" },
+ { t: "\\%\\&\\'\\(", i: "\\%\\&\\'\\(", s: "%&'(" },
{ t: "\\)\\*\\+\\,", i: "\\)\\*\\+\\,", s: ")*+," },
{ t: "\\.\\/\\:\\;", i: "\\.\\/\\:\\;", s: "./:;" },
{ t: "\\<\\=\\>\\?", i: "\\<\\=\\>\\?", s: "<=>?", },
{ t: "\\@\\[\\\\\\]", i: "\\@\\[\\\\\\]", s: "@[\\\\]" },
{ t: "\\^\\`\\{\\}\\~", i: "\\^\\`\\{\\}\\~", s: "^`{}~" },
// U+0000 - U+0020 (C0 controls, space)
// U+000A LINE FEED, U+000C FORM FEED, and U+000D CARRIAGE RETURN
--- a/layout/style/test/test_property_database.html
+++ b/layout/style/test/test_property_database.html
@@ -26,31 +26,21 @@
* the autogenerated css_properties.js to make sure that everything in
* css_properties.js is in property_database.js.
*
* This prevents CSS properties from being added to the code without
* also being put under the minimal test coverage provided by the tests
* that use property_database.js.
*/
-const gServoOnlyProperties = [
- 'rotate',
- 'scale',
- 'translate',
-];
-
for (var idx in gLonghandProperties) {
var prop = gLonghandProperties[idx];
if (prop.pref && !IsCSSPropertyPrefEnabled(prop.pref)) {
continue;
}
- if (!SpecialPowers.DOMWindowUtils.isStyledByServo &&
- gServoOnlyProperties.includes(prop.name)) {
- continue;
- }
var present = prop.name in gCSSProperties;
ok(present,
"'" + prop.name + "' listed in gCSSProperties");
if (present) {
is(gCSSProperties[prop.name].type, CSS_TYPE_LONGHAND,
"'" + prop.name + "' listed as CSS_TYPE_LONGHAND");
is(gCSSProperties[prop.name].domProp, prop.prop,
"'" + prop.name + "' listed with correct DOM property name");
--- a/layout/style/test/test_specified_value_serialization.html
+++ b/layout/style/test/test_specified_value_serialization.html
@@ -119,31 +119,22 @@
"-webkit-linear-gradient with angled legacy-gradient-line" ],
// Linear gradient with box corner (needs prefixed syntax):
[ "-webkit-linear-gradient(top left, red, blue)",
"-webkit-linear-gradient(left top, red, blue)",
"-webkit-linear-gradient with box corner" ],
];
- if (!SpecialPowers.DOMWindowUtils.isStyledByServo) {
- // Radial gradients (should be serialized using modern unprefixed style):
- backgroundImages.push([
- "-webkit-radial-gradient(contain, red, blue)",
- "radial-gradient(closest-side, red, blue)",
- "-webkit-radial-gradient with legacy 'contain' keyword",
- ]);
- } else {
- // Servo keeps the original prefix form which is closer to other impls.
- backgroundImages.push([
- "-webkit-radial-gradient(contain, red, blue)",
- "-webkit-radial-gradient(center center, closest-side, red, blue)",
- "-webkit-radial-gradient with legacy 'contain' keyword",
- ]);
- }
+ // Servo keeps the original prefix form which is closer to other impls.
+ backgroundImages.push([
+ "-webkit-radial-gradient(contain, red, blue)",
+ "-webkit-radial-gradient(center center, closest-side, red, blue)",
+ "-webkit-radial-gradient with legacy 'contain' keyword",
+ ]);
var frame_container = document.getElementById("display");
var p = document.createElement("p");
frame_container.appendChild(p);
for (var i = 0; i < backgroundImages.length; ++i) {
var test = backgroundImages[i];
p.style.backgroundImage = test[0];
--- a/layout/style/test/test_system_font_serialization.html
+++ b/layout/style/test/test_system_font_serialization.html
@@ -52,23 +52,16 @@ is(e.style.font, "message-box", "font ge
e.setAttribute("style", "font-weight:bold;font:caption;line-height:3;");
is(e.style.cssText, "font: caption; line-height: 3;", "serialize system font and font-family");
is(e.style.font, "", "font getter should be empty");
e.setAttribute("style", "font: menu; font-weight: -moz-use-system-font");
is(e.style.cssText, "font: menu;", "serialize system font alone");
is(e.style.font, "menu", "font getter returns value");
-// Servo doesn't support parsing -moz-use-system-font
-if (!SpecialPowers.DOMWindowUtils.isStyledByServo) {
- e.setAttribute("style", "font: menu; font-weight: -moz-use-system-font !important");
- is(e.style.cssText, "font: menu; font-weight: -moz-use-system-font !important;", "serialize system font and subproperty that is important");
- is(e.style.font, "", "font getter returns nothing");
-}
-
e.setAttribute("style", "font: inherit; font-family: Helvetica;");
EXPECTED_DECLS = [
"font-family: Helvetica;",
"font-feature-settings: inherit;",
"font-kerning: inherit;",
"font-language-override: inherit;",
"font-size-adjust: inherit;",
"font-size: inherit;",
--- a/layout/style/test/test_transitions_per_property.html
+++ b/layout/style/test/test_transitions_per_property.html
@@ -55,17 +55,16 @@ function any_unit_to_num(str)
{
return Number(String(str).match(/^([\d.]+)/)[1]);
}
var FUNC_NEGATIVE = "cubic-bezier(0.25, -2, 0.75, 1)";
var FUNC_OVERONE = "cubic-bezier(0.25, 0, 0.75, 3)";
// After resolving Bug 1387080, we can remove this variable.
-const isServo = SpecialPowers.DOMWindowUtils.isStyledByServo;
var supported_properties = {
"border-bottom-left-radius": [ test_radius_transition ],
"border-bottom-right-radius": [ test_radius_transition ],
"border-top-left-radius": [ test_radius_transition ],
"border-top-right-radius": [ test_radius_transition ],
"-moz-box-flex": [ test_float_zeroToOne_transition,
test_float_aboveOne_transition,
@@ -312,18 +311,17 @@ if (SpecialPowers.getBoolPref("layout.cs
supported_properties["shape-outside"] =
[ test_basic_shape_or_url_transition ];
}
if (IsCSSPropertyPrefEnabled("layout.css.font-variations.enabled")) {
supported_properties["font-variation-settings"] = [ test_font_variations_transition ];
}
-if (IsCSSPropertyPrefEnabled("layout.css.individual-transform.enabled") &&
- SpecialPowers.DOMWindowUtils.isStyledByServo) {
+if (IsCSSPropertyPrefEnabled("layout.css.individual-transform.enabled")) {
supported_properties["rotate"] = [ test_rotate_transition ];
supported_properties["scale"] = [ test_scale_transition ];
supported_properties["translate"] = [ test_translate_transition ];
}
if (IsCSSPropertyPrefEnabled("layout.css.scrollbar-colors.enabled")) {
supported_properties["scrollbar-face-color"] = [
test_color_transition,
@@ -654,50 +652,42 @@ var transformTests = [
// Bug 1313619: Add some tests for two basic shapes with an explicit
// reference-box and a default one.
const basicShapesTests = [
{ start: "none", end: "none",
expected: ["none"] },
// none to shape
{ start: "none",
end: "circle(500px at 500px 500px) border-box",
- expected:
- isServo ? ["circle", ["500px at 500px 500px"], "border-box"]
- : ["circle", ["500px at calc(500px + 0%) calc(500px + 0%)"], "border-box"]
+ expected: ["circle", ["500px at 500px 500px"], "border-box"]
},
{ start: "none",
end: "ellipse(500px 500px at 500px 500px) border-box",
- expected:
- isServo ? ["ellipse", ["500px 500px at 500px 500px"], "border-box"]
- : ["ellipse", ["500px 500px at calc(500px + 0%) calc(500px + 0%)"], "border-box"]
+ expected: ["ellipse", ["500px 500px at 500px 500px"], "border-box"]
},
{ start: "none",
end: "polygon(evenodd, 500px 500px, 500px 500px) border-box",
expected: ["polygon", ["evenodd, 500px 500px, 500px 500px"], "border-box"]
},
{ start: "none",
end: "inset(500px 500px 500px 500px round 500px 500px) border-box",
expected: ["inset", ["500px round 500px"], "border-box"]
},
// matching functions
{ start: "circle(100px)", end: "circle(500px)",
expected: ["circle", ["200px at 50% 50%"]] },
{ start: "ellipse(100px 100px)", end: "ellipse(500px 500px)",
expected: ["ellipse", ["200px 200px at 50% 50%"]] },
{ start: "circle(100px at 100px 100px) border-box",
end: "circle(500px at 500px 500px) border-box",
- expected:
- isServo ? ["circle", ["200px at 200px 200px"], "border-box"]
- : ["circle", ["200px at calc(200px + 0%) calc(200px + 0%)"], "border-box"]
+ expected: ["circle", ["200px at 200px 200px"], "border-box"]
},
{ start: "ellipse(100px 100px at 100px 100px) border-box",
end: "ellipse(500px 500px at 500px 500px) border-box",
- expected:
- isServo ? ["ellipse", ["200px 200px at 200px 200px"], "border-box"]
- : ["ellipse", ["200px 200px at calc(200px + 0%) calc(200px + 0%)"], "border-box"]
+ expected: ["ellipse", ["200px 200px at 200px 200px"], "border-box"]
},
{ start: "polygon(evenodd, 100px 100px, 100px 100px) border-box",
end: "polygon(evenodd, 500px 500px, 500px 500px) border-box",
expected: ["polygon", ["evenodd, 200px 200px, 200px 200px"], "border-box"]
},
{ start: "inset(100px 100px 100px 100px round 100px 100px) border-box",
end: "inset(500px 500px 500px 500px round 500px 500px) border-box",
expected: ["inset", ["200px round 200px"], "border-box"]
@@ -758,40 +748,34 @@ const basicShapesTests = [
expected: ["ellipse", ["500px 500px at 50% 50%"]] },
{ start: "ellipse(500px 500px)", end: "ellipse(farthest-side farthest-side)",
expected: ["ellipse", ["farthest-side farthest-side at 50% 50%"]] },
{ start: "ellipse(500px 500px)", end: "ellipse(closest-side closest-side)",
expected: ["ellipse", ["closest-side closest-side at 50% 50%"]] },
// mismatching boxes
{ start: "circle(100px at 100px 100px) border-box",
end: "circle(500px at 500px 500px) content-box",
- expected:
- isServo ? ["circle", ["500px at 500px 500px"], "content-box"]
- : ["circle", ["500px at calc(500px + 0%) calc(500px + 0%)"], "content-box"]
+ expected: ["circle", ["500px at 500px 500px"], "content-box"]
},
{ start: "ellipse(100px 100px at 100px 100px) border-box",
end: "ellipse(500px 500px at 500px 500px) content-box",
- expected:
- isServo ? ["ellipse", ["500px 500px at 500px 500px"], "content-box"]
- : ["ellipse", ["500px 500px at calc(500px + 0%) calc(500px + 0%)"], "content-box"]
+ expected: ["ellipse", ["500px 500px at 500px 500px"], "content-box"]
},
{ start: "polygon(evenodd, 100px 100px, 100px 100px) border-box",
end: "polygon(evenodd, 500px 500px, 500px 500px) content-box",
expected: ["polygon", ["evenodd, 500px 500px, 500px 500px"], "content-box"]
},
{ start: "inset(100px 100px 100px 100px round 100px 100px) border-box",
end: "inset(500px 500px 500px 500px round 500px 500px) content-box",
expected: ["inset", ["500px round 500px"], "content-box"]
},
// mismatching functions
{ start: "circle(100px at 100px 100px) border-box",
end: "ellipse(500px 500px at 500px 500px) border-box",
- expected:
- isServo ? ["ellipse", ["500px 500px at 500px 500px"], "border-box"]
- : ["ellipse", ["500px 500px at calc(500px + 0%) calc(500px + 0%)"], "border-box"]
+ expected: ["ellipse", ["500px 500px at 500px 500px"], "border-box"]
},
{ start: "inset(0px round 20px)", end: "ellipse(500px 500px)",
expected: ["ellipse", ["500px 500px at 50% 50%"]]
},
// shape to reference box
{ start: "circle(20px)", end: "content-box", expected: ["content-box"] },
{ start: "content-box", end: "circle(20px)", expected: ["circle", ["20px at 50% 50%"]] },
// url to shape