Commit a84350e
committed
[css-anchor-position-1] Implement
https://bugs.webkit.org/show_bug.cgi?id=275451
Reviewed by Antti Koivisto.
This change implements `anchor-center` CSS value as specified in:
https://drafts.csswg.org/css-anchor-position-1/#anchor-center
* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-htb-htb-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-htb-vrl-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-vrl-htb-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-vrl-vrl-expected.txt:
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::computePositionedLogicalWidth const):
(WebCore::RenderBox::computePositionedLogicalHeight const):
(WebCore::isObjectAncestorContainerOf):
(WebCore::findClosestCommonContainer):
(WebCore::RenderBox::computeAnchorCenteredPosition const):
* Source/WebCore/rendering/RenderBox.h:
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::defaultAnchor const):
(WebCore::RenderElement::defaultAnchorRenderer const):
* Source/WebCore/rendering/RenderElement.h:
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::alignmentOffset):
* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::columnAxisPositionForGridItem const):
(WebCore::RenderGrid::rowAxisPositionForGridItem const):
* Source/WebCore/style/AnchorPositionEvaluator.cpp:
(WebCore::Style::AnchorPositionEvaluator::computeAnchorRectRelativeToContainingBlock):
(WebCore::Style::computeInsetValue):
(WebCore::Style::computeAnchorRectRelativeToContainingBlock): Deleted.
* Source/WebCore/style/AnchorPositionEvaluator.h:
Canonical link: https://commits.webkit.org/287144@mainanchor-center alignment value1 parent 6926aa6 commit a84350e
File tree
14 files changed
+177
-132
lines changed- LayoutTests
- imported/w3c/web-platform-tests/css/css-anchor-position
- Source/WebCore
- css
- rendering
- style
14 files changed
+177
-132
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7976 | 7976 | | |
7977 | 7977 | | |
7978 | 7978 | | |
7979 | | - | |
7980 | 7979 | | |
7981 | 7980 | | |
7982 | 7981 | | |
| |||
Lines changed: 4 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 3 | + | |
9 | 4 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 5 | + | |
16 | 6 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 7 | + | |
23 | 8 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 9 | + | |
30 | 10 | | |
31 | 11 | | |
32 | 12 | | |
Lines changed: 5 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 2 | + | |
| 3 | + | |
14 | 4 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 5 | + | |
21 | 6 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 7 | + | |
28 | 8 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 9 | + | |
35 | 10 | | |
36 | 11 | | |
37 | 12 | | |
Lines changed: 5 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 2 | + | |
| 3 | + | |
14 | 4 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 5 | + | |
21 | 6 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 7 | + | |
28 | 8 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 9 | + | |
35 | 10 | | |
36 | 11 | | |
37 | 12 | | |
Lines changed: 4 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 3 | + | |
9 | 4 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 5 | + | |
16 | 6 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 7 | + | |
23 | 8 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 9 | + | |
30 | 10 | | |
31 | 11 | | |
32 | 12 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7284 | 7284 | | |
7285 | 7285 | | |
7286 | 7286 | | |
7287 | | - | |
7288 | | - | |
7289 | | - | |
7290 | | - | |
7291 | | - | |
| 7287 | + | |
7292 | 7288 | | |
7293 | 7289 | | |
7294 | 7290 | | |
| |||
7297 | 7293 | | |
7298 | 7294 | | |
7299 | 7295 | | |
7300 | | - | |
| 7296 | + | |
7301 | 7297 | | |
7302 | 7298 | | |
7303 | 7299 | | |
| |||
7323 | 7319 | | |
7324 | 7320 | | |
7325 | 7321 | | |
7326 | | - | |
7327 | | - | |
7328 | | - | |
7329 | | - | |
7330 | | - | |
| 7322 | + | |
7331 | 7323 | | |
7332 | 7324 | | |
7333 | 7325 | | |
| |||
7336 | 7328 | | |
7337 | 7329 | | |
7338 | 7330 | | |
7339 | | - | |
| 7331 | + | |
7340 | 7332 | | |
7341 | 7333 | | |
7342 | 7334 | | |
| |||
7528 | 7520 | | |
7529 | 7521 | | |
7530 | 7522 | | |
7531 | | - | |
| 7523 | + | |
7532 | 7524 | | |
7533 | 7525 | | |
7534 | 7526 | | |
| |||
7543 | 7535 | | |
7544 | 7536 | | |
7545 | 7537 | | |
7546 | | - | |
| 7538 | + | |
7547 | 7539 | | |
7548 | 7540 | | |
7549 | 7541 | | |
| |||
11016 | 11008 | | |
11017 | 11009 | | |
11018 | 11010 | | |
11019 | | - | |
| 11011 | + | |
11020 | 11012 | | |
11021 | 11013 | | |
11022 | 11014 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
4035 | 4036 | | |
4036 | 4037 | | |
4037 | 4038 | | |
| 4039 | + | |
| 4040 | + | |
| 4041 | + | |
| 4042 | + | |
| 4043 | + | |
| 4044 | + | |
| 4045 | + | |
| 4046 | + | |
| 4047 | + | |
| 4048 | + | |
| 4049 | + | |
| 4050 | + | |
| 4051 | + | |
| 4052 | + | |
| 4053 | + | |
4038 | 4054 | | |
4039 | 4055 | | |
4040 | 4056 | | |
| |||
4118 | 4134 | | |
4119 | 4135 | | |
4120 | 4136 | | |
| 4137 | + | |
| 4138 | + | |
| 4139 | + | |
4121 | 4140 | | |
4122 | 4141 | | |
4123 | 4142 | | |
| |||
4458 | 4477 | | |
4459 | 4478 | | |
4460 | 4479 | | |
| 4480 | + | |
| 4481 | + | |
| 4482 | + | |
| 4483 | + | |
| 4484 | + | |
| 4485 | + | |
| 4486 | + | |
| 4487 | + | |
| 4488 | + | |
| 4489 | + | |
| 4490 | + | |
| 4491 | + | |
| 4492 | + | |
| 4493 | + | |
| 4494 | + | |
4461 | 4495 | | |
4462 | 4496 | | |
4463 | 4497 | | |
| |||
4521 | 4555 | | |
4522 | 4556 | | |
4523 | 4557 | | |
| 4558 | + | |
| 4559 | + | |
| 4560 | + | |
4524 | 4561 | | |
4525 | 4562 | | |
4526 | 4563 | | |
| |||
5946 | 5983 | | |
5947 | 5984 | | |
5948 | 5985 | | |
| 5986 | + | |
| 5987 | + | |
| 5988 | + | |
| 5989 | + | |
| 5990 | + | |
| 5991 | + | |
| 5992 | + | |
| 5993 | + | |
| 5994 | + | |
| 5995 | + | |
| 5996 | + | |
| 5997 | + | |
| 5998 | + | |
| 5999 | + | |
| 6000 | + | |
| 6001 | + | |
| 6002 | + | |
| 6003 | + | |
| 6004 | + | |
| 6005 | + | |
| 6006 | + | |
| 6007 | + | |
| 6008 | + | |
| 6009 | + | |
| 6010 | + | |
| 6011 | + | |
| 6012 | + | |
| 6013 | + | |
| 6014 | + | |
| 6015 | + | |
| 6016 | + | |
| 6017 | + | |
| 6018 | + | |
| 6019 | + | |
| 6020 | + | |
| 6021 | + | |
| 6022 | + | |
| 6023 | + | |
| 6024 | + | |
| 6025 | + | |
| 6026 | + | |
| 6027 | + | |
| 6028 | + | |
| 6029 | + | |
| 6030 | + | |
| 6031 | + | |
| 6032 | + | |
| 6033 | + | |
| 6034 | + | |
| 6035 | + | |
| 6036 | + | |
| 6037 | + | |
| 6038 | + | |
| 6039 | + | |
| 6040 | + | |
| 6041 | + | |
| 6042 | + | |
| 6043 | + | |
| 6044 | + | |
| 6045 | + | |
| 6046 | + | |
| 6047 | + | |
| 6048 | + | |
| 6049 | + | |
| 6050 | + | |
| 6051 | + | |
| 6052 | + | |
| 6053 | + | |
| 6054 | + | |
| 6055 | + | |
| 6056 | + | |
| 6057 | + | |
| 6058 | + | |
| 6059 | + | |
| 6060 | + | |
5949 | 6061 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
770 | 770 | | |
771 | 771 | | |
772 | 772 | | |
| 773 | + | |
| 774 | + | |
773 | 775 | | |
774 | 776 | | |
775 | 777 | | |
| |||
0 commit comments