Skip to content

Commit b603862

Browse files
committed
align-items should be a discrete animatable property
https://bugs.webkit.org/show_bug.cgi?id=218535 <rdar://problem/71012428> Reviewed by Dean Jackson. LayoutTests/imported/w3c: * web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt: Source/WebCore: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * rendering/style/StyleSelfAlignmentData.cpp: Added. (WebCore::operator<<): * rendering/style/StyleSelfAlignmentData.h: Canonical link: https://commits.webkit.org/231201@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 970c888 commit b603862

10 files changed

Lines changed: 80 additions & 0 deletions

File tree

LayoutTests/imported/w3c/ChangeLog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2020-11-03 Antoine Quint <graouts@webkit.org>
2+
3+
align-items should be a discrete animatable property
4+
https://bugs.webkit.org/show_bug.cgi?id=218535
5+
<rdar://problem/71012428>
6+
7+
Reviewed by Dean Jackson.
8+
9+
* web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt:
10+
* web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt:
11+
* web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt:
12+
113
2020-11-03 Tyler Wilcock <twilco.o@protonmail.com>
214

315
Ignore order when parsing inset and color for box-shadow

LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ PASS Setup
33
PASS align-content (type: discrete) has testAccumulation function
44
PASS align-content: "flex-end" onto "flex-start"
55
PASS align-content: "flex-start" onto "flex-end"
6+
PASS align-items (type: discrete) has testAccumulation function
7+
PASS align-items: "flex-end" onto "flex-start"
8+
PASS align-items: "flex-start" onto "flex-end"
69
PASS background-color (type: color) has testAccumulation function
710
FAIL background-color supports animating as color of rgb() with overflowed from and to values assert_equals: The value should be rgb(255, 128, 128) at 0ms expected "rgb(255, 128, 128)" but got "rgb(255, 0, 0)"
811
FAIL background-color supports animating as color of #RGB assert_equals: The value should be rgb(255, 128, 128) at 0ms expected "rgb(255, 128, 128)" but got "rgb(255, 0, 0)"

LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ PASS Setup
33
PASS align-content (type: discrete) has testAddition function
44
PASS align-content: "flex-end" onto "flex-start"
55
PASS align-content: "flex-start" onto "flex-end"
6+
PASS align-items (type: discrete) has testAddition function
7+
PASS align-items: "flex-end" onto "flex-start"
8+
PASS align-items: "flex-start" onto "flex-end"
69
PASS background-color (type: color) has testAddition function
710
FAIL background-color supports animating as color of rgb() with overflowed from and to values assert_equals: The value should be rgb(255, 128, 128) at 0ms expected "rgb(255, 128, 128)" but got "rgb(255, 0, 0)"
811
FAIL background-color supports animating as color of #RGB assert_equals: The value should be rgb(255, 128, 128) at 0ms expected "rgb(255, 128, 128)" but got "rgb(255, 0, 0)"

LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ PASS align-content (type: discrete) has testInterpolation function
44
PASS align-content uses discrete animation when animating between "flex-start" and "flex-end" with linear easing
55
PASS align-content uses discrete animation when animating between "flex-start" and "flex-end" with effect easing
66
PASS align-content uses discrete animation when animating between "flex-start" and "flex-end" with keyframe easing
7+
PASS align-items (type: discrete) has testInterpolation function
8+
PASS align-items uses discrete animation when animating between "flex-start" and "flex-end" with linear easing
9+
PASS align-items uses discrete animation when animating between "flex-start" and "flex-end" with effect easing
10+
PASS align-items uses discrete animation when animating between "flex-start" and "flex-end" with keyframe easing
711
PASS background-color (type: color) has testInterpolation function
812
PASS background-color supports animating as color of rgb()
913
PASS background-color supports animating as color of #RGB

Source/WebCore/ChangeLog

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
2020-11-03 Antoine Quint <graouts@webkit.org>
2+
3+
align-items should be a discrete animatable property
4+
https://bugs.webkit.org/show_bug.cgi?id=218535
5+
<rdar://problem/71012428>
6+
7+
Reviewed by Dean Jackson.
8+
9+
* Sources.txt:
10+
* WebCore.xcodeproj/project.pbxproj:
11+
* animation/CSSPropertyAnimation.cpp:
12+
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
13+
* rendering/style/StyleSelfAlignmentData.cpp: Added.
14+
(WebCore::operator<<):
15+
* rendering/style/StyleSelfAlignmentData.h:
16+
117
2020-11-03 Tyler Wilcock <twilco.o@protonmail.com>
218

319
Ignore order when parsing inset and color for box-shadow

Source/WebCore/Sources.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2311,6 +2311,7 @@ rendering/style/StyleMultiImage.cpp
23112311
rendering/style/StyleRareInheritedData.cpp
23122312
rendering/style/StyleRareNonInheritedData.cpp
23132313
rendering/style/StyleScrollSnapPoints.cpp
2314+
rendering/style/StyleSelfAlignmentData.cpp
23142315
rendering/style/StyleSurroundData.cpp
23152316
rendering/style/StyleTransformData.cpp
23162317
rendering/style/StyleVisualData.cpp

Source/WebCore/WebCore.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9889,6 +9889,7 @@
98899889
718C7F561DD385C500B733C8 /* status-label.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = "status-label.css"; sourceTree = "<group>"; };
98909890
718C7F571DD385C500B733C8 /* status-label.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "status-label.js"; sourceTree = "<group>"; };
98919891
7199B94A2551F0E100494A57 /* StyleContentAlignmentData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleContentAlignmentData.cpp; sourceTree = "<group>"; };
9892+
7199B94F2552103E00494A57 /* StyleSelfAlignmentData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleSelfAlignmentData.cpp; sourceTree = "<group>"; };
98929893
71A1B6071DEE5A820073BCFB /* en */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = en; path = "en.lproj/modern-media-controls-localized-strings.js"; sourceTree = SOURCE_ROOT; };
98939894
71A57DEF154BE25C0009D120 /* SVGPathUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPathUtilities.cpp; sourceTree = "<group>"; };
98949895
71A57DF0154BE25C0009D120 /* SVGPathUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathUtilities.h; sourceTree = "<group>"; };
@@ -26858,6 +26859,7 @@
2685826859
BC2272860E82E70700E7F975 /* StyleReflection.h */,
2685926860
F47A5E3A195B8C8A00483100 /* StyleScrollSnapPoints.cpp */,
2686026861
F47A5E3B195B8C8A00483100 /* StyleScrollSnapPoints.h */,
26862+
7199B94F2552103E00494A57 /* StyleSelfAlignmentData.cpp */,
2686126863
9D63800F1AF16E160031A15C /* StyleSelfAlignmentData.h */,
2686226864
BC5EB5E60E81BFEF00B25965 /* StyleSurroundData.cpp */,
2686326865
BC5EB5E40E81BF6D00B25965 /* StyleSurroundData.h */,

Source/WebCore/animation/CSSPropertyAnimation.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,6 +1901,7 @@ CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap()
19011901
new PropertyWrapper<int>(CSSPropertyOrder, &RenderStyle::order, &RenderStyle::setOrder),
19021902

19031903
new DiscretePropertyWrapper<const StyleContentAlignmentData&>(CSSPropertyAlignContent, &RenderStyle::alignContent, &RenderStyle::setAlignContent),
1904+
new DiscretePropertyWrapper<const StyleSelfAlignmentData&>(CSSPropertyAlignItems, &RenderStyle::alignItems, &RenderStyle::setAlignItems),
19041905
};
19051906
const unsigned animatableLonghandPropertiesCount = WTF_ARRAY_LENGTH(animatableLonghandPropertyWrappers);
19061907

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright (C) 2020 Apple Inc. All rights reserved.
3+
*
4+
* Redistribution and use in source and binary forms, with or without
5+
* modification, are permitted provided that the following conditions
6+
* are met:
7+
* 1. Redistributions of source code must retain the above copyright
8+
* notice, this list of conditions and the following disclaimer.
9+
* 2. Redistributions in binary form must reproduce the above copyright
10+
* notice, this list of conditions and the following disclaimer in the
11+
* documentation and/or other materials provided with the distribution.
12+
*
13+
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16+
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
17+
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19+
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20+
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21+
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24+
*/
25+
26+
#include "config.h"
27+
#include "StyleSelfAlignmentData.h"
28+
29+
namespace WebCore {
30+
31+
TextStream& operator<<(TextStream& ts, const StyleSelfAlignmentData& o)
32+
{
33+
return ts << o.position() << " " << o.positionType() << " " << o.overflow();
34+
}
35+
36+
}

Source/WebCore/rendering/style/StyleSelfAlignmentData.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,6 @@ class StyleSelfAlignmentData {
6464
unsigned m_overflow : 2; // OverflowAlignment
6565
};
6666

67+
WTF::TextStream& operator<<(WTF::TextStream&, const StyleSelfAlignmentData&);
68+
6769
} // namespace WebCore

0 commit comments

Comments
 (0)