From 0b3e26149cef8ca0de079f16106616105bdcfc37 Mon Sep 17 00:00:00 2001 From: Brindusan Cristian Date: Fri, 2 Aug 2019 21:55:37 +0300 Subject: [PATCH] Backed out 2 changesets (bug 1559231) for rusttests build bustages. CLOSED TREE Backed out changeset d47d9f4bf9a9 (bug 1559231) Backed out changeset 50f92d01c47a (bug 1559231) --- .../server/actors/animation-type-longhand.js | 1 - .../shared/css/generated/properties-db.js | 24 ----- layout/base/nsLayoutUtils.cpp | 30 ++---- layout/base/nsLayoutUtils.h | 2 - layout/style/ServoBindings.toml | 2 - layout/style/nsStyleStruct.cpp | 5 +- layout/style/nsStyleStruct.h | 1 - layout/style/nsStyleTransformMatrix.cpp | 9 +- layout/style/test/property_database.js | 17 ---- .../test/test_transitions_per_property.html | 5 - .../style/properties/longhands/box.mako.rs | 12 --- servo/components/style/values/computed/mod.rs | 2 +- .../style/values/computed/position.rs | 4 - .../style/values/generics/position.rs | 37 -------- .../components/style/values/specified/mod.rs | 2 +- .../style/values/specified/position.rs | 4 - servo/ports/geckolib/cbindgen.toml | 1 - .../offset-anchor-interpolation.html.ini | 91 +++++++++++++++++++ .../meta/css/motion/inheritance.html.ini | 6 ++ ...anchor-transform-box-fill-box-002.html.ini | 2 + .../offset-anchor-parsing-valid.html.ini | 67 ++++++++++++++ .../offset-anchor-interpolation.html | 12 +-- .../parsing/offset-anchor-parsing-valid.html | 2 +- 23 files changed, 184 insertions(+), 154 deletions(-) create mode 100644 testing/web-platform/meta/css/motion/animation/offset-anchor-interpolation.html.ini create mode 100644 testing/web-platform/meta/css/motion/offset-anchor-transform-box-fill-box-002.html.ini create mode 100644 testing/web-platform/meta/css/motion/parsing/offset-anchor-parsing-valid.html.ini diff --git a/devtools/server/actors/animation-type-longhand.js b/devtools/server/actors/animation-type-longhand.js index 16c346a43e5a..b2c4c43c9396 100644 --- a/devtools/server/actors/animation-type-longhand.js +++ b/devtools/server/actors/animation-type-longhand.js @@ -282,7 +282,6 @@ exports.ANIMATION_TYPE_FOR_LONGHANDS = [ "mask-position-y", "mask-size", "object-position", - "offset-anchor", "offset-path", "offset-rotate", "order", diff --git a/devtools/shared/css/generated/properties-db.js b/devtools/shared/css/generated/properties-db.js index d604ff219b1b..7dc00106ec18 100644 --- a/devtools/shared/css/generated/properties-db.js +++ b/devtools/shared/css/generated/properties-db.js @@ -3085,7 +3085,6 @@ exports.CSS_PROPERTIES = { "offset-path", "offset-distance", "offset-rotate", - "offset-anchor", "scroll-behavior", "scroll-snap-align", "scroll-snap-type", @@ -8278,25 +8277,6 @@ exports.CSS_PROPERTIES = { "unset" ] }, - "offset-anchor": { - "isInherited": false, - "subproperties": [ - "offset-anchor" - ], - "supports": [], - "values": [ - "auto", - "bottom", - "center", - "inherit", - "initial", - "left", - "revert", - "right", - "top", - "unset" - ] - }, "offset-distance": { "isInherited": false, "subproperties": [ @@ -10792,10 +10772,6 @@ exports.PREFERENCES = [ "font-variation-settings", "layout.css.font-variations.enabled" ], - [ - "offset-anchor", - "layout.css.motion-path.enabled" - ], [ "offset-path", "layout.css.motion-path.enabled" diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 94b16a9343a5..d47ee4290e21 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -10154,29 +10154,12 @@ Maybe nsLayoutUtils::ResolveMotionPath(const nsIFrame* aFrame) { (rotate.auto_ ? directionAngle : 0.0) + rotate.angle.ToRadians()); // Compute the offset for motion path translate. - // Bug 1559232: the translate parameters will be adjusted more after we - // support offset-position. - // FIXME: It's possible to refactor the calculation of transform-origin, so we - // could calculate from the caller, and reuse the value in nsDisplayList.cpp. + // Per the spec, the default offset-anchor is `auto`, and in this case, + // we should use transform-origin as the anchor point. TransformReferenceBox refBox(aFrame); - const auto& transformOrigin = display->mTransformOrigin; - const CSSPoint origin = nsStyleTransformMatrix::Convert2DPosition( + auto& transformOrigin = display->mTransformOrigin; + CSSPoint anchorPoint = nsStyleTransformMatrix::Convert2DPosition( transformOrigin.horizontal, transformOrigin.vertical, refBox); - - // Per the spec, the default offset-anchor is `auto`, so initialize the anchor - // point to transform-origin. - CSSPoint anchorPoint(origin); - Point shift; - if (!display->mOffsetAnchor.IsAuto()) { - const auto& pos = display->mOffsetAnchor.AsPosition(); - anchorPoint = nsStyleTransformMatrix::Convert2DPosition( - pos.horizontal, pos.vertical, refBox); - // We need this value to shift the origin from transform-origin to - // offset-anchor (and vice versa). - // See nsStyleTransformMatrix::ReadTransform for more details. - shift = (anchorPoint - origin).ToUnknownPoint(); - } - // SVG frames (unlike other frames) have a reference box that can be (and // typically is) offset from the TopLeft() of the frame. // In motion path, we have to make sure the object is aligned with offset-path @@ -10189,6 +10172,7 @@ Maybe nsLayoutUtils::ResolveMotionPath(const nsIFrame* aFrame) { anchorPoint.y += CSSPixel::FromAppUnits(aFrame->GetPosition().y); } - return Some( - MotionPathData{point - anchorPoint.ToUnknownPoint(), angle, shift}); + // Bug 1186329: the translate parameters will be adjusted more after we + // implement offset-position and offset-anchor. + return Some(MotionPathData{point - anchorPoint.ToUnknownPoint(), angle}); } diff --git a/layout/base/nsLayoutUtils.h b/layout/base/nsLayoutUtils.h index 8f616a9f5757..9b8fe9f9271d 100644 --- a/layout/base/nsLayoutUtils.h +++ b/layout/base/nsLayoutUtils.h @@ -119,8 +119,6 @@ struct DisplayPortMarginsPropertyData { struct MotionPathData { gfx::Point mTranslate; float mRotate; - // The delta value between transform-origin and offset-anchor. - gfx::Point mShift; }; } // namespace mozilla diff --git a/layout/style/ServoBindings.toml b/layout/style/ServoBindings.toml index 87476d92395f..68fdb22690f0 100644 --- a/layout/style/ServoBindings.toml +++ b/layout/style/ServoBindings.toml @@ -444,8 +444,6 @@ cbindgen-types = [ { gecko = "StyleMaxSize", servo = "values::computed::MaxSize" }, { gecko = "StyleFlexBasis", servo = "values::computed::FlexBasis" }, { gecko = "StylePosition", servo = "values::computed::Position" }, - { gecko = "StylePositionOrAuto", servo = "values::computed::PositionOrAuto" }, - { gecko = "StyleGenericPositionOrAuto", servo = "values::generics::position::PositionOrAuto" }, { gecko = "StyleBackgroundSize", servo = "values::computed::BackgroundSize" }, { gecko = "StyleGenericBackgroundSize", servo = "values::generics::background::BackgroundSize" }, { gecko = "StyleBorderImageSlice", servo = "values::computed::BorderImageSlice" }, diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 395d4bc57659..ed325e746e87 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -2740,7 +2740,6 @@ nsStyleDisplay::nsStyleDisplay(const Document& aDocument) mOffsetPath(StyleOffsetPath::None()), mOffsetDistance(LengthPercentage::Zero()), mOffsetRotate{true, StyleAngle{0.0}}, - mOffsetAnchor(StylePositionOrAuto::Auto()), mTransformOrigin{LengthPercentage::FromPercentage(0.5), LengthPercentage::FromPercentage(0.5), {0.}}, @@ -2806,7 +2805,6 @@ nsStyleDisplay::nsStyleDisplay(const nsStyleDisplay& aSource) mOffsetPath(aSource.mOffsetPath), mOffsetDistance(aSource.mOffsetDistance), mOffsetRotate(aSource.mOffsetRotate), - mOffsetAnchor(aSource.mOffsetAnchor), mTransformOrigin(aSource.mTransformOrigin), mChildPerspective(aSource.mChildPerspective), mPerspectiveOrigin(aSource.mPerspectiveOrigin), @@ -2850,8 +2848,7 @@ static inline nsChangeHint CompareMotionValues( const nsStyleDisplay& aDisplay, const nsStyleDisplay& aNewDisplay) { if (aDisplay.mOffsetPath == aNewDisplay.mOffsetPath) { if (aDisplay.mOffsetDistance == aNewDisplay.mOffsetDistance && - aDisplay.mOffsetRotate == aNewDisplay.mOffsetRotate && - aDisplay.mOffsetAnchor == aNewDisplay.mOffsetAnchor) { + aDisplay.mOffsetRotate == aNewDisplay.mOffsetRotate) { return nsChangeHint(0); } diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index 0214377a5680..c4e4b7888395 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -1585,7 +1585,6 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay { mozilla::StyleOffsetPath mOffsetPath; mozilla::LengthPercentage mOffsetDistance; mozilla::StyleOffsetRotate mOffsetRotate; - mozilla::StylePositionOrAuto mOffsetAnchor; mozilla::StyleTransformOrigin mTransformOrigin; mozilla::StylePerspective mChildPerspective; diff --git a/layout/style/nsStyleTransformMatrix.cpp b/layout/style/nsStyleTransformMatrix.cpp index b0e6512472ae..5beaf8ea477f 100644 --- a/layout/style/nsStyleTransformMatrix.cpp +++ b/layout/style/nsStyleTransformMatrix.cpp @@ -551,17 +551,10 @@ Matrix4x4 ReadTransforms(const StyleTranslate& aTranslate, // Create the equivalent translate and rotate function, according to the // order in spec. We combine the translate and then the rotate. // https://drafts.fxtf.org/motion-1/#calculating-path-transform - // - // Besides, we have to shift the object by the delta between anchor-point - // and transform-origin, to make sure we rotate the object according to - // anchor-point. - result.PreTranslate(aMotion->mTranslate.x + aMotion->mShift.x, - aMotion->mTranslate.y + aMotion->mShift.y, 0.0); + result.PreTranslate(aMotion->mTranslate.x, aMotion->mTranslate.y, 0.0); if (aMotion->mRotate != 0.0) { result.RotateZ(aMotion->mRotate); } - // Shift the origin back to transform-origin. - result.PreTranslate(-aMotion->mShift.x, -aMotion->mShift.y, 0.0); } for (const StyleTransformOperation& op : aTransform.Operations()) { diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index e52f507d4003..f1334de2b703 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -12791,23 +12791,6 @@ if (IsCSSPropertyPrefEnabled("layout.css.motion-path.enabled")) { other_values: ["reverse", "0deg", "0rad reverse", "-45deg", "5turn auto"], invalid_values: ["none", "10px", "reverse 0deg reverse", "reverse auto"], }; - - gCSSProperties["offset-anchor"] = { - domProp: "offsetAnchor", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: ["auto"], - other_values: [ - "left bottom", - "center center", - "calc(20% + 10px) center", - "right 30em", - "10px 20%", - "left -10px top -20%", - "right 10% bottom 20em", - ], - invalid_values: ["none", "10deg", "left 10% top"], - }; } if (IsCSSPropertyPrefEnabled("layout.css.clip-path-path.enabled")) { diff --git a/layout/style/test/test_transitions_per_property.html b/layout/style/test/test_transitions_per_property.html index c3ef1c36319f..f8c547790458 100644 --- a/layout/style/test/test_transitions_per_property.html +++ b/layout/style/test/test_transitions_per_property.html @@ -374,11 +374,6 @@ if (IsCSSPropertyPrefEnabled("layout.css.motion-path.enabled")) { supported_properties["offset-rotate"] = [ test_angle_transition, test_offset_rotate_transition ]; - - // Note: offset-anchor supports "auto | ", and the tests for - // `auto` are already in wpt, so we don't test it here again. - supported_properties["offset-anchor"] = - [ test_background_position_transition ]; } if (IsCSSPropertyPrefEnabled("layout.css.clip-path-path.enabled")) { diff --git a/servo/components/style/properties/longhands/box.mako.rs b/servo/components/style/properties/longhands/box.mako.rs index 904d1640fddc..40075a650843 100644 --- a/servo/components/style/properties/longhands/box.mako.rs +++ b/servo/components/style/properties/longhands/box.mako.rs @@ -421,18 +421,6 @@ ${helpers.predefined_type( servo_restyle_damage="reflow_out_of_flow" )} -// Motion Path Module Level 1 -${helpers.predefined_type( - "offset-anchor", - "PositionOrAuto", - "computed::PositionOrAuto::auto()", - engines="gecko", - animation_value_type="ComputedValue", - gecko_pref="layout.css.motion-path.enabled", - spec="https://drafts.fxtf.org/motion-1/#offset-anchor-property", - servo_restyle_damage="reflow_out_of_flow" -)} - // CSSOM View Module // https://www.w3.org/TR/cssom-view-1/ ${helpers.single_keyword( diff --git a/servo/components/style/values/computed/mod.rs b/servo/components/style/values/computed/mod.rs index 1947b83164eb..7cfe0de6d8d4 100644 --- a/servo/components/style/values/computed/mod.rs +++ b/servo/components/style/values/computed/mod.rs @@ -68,7 +68,7 @@ pub use self::list::Quotes; pub use self::motion::{OffsetPath, OffsetRotate}; pub use self::outline::OutlineStyle; pub use self::percentage::{NonNegativePercentage, Percentage}; -pub use self::position::{GridAutoFlow, GridTemplateAreas, Position, PositionOrAuto, ZIndex}; +pub use self::position::{GridAutoFlow, GridTemplateAreas, Position, ZIndex}; pub use self::rect::NonNegativeLengthOrNumberRect; pub use self::resolution::Resolution; pub use self::svg::MozContextProperties; diff --git a/servo/components/style/values/computed/position.rs b/servo/components/style/values/computed/position.rs index 7b22c37f73f2..f0f8fe198a64 100644 --- a/servo/components/style/values/computed/position.rs +++ b/servo/components/style/values/computed/position.rs @@ -9,7 +9,6 @@ use crate::values::computed::{Integer, LengthPercentage, Percentage}; use crate::values::generics::position::Position as GenericPosition; -use crate::values::generics::position::PositionOrAuto as GenericPositionOrAuto; use crate::values::generics::position::ZIndex as GenericZIndex; pub use crate::values::specified::position::{GridAutoFlow, GridTemplateAreas}; use crate::Zero; @@ -19,9 +18,6 @@ use style_traits::{CssWriter, ToCss}; /// The computed value of a CSS `` pub type Position = GenericPosition; -/// The computed value of an `auto | ` -pub type PositionOrAuto = GenericPositionOrAuto; - /// The computed value of a CSS horizontal position. pub type HorizontalPosition = LengthPercentage; diff --git a/servo/components/style/values/generics/position.rs b/servo/components/style/values/generics/position.rs index 2742dd879136..7e43f439793d 100644 --- a/servo/components/style/values/generics/position.rs +++ b/servo/components/style/values/generics/position.rs @@ -41,43 +41,6 @@ impl Position { } } -/// A generic type for representing an `Auto | `. -/// This is used by for now. -/// https://drafts.fxtf.org/motion-1/#offset-anchor-property -#[derive( - Animate, - Clone, - ComputeSquaredDistance, - Copy, - Debug, - MallocSizeOf, - Parse, - PartialEq, - SpecifiedValueInfo, - ToAnimatedZero, - ToComputedValue, - ToCss, - ToResolvedValue, - ToShmem, -)] -#[repr(C, u8)] -pub enum GenericPositionOrAuto { - /// The value. - Position(Pos), - /// The keyword `auto`. - Auto, -} - -pub use self::GenericPositionOrAuto as PositionOrAuto; - -impl PositionOrAuto { - /// Return `auto`. - #[inline] - pub fn auto() -> Self { - PositionOrAuto::Auto - } -} - /// A generic value for the `z-index` property. #[derive( Animate, diff --git a/servo/components/style/values/specified/mod.rs b/servo/components/style/values/specified/mod.rs index 98f8116d5c00..f33a191c2773 100644 --- a/servo/components/style/values/specified/mod.rs +++ b/servo/components/style/values/specified/mod.rs @@ -69,7 +69,7 @@ pub use self::list::Quotes; pub use self::motion::{OffsetPath, OffsetRotate}; pub use self::outline::OutlineStyle; pub use self::percentage::Percentage; -pub use self::position::{GridAutoFlow, GridTemplateAreas, Position, PositionOrAuto}; +pub use self::position::{GridAutoFlow, GridTemplateAreas, Position}; pub use self::position::{PositionComponent, ZIndex}; pub use self::rect::NonNegativeLengthOrNumberRect; pub use self::resolution::Resolution; diff --git a/servo/components/style/values/specified/position.rs b/servo/components/style/values/specified/position.rs index ce3bab1047be..4e6a71ec2cad 100644 --- a/servo/components/style/values/specified/position.rs +++ b/servo/components/style/values/specified/position.rs @@ -13,7 +13,6 @@ use crate::str::HTML_SPACE_CHARACTERS; use crate::values::computed::LengthPercentage as ComputedLengthPercentage; use crate::values::computed::{Context, Percentage, ToComputedValue}; use crate::values::generics::position::Position as GenericPosition; -use crate::values::generics::position::PositionOrAuto as GenericPositionOrAuto; use crate::values::generics::position::ZIndex as GenericZIndex; use crate::values::specified::{AllowQuirks, Integer, LengthPercentage}; use crate::Atom; @@ -27,9 +26,6 @@ use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss}; /// The specified value of a CSS `` pub type Position = GenericPosition; -/// The specified value of an `auto | `. -pub type PositionOrAuto = GenericPositionOrAuto; - /// The specified value of a horizontal position. pub type HorizontalPosition = PositionComponent; diff --git a/servo/ports/geckolib/cbindgen.toml b/servo/ports/geckolib/cbindgen.toml index fc5621386591..64f71c7db2ec 100644 --- a/servo/ports/geckolib/cbindgen.toml +++ b/servo/ports/geckolib/cbindgen.toml @@ -109,7 +109,6 @@ include = [ "MaxSize", "FlexBasis", "Position", - "PositionOrAuto", "BackgroundSize", "BorderImageSlice", "BorderSpacing", diff --git a/testing/web-platform/meta/css/motion/animation/offset-anchor-interpolation.html.ini b/testing/web-platform/meta/css/motion/animation/offset-anchor-interpolation.html.ini new file mode 100644 index 000000000000..798797aa93f7 --- /dev/null +++ b/testing/web-platform/meta/css/motion/animation/offset-anchor-interpolation.html.ini @@ -0,0 +1,91 @@ +[offset-anchor-interpolation.html] + ["220px 240px" and "300px 400px" are valid offset-anchor values] + expected: FAIL + + [Animation between "220px 240px" and "300px 400px" at progress -1] + expected: FAIL + + [Animation between "220px 240px" and "300px 400px" at progress 0] + expected: FAIL + + [Animation between "220px 240px" and "300px 400px" at progress 0.125] + expected: FAIL + + [Animation between "220px 240px" and "300px 400px" at progress 0.875] + expected: FAIL + + [Animation between "220px 240px" and "300px 400px" at progress 1] + expected: FAIL + + [Animation between "220px 240px" and "300px 400px" at progress 2] + expected: FAIL + + ["left 480px top 400px" and "right -140% bottom -60%" are valid offset-anchor values] + expected: FAIL + + [Animation between "left 480px top 400px" and "right -140% bottom -60%" at progress -1] + expected: FAIL + + [Animation between "left 480px top 400px" and "right -140% bottom -60%" at progress 0] + expected: FAIL + + [Animation between "left 480px top 400px" and "right -140% bottom -60%" at progress 0.125] + expected: FAIL + + [Animation between "left 480px top 400px" and "right -140% bottom -60%" at progress 0.875] + expected: FAIL + + [Animation between "left 480px top 400px" and "right -140% bottom -60%" at progress 1] + expected: FAIL + + [Animation between "left 480px top 400px" and "right -140% bottom -60%" at progress 2] + expected: FAIL + + ["left top" and "left 8px bottom 20%" are valid offset-anchor values] + expected: FAIL + + [Animation between "left top" and "left 8px bottom 20%" at progress -1] + expected: FAIL + + [Animation between "left top" and "left 8px bottom 20%" at progress 0] + expected: FAIL + + [Animation between "left top" and "left 8px bottom 20%" at progress 0.125] + expected: FAIL + + [Animation between "left top" and "left 8px bottom 20%" at progress 0.875] + expected: FAIL + + [Animation between "left top" and "left 8px bottom 20%" at progress 1] + expected: FAIL + + [Animation between "left top" and "left 8px bottom 20%" at progress 2] + expected: FAIL + + ["right 10px top 20%" and "auto" are valid offset-anchor values] + expected: FAIL + + [Animation between "right 10px top 20%" and "auto" at progress -1] + expected: FAIL + + [Animation between "right 10px top 20%" and "auto" at progress 0] + expected: FAIL + + [Animation between "right 10px top 20%" and "auto" at progress 0.125] + expected: FAIL + + [Animation between "right 10px top 20%" and "auto" at progress 0.875] + expected: FAIL + + [Animation between "right 10px top 20%" and "auto" at progress 1] + expected: FAIL + + [Animation between "right 10px top 20%" and "auto" at progress 2] + expected: FAIL + + [Animation between "right 10px top 20%" and "auto" at progress 0.4] + expected: FAIL + + [Animation between "right 10px top 20%" and "auto" at progress 0.6] + expected: FAIL + diff --git a/testing/web-platform/meta/css/motion/inheritance.html.ini b/testing/web-platform/meta/css/motion/inheritance.html.ini index 210289211e3e..d86c1826f675 100644 --- a/testing/web-platform/meta/css/motion/inheritance.html.ini +++ b/testing/web-platform/meta/css/motion/inheritance.html.ini @@ -5,6 +5,12 @@ [Property offset-position does not inherit] expected: FAIL + [Property offset-anchor does not inherit] + expected: FAIL + [Property offset-position has initial value auto] expected: FAIL + [Property offset-anchor has initial value auto] + expected: FAIL + diff --git a/testing/web-platform/meta/css/motion/offset-anchor-transform-box-fill-box-002.html.ini b/testing/web-platform/meta/css/motion/offset-anchor-transform-box-fill-box-002.html.ini new file mode 100644 index 000000000000..bfdf88e64789 --- /dev/null +++ b/testing/web-platform/meta/css/motion/offset-anchor-transform-box-fill-box-002.html.ini @@ -0,0 +1,2 @@ +[offset-anchor-transform-box-fill-box-002.html] + expected: FAIL diff --git a/testing/web-platform/meta/css/motion/parsing/offset-anchor-parsing-valid.html.ini b/testing/web-platform/meta/css/motion/parsing/offset-anchor-parsing-valid.html.ini new file mode 100644 index 000000000000..460c3b8ccea6 --- /dev/null +++ b/testing/web-platform/meta/css/motion/parsing/offset-anchor-parsing-valid.html.ini @@ -0,0 +1,67 @@ +[offset-anchor-parsing-valid.html] + [e.style['offset-anchor'\] = "auto" should set the property value] + expected: FAIL + + [Serialization should round-trip after setting e.style['offset-anchor'\] = "auto"] + expected: FAIL + + [e.style['offset-anchor'\] = "left bottom" should set the property value] + expected: FAIL + + [Serialization should round-trip after setting e.style['offset-anchor'\] = "left bottom"] + expected: FAIL + + [e.style['offset-anchor'\] = "center center" should set the property value] + expected: FAIL + + [Serialization should round-trip after setting e.style['offset-anchor'\] = "center center"] + expected: FAIL + + [e.style['offset-anchor'\] = "right center" should set the property value] + expected: FAIL + + [Serialization should round-trip after setting e.style['offset-anchor'\] = "right center"] + expected: FAIL + + [e.style['offset-anchor'\] = "center top" should set the property value] + expected: FAIL + + [Serialization should round-trip after setting e.style['offset-anchor'\] = "center top"] + expected: FAIL + + [e.style['offset-anchor'\] = "center bottom" should set the property value] + expected: FAIL + + [Serialization should round-trip after setting e.style['offset-anchor'\] = "center bottom"] + expected: FAIL + + [e.style['offset-anchor'\] = "calc(10px + 20%) center" should set the property value] + expected: FAIL + + [Serialization should round-trip after setting e.style['offset-anchor'\] = "calc(10px + 20%) center"] + expected: FAIL + + [e.style['offset-anchor'\] = "right 30em" should set the property value] + expected: FAIL + + [Serialization should round-trip after setting e.style['offset-anchor'\] = "right 30em"] + expected: FAIL + + [e.style['offset-anchor'\] = "10px 20%" should set the property value] + expected: FAIL + + [Serialization should round-trip after setting e.style['offset-anchor'\] = "10px 20%"] + expected: FAIL + + [e.style['offset-anchor'\] = "left -10px top -20%" should set the property value] + expected: FAIL + + [Serialization should round-trip after setting e.style['offset-anchor'\] = "left -10px top -20%"] + expected: FAIL + + [e.style['offset-anchor'\] = "right 10% bottom 20em" should set the property value] + expected: FAIL + + [Serialization should round-trip after setting e.style['offset-anchor'\] = "right 10% bottom 20em"] + expected: FAIL + diff --git a/testing/web-platform/tests/css/motion/animation/offset-anchor-interpolation.html b/testing/web-platform/tests/css/motion/animation/offset-anchor-interpolation.html index 75f855a2c8af..7ad9482a2b4b 100644 --- a/testing/web-platform/tests/css/motion/animation/offset-anchor-interpolation.html +++ b/testing/web-platform/tests/css/motion/animation/offset-anchor-interpolation.html @@ -42,7 +42,7 @@ to: 'right -140% bottom -60%', }, [ {at: -1, expect: 'calc(960px - 240%) calc(800px - 160%)'}, - {at: 0, expect: 'left calc(0% + 480px) top calc(0% + 400px)'}, + {at: 0, expect: 'left 480px top 400px'}, {at: 0.125, expect: 'calc(420px + 30%) calc(350px + 20%)'}, {at: 0.875, expect: 'calc(210% + 60px) calc(140% + 50px)'}, {at: 1, expect: 'right -140% bottom -60%'}, @@ -54,12 +54,12 @@ from: 'left top', to: 'left 8px bottom 20%', }, [ - {at: -1, expect: 'calc(0% - 8px) -80%'}, + {at: -1, expect: '-8px -80%'}, {at: 0, expect: 'left top'}, - {at: 0.125, expect: 'calc(0% + 1px) 10%'}, - {at: 0.875, expect: 'calc(0% + 7px) 70%'}, - {at: 1, expect: 'left calc(0% + 8px) bottom 20%'}, - {at: 2, expect: 'calc(0% + 16px) 160%'} + {at: 0.125, expect: '1px 10%'}, + {at: 0.875, expect: '7px 70%'}, + {at: 1, expect: 'left 8px bottom 20%'}, + {at: 2, expect: '16px 160%'} ]); test_no_interpolation({ diff --git a/testing/web-platform/tests/css/motion/parsing/offset-anchor-parsing-valid.html b/testing/web-platform/tests/css/motion/parsing/offset-anchor-parsing-valid.html index 6cb4d44117fa..a69a5ce9f811 100644 --- a/testing/web-platform/tests/css/motion/parsing/offset-anchor-parsing-valid.html +++ b/testing/web-platform/tests/css/motion/parsing/offset-anchor-parsing-valid.html @@ -19,7 +19,7 @@ test_valid_value("offset-anchor", "center center"); test_valid_value("offset-anchor", "right center"); test_valid_value("offset-anchor", "center top"); test_valid_value("offset-anchor", "center bottom"); -test_valid_value("offset-anchor", "calc(20% + 10px) center"); +test_valid_value("offset-anchor", "calc(10px + 20%) center"); test_valid_value("offset-anchor", "right 30em"); test_valid_value("offset-anchor", "10px 20%"); test_valid_value("offset-anchor", "left -10px top -20%");