[webkit-changes] [295050] trunk/Source/WebCore

2022-05-31 Thread obrufau
Title: [295050] trunk/Source/WebCore








Revision 295050
Author obru...@igalia.com
Date 2022-05-31 06:39:54 -0700 (Tue, 31 May 2022)


Log Message
Ensure logical properties have skip-builder
https://bugs.webkit.org/show_bug.cgi?id=241105

Reviewed by Tim Nguyen.

Builder::applyProperty resolves logical properties into physical ones.
So there is no need to define BuilderCustom methods for them.
Thus, most already have skip-builder:true. This patch covers the only
two exceptions.

No test since there should be no change in behavior.

* Source/WebCore/css/CSSProperties.json:
Flag contain-intrinsic-block-size and contain-intrinsic-inline-size with
skip-builder:true.

* Source/WebCore/css/makeprop.pl:
Require logical properties to have skip-builder:true.

* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyInitialContainIntrinsicBlockSize): Deleted.
(WebCore::Style::BuilderCustom::applyInheritContainIntrinsicBlockSize): Deleted.
(WebCore::Style::BuilderCustom::applyValueContainIntrinsicBlockSize): Deleted.
(WebCore::Style::BuilderCustom::applyInitialContainIntrinsicInlineSize): Deleted.
(WebCore::Style::BuilderCustom::applyInheritContainIntrinsicInlineSize): Deleted.
(WebCore::Style::BuilderCustom::applyValueContainIntrinsicInlineSize): Deleted.
Remove unnecessary logic.

Canonical link: https://commits.webkit.org/251145@main

Modified Paths

trunk/Source/WebCore/css/CSSProperties.json
trunk/Source/WebCore/css/makeprop.pl
trunk/Source/WebCore/style/StyleBuilderCustom.h




Diff

Modified: trunk/Source/WebCore/css/CSSProperties.json (295049 => 295050)

--- trunk/Source/WebCore/css/CSSProperties.json	2022-05-31 13:24:31 UTC (rev 295049)
+++ trunk/Source/WebCore/css/CSSProperties.json	2022-05-31 13:39:54 UTC (rev 295050)
@@ -5290,7 +5290,7 @@
 },
 "contain-intrinsic-block-size": {
 "codegen-properties": {
-"custom": "All",
+"skip-builder": true,
 "settings-flag": "cssContainIntrinsicSizeEnabled",
 "logical-property-group": {
 "name": "contain-intrinsic-size",
@@ -5307,7 +5307,7 @@
 },
 "contain-intrinsic-inline-size": {
 "codegen-properties": {
-"custom": "All",
+"skip-builder": true,
 "settings-flag": "cssContainIntrinsicSizeEnabled",
 "logical-property-group": {
 "name": "contain-intrinsic-size",


Modified: trunk/Source/WebCore/css/makeprop.pl (295049 => 295050)

--- trunk/Source/WebCore/css/makeprop.pl	2022-05-31 13:24:31 UTC (rev 295049)
+++ trunk/Source/WebCore/css/makeprop.pl	2022-05-31 13:39:54 UTC (rev 295050)
@@ -1482,6 +1482,7 @@
   next if (exists $propertiesWithStyleBuilderOptions{$name}{"longhands"});
   next if (exists $propertiesWithStyleBuilderOptions{$name}{"skip-builder"});
   next if (exists $synonyms{$name});
+  die "Property $name is logical but doesn't have skip-builder\n" if isLogical($name);
 
   my $indent = "";
   if (!$propertiesWithStyleBuilderOptions{$name}{"custom"}{"Initial"}) {


Modified: trunk/Source/WebCore/style/StyleBuilderCustom.h (295049 => 295050)

--- trunk/Source/WebCore/style/StyleBuilderCustom.h	2022-05-31 13:24:31 UTC (rev 295049)
+++ trunk/Source/WebCore/style/StyleBuilderCustom.h	2022-05-31 13:39:54 UTC (rev 295050)
@@ -87,8 +87,6 @@
 DECLARE_PROPERTY_CUSTOM_HANDLERS(Contain);
 DECLARE_PROPERTY_CUSTOM_HANDLERS(ContainIntrinsicWidth);
 DECLARE_PROPERTY_CUSTOM_HANDLERS(ContainIntrinsicHeight);
-DECLARE_PROPERTY_CUSTOM_HANDLERS(ContainIntrinsicBlockSize);
-DECLARE_PROPERTY_CUSTOM_HANDLERS(ContainIntrinsicInlineSize);
 DECLARE_PROPERTY_CUSTOM_HANDLERS(Content);
 DECLARE_PROPERTY_CUSTOM_HANDLERS(CounterIncrement);
 DECLARE_PROPERTY_CUSTOM_HANDLERS(CounterReset);
@@ -2169,57 +2167,5 @@
 style.setContainIntrinsicHeight(lengthValue);
 }
 
-inline void BuilderCustom::applyInitialContainIntrinsicBlockSize(BuilderState& builderState)
-{
-auto& style = builderState.style();
-auto resolvedID = CSSProperty::resolveDirectionAwareProperty(CSSPropertyContainIntrinsicBlockSize, style.direction(), style.writingMode());
-
-if (resolvedID == CSSPropertyContainIntrinsicHeight)
-applyInitialContainIntrinsicHeight(builderState);
-else
-applyInitialContainIntrinsicWidth(builderState);
 }
-
-inline void BuilderCustom::applyInheritContainIntrinsicBlockSize(BuilderState&)
-{
 }
-
-inline void BuilderCustom::applyValueContainIntrinsicBlockSize(BuilderState& builderState, CSSValue& value)
-{
-auto& style = builderState.style();
-auto resolvedID = CSSProperty::resolveDirectionAwareProperty(CSSPropertyContainIntrinsicBlockSize, style.direction(), style.writingMode());
-
-if (resolvedID == CSSPropertyContainIntrinsicHeight)
-applyValueContainIntrinsicHeight(builderState, value);
-else
-applyValueContainIntrinsicWidth(builderState, value);
-}
-

[webkit-changes] [294799] trunk

2022-05-25 Thread obrufau
Title: [294799] trunk








Revision 294799
Author obru...@igalia.com
Date 2022-05-25 08:18:07 -0700 (Wed, 25 May 2022)


Log Message
Don't index shorthands in computed styles
https://bugs.webkit.org/show_bug.cgi?id=240356

Reviewed by Tim Nguyen.

Most shorthands were already not indexed, but legacy shorthands with a
single longhand were indexed. This didn't make much sense, since they
are like aliases with a different syntax, and aliases are not indexed.

Tests: fast/css/getComputedStyle/computed-style.html
   fast/css/getComputedStyle/computed-style-without-renderer.html
   imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml.html
   imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer.html
   imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree.html
   svg/css/getComputedStyle-basic.xhtml

Canonical link: https://commits.webkit.org/250955@main

Modified Paths

trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
trunk/LayoutTests/fast/css/getComputedStyle/resources/property-names.js
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt
trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
trunk/Source/WebCore/css/makeprop.pl




Diff

Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt (294798 => 294799)

--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt	2022-05-25 15:03:55 UTC (rev 294798)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt	2022-05-25 15:18:07 UTC (rev 294799)
@@ -38,6 +38,9 @@
 bottom: auto;
 box-shadow: none;
 box-sizing: content-box;
+break-after: auto;
+break-before: auto;
+break-inside: auto;
 buffered-rendering: auto;
 caption-side: top;
 clear: none;
@@ -144,9 +147,6 @@
 padding-left: 0px;
 padding-right: 0px;
 padding-top: 0px;
-page-break-after: auto;
-page-break-before: auto;
-page-break-inside: auto;
 paint-order: normal;
 perspective: none;
 perspective-origin: 392px 288px;
@@ -182,6 +182,7 @@
 text-emphasis-position: over right;
 text-emphasis-style: none;
 text-indent: 0px;
+text-orientation: mixed;
 text-overflow: clip;
 text-rendering: auto;
 text-shadow: none;
@@ -225,9 +226,6 @@
 -webkit-box-reflect: none;
 -webkit-box-shadow: none;
 -webkit-column-axis: auto;
--webkit-column-break-after: auto;
--webkit-column-break-before: auto;
--webkit-column-break-inside: auto;
 -webkit-font-smoothing: auto;
 -webkit-hyphenate-character: auto;
 -webkit-hyphenate-limit-after: auto;
@@ -251,7 +249,6 @@
 -webkit-nbsp-mode: normal;
 -webkit-rtl-ordering: logical;
 -webkit-text-fill-color: rgb(0, 0, 0);
--webkit-text-orientation: mixed;
 -webkit-text-security: none;
 -webkit-text-stroke-color: rgb(0, 0, 0);
 -webkit-text-stroke-width: 0px;


Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt (294798 => 294799)

--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt	2022-05-25 15:03:55 UTC (rev 294798)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt	2022-05-25 15:18:07 UTC (rev 294799)
@@ -37,6 +37,9 @@
 bottom: auto
 box-shadow: none
 box-sizing: content-box
+break-after: auto
+break-before: auto
+break-inside: auto
 buffered-rendering: auto
 caption-side: top
 clear: none
@@ -143,9 +146,6 @@
 padding-left: 0px
 padding-right: 0px
 padding-top: 0px
-page-break-after: auto
-page-break-before: auto
-page-break-inside: auto
 paint-order: normal
 perspective: none
 perspective-origin: 50% 50%
@@ -181,6 +181,7 @@
 text-emphasis-position: over right
 text-emphasis-style: none
 text-indent: 0px
+text-orientation: mixed
 text-overflow: clip
 text-rendering: auto
 text-shadow: none
@@ -224,9 +225,6 @@
 -webkit-box-reflect: none
 -webkit-box-shadow: none
 -webkit-column-axis: auto
--webkit-column-break-after: auto
--webkit-column-break-before: auto
--webkit-

[webkit-changes] [294744] trunk

2022-05-24 Thread obrufau
Title: [294744] trunk








Revision 294744
Author obru...@igalia.com
Date 2022-05-24 07:22:19 -0700 (Tue, 24 May 2022)


Log Message
Obey intrinsic min-height in nested column flex container
https://bugs.webkit.org/show_bug.cgi?id=240068

Reviewed by Sergio Villar Senin.

Fixes a regression from bug 230755. An intrinsic min-height should make
a column flex container grow enough for its contents, even if it's also
a flex item with a small definite flex-basis like 0px.

Test: imported/w3c/web-platform-tests/css/css-flexbox/flex-minimum-height-flex-items-031.html

Canonical link: https://commits.webkit.org/250912@main

Modified Paths

trunk/Source/WebCore/rendering/RenderBox.cpp
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
trunk/Source/WebCore/rendering/RenderFlexibleBox.h


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flex-minimum-height-flex-items-031-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flex-minimum-height-flex-items-031.html




Diff

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flex-minimum-height-flex-items-031-expected.txt (0 => 294744)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flex-minimum-height-flex-items-031-expected.txt	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flex-minimum-height-flex-items-031-expected.txt	2022-05-24 14:22:19 UTC (rev 294744)
@@ -0,0 +1,220 @@
+
+PASS .flex 1
+PASS .flex 2
+PASS .flex 3
+PASS .flex 4
+PASS .flex 5
+PASS .flex 6
+PASS .flex 7
+PASS .flex 8
+PASS .flex 9
+PASS .flex 10
+PASS .flex 11
+PASS .flex 12
+PASS .flex 13
+PASS .flex 14
+PASS .flex 15
+PASS .flex 16
+PASS .flex 17
+PASS .flex 18
+PASS .flex 19
+PASS .flex 20
+PASS .flex 21
+PASS .flex 22
+PASS .flex 23
+PASS .flex 24
+PASS .flex 25
+PASS .flex 26
+PASS .flex 27
+PASS .flex 28
+PASS .flex 29
+PASS .flex 30
+PASS .flex 31
+PASS .flex 32
+PASS .flex 33
+PASS .flex 34
+PASS .flex 35
+PASS .flex 36
+PASS .flex 37
+PASS .flex 38
+PASS .flex 39
+PASS .flex 40
+PASS .flex 41
+PASS .flex 42
+PASS .flex 43
+PASS .flex 44
+PASS .flex 45
+PASS .flex 46
+PASS .flex 47
+PASS .flex 48
+PASS .flex 49
+PASS .flex 50
+PASS .flex 51
+PASS .flex 52
+PASS .flex 53
+PASS .flex 54
+PASS .flex 55
+PASS .flex 56
+PASS .flex 57
+PASS .flex 58
+PASS .flex 59
+PASS .flex 60
+PASS .flex 61
+PASS .flex 62
+PASS .flex 63
+PASS .flex 64
+PASS .flex 65
+PASS .flex 66
+PASS .flex 67
+PASS .flex 68
+PASS .flex 69
+PASS .flex 70
+PASS .flex 71
+PASS .flex 72
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+1
+2
+
+


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flex-minimum-height-flex-items-031.html (0 => 294744)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flex-minimum-height-flex-items-031.html	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flex-minimum-height-flex-items-031.html	2022-05-24 14:22:19 UTC (rev 294744)
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+for (let outerFlexDirection of ["column", "column-reverse"]) {
+  for (let innerFlexDirection of ["column", "column-reverse"]) {
+for (let placeContent of ["start", "center", "end"]) {
+  for (let minHeight of ["auto", "min-content", "max-content"]) {
+for (let flex of ["0 0 44px", "1 1 44px"]) {
+  const outer = document.createElement("div");
+  outer.className = "flex";
+  outer.style.display = "inline-flex";
+  outer.style.flexDirection = outerFlexDirection;
+  outer.style.border = "1px solid #000";
+  outer.dataset.expectedClientHeight = "104";
+
+  const inner = document.createElement("div");
+  inner.style.flexBasis = "0px";
+  inner.style.display = "flex";
+  inner.style.flexDirection = innerFlexDirection;
+  inner.style.placeContent = placeContent;
+  inner.style.minHeight = minHeight;
+  inner.style.border = "2px solid #0ff";
+  inner.dataset.expectedClientHeight = "100";
+
+  const content1 = document.createElement("div");
+  content1.style.flex = flex;
+  content1.style.border = "3px solid #f0f";
+  content1.dataset.expectedHeight = "50";
+
+  const content2 = content1.cloneNode();
+
+  content1.textContent = "1";
+  content2.textContent = "2";
+  inner.appendChild(content1);
+  inner.appendChild(content2);
+  outer.appendChild(inner);
+  document.body.appendChild(outer);
+}
+  }
+  

[webkit-changes] [294275] trunk

2022-05-16 Thread obrufau
Title: [294275] trunk








Revision 294275
Author obru...@igalia.com
Date 2022-05-16 16:03:23 -0700 (Mon, 16 May 2022)


Log Message
Take intrinsicBorderForFieldset() into account in intrinsically sized fieldset
https://bugs.webkit.org/show_bug.cgi?id=240388

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Add test.

* web-platform-tests/html/semantics/forms/the-fieldset-element/fieldset-intrinsic-size-expected.txt: Added.
* web-platform-tests/html/semantics/forms/the-fieldset-element/fieldset-intrinsic-size.html: Added.

Source/WebCore:

With 'box-sizing: content-box', computeIntrinsicLogicalContentHeightUsing
was not taking intrinsicBorderForFieldset() into account. So a fieldset
with 'height: min-content' would ignore the extra space required by the
legend, and the contents would overflow.

This patch adds a RenderBox::adjustIntrinsicLogicalHeightForBoxSizing
method with the logic, and overrides it in RenderBlock to take
intrinsicBorderForFieldset() into account.

Test: imported/w3c/web-platform-tests/html/semantics/forms/the-fieldset-element/fieldset-intrinsic-size.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::adjustIntrinsicLogicalHeightForBoxSizing const):
Take intrinsicBorderForFieldset() into account.

* rendering/RenderBlock.h:
Override adjustIntrinsicLogicalHeightForBoxSizing.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::adjustIntrinsicLogicalHeightForBoxSizing const):
(WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing const):
Move logic into a new method so that RenderBlock can override it.

* rendering/RenderBox.h:
Declare adjustIntrinsicLogicalHeightForBoxSizing as virtual.
No need for computeIntrinsicLogicalContentHeightUsing to be virtual.

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderBlock.cpp
trunk/Source/WebCore/rendering/RenderBlock.h
trunk/Source/WebCore/rendering/RenderBox.cpp
trunk/Source/WebCore/rendering/RenderBox.h


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-fieldset-element/fieldset-intrinsic-size-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-fieldset-element/fieldset-intrinsic-size.html




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (294274 => 294275)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-05-16 22:59:07 UTC (rev 294274)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-05-16 23:03:23 UTC (rev 294275)
@@ -1,3 +1,15 @@
+2022-05-16  Oriol Brufau  
+
+Take intrinsicBorderForFieldset() into account in intrinsically sized fieldset
+https://bugs.webkit.org/show_bug.cgi?id=240388
+
+Reviewed by Darin Adler.
+
+Add test.
+
+* web-platform-tests/html/semantics/forms/the-fieldset-element/fieldset-intrinsic-size-expected.txt: Added.
+* web-platform-tests/html/semantics/forms/the-fieldset-element/fieldset-intrinsic-size.html: Added.
+
 2022-05-16  Tim Nguyen  
 
 [css-ui] Unexpose attachment and borderless-attachment appearance values


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-fieldset-element/fieldset-intrinsic-size-expected.txt (0 => 294275)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-fieldset-element/fieldset-intrinsic-size-expected.txt	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-fieldset-element/fieldset-intrinsic-size-expected.txt	2022-05-16 23:03:23 UTC (rev 294275)
@@ -0,0 +1,19 @@
+
+PASS auto content-box
+PASS auto border-box
+PASS min-content content-box
+PASS min-content border-box
+PASS max-content content-box
+PASS max-content border-box
+Legend
+Contents
+Legend
+Contents
+Legend
+Contents
+Legend
+Contents
+Legend
+Contents
+Legend
+Contents


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-fieldset-element/fieldset-intrinsic-size.html (0 => 294275)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-fieldset-element/fieldset-intrinsic-size.html	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-fieldset-element/fieldset-intrinsic-size.html	2022-05-16 23:03:23 UTC (rev 294275)
@@ -0,0 +1,74 @@
+
+
+Fieldset with intrinsic size
+
+
+fieldset {
+  height: min-content;
+  padding: 7px;
+  border: 3px solid cyan;
+}
+fieldset > div {
+  border: 3px solid orange;
+}
+.auto {
+  height: auto;
+}
+.min-content {
+  height: min-content;
+}
+.max-content {
+  height: max-content;
+}
+.content-box {
+  box-sizing: content-box;
+}
+.border-box {
+  box-sizing: border-box;
+}
+
+
+
+
+
+  Legend
+  Contents
+
+
+  Legend
+  Contents
+
+
+  Legend
+  Contents
+
+
+  Legend
+  Contents
+
+
+  Legend
+  Contents
+
+
+  Legend
+  Contents
+
+
+
+for (let fieldset of document.querySelectorAll("fieldset")) {
+  test(function() {
+const fieldsetRect 

[webkit-changes] [294101] trunk

2022-05-12 Thread obrufau
Title: [294101] trunk








Revision 294101
Author obru...@igalia.com
Date 2022-05-12 06:49:11 -0700 (Thu, 12 May 2022)


Log Message
[cssom] Serialize computed '-webkit-text-combine: none'
https://bugs.webkit.org/show_bug.cgi?id=239989

Reviewed by Tim Nguyen.

LayoutTests/imported/w3c:

Update some test expectations.

* web-platform-tests/css/cssom/serialize-all-longhands-expected.txt:

Source/WebCore:

The computed value of '-webkit-text-combine' was only serialized for
'-webkit-text-combine: horizontal' or 'text-combine-upright: all'.

But the initial value 'none' just produced an empty string.

Test: imported/w3c/web-platform-tests/css/cssom/serialize-all-longhands.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/serialize-all-longhands-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (294100 => 294101)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-05-12 13:30:17 UTC (rev 294100)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-05-12 13:49:11 UTC (rev 294101)
@@ -1,3 +1,14 @@
+2022-05-12  Oriol Brufau  
+
+[cssom] Serialize computed '-webkit-text-combine: none'
+https://bugs.webkit.org/show_bug.cgi?id=239989
+
+Reviewed by Tim Nguyen.
+
+Update some test expectations.
+
+* web-platform-tests/css/cssom/serialize-all-longhands-expected.txt:
+
 2022-05-12  Tim Nguyen  
 
 [:has() pseudo-class] Support invalidation for :target pseudo-class


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/serialize-all-longhands-expected.txt (294100 => 294101)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/serialize-all-longhands-expected.txt	2022-05-12 13:30:17 UTC (rev 294100)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/serialize-all-longhands-expected.txt	2022-05-12 13:49:11 UTC (rev 294101)
@@ -1,4 +1,4 @@
 
 PASS Specified style
-FAIL Computed style assert_array_equals: lengths differ, expected array [] length 0, got ["size", "-webkit-text-combine"] length 2
+FAIL Computed style assert_array_equals: lengths differ, expected array [] length 0, got ["size"] length 1
 


Modified: trunk/Source/WebCore/ChangeLog (294100 => 294101)

--- trunk/Source/WebCore/ChangeLog	2022-05-12 13:30:17 UTC (rev 294100)
+++ trunk/Source/WebCore/ChangeLog	2022-05-12 13:49:11 UTC (rev 294101)
@@ -1,3 +1,20 @@
+2022-05-12  Oriol Brufau  
+
+[cssom] Serialize computed '-webkit-text-combine: none'
+https://bugs.webkit.org/show_bug.cgi?id=239989
+
+Reviewed by Tim Nguyen.
+
+The computed value of '-webkit-text-combine' was only serialized for
+'-webkit-text-combine: horizontal' or 'text-combine-upright: all'.
+
+But the initial value 'none' just produced an empty string.
+
+Test: imported/w3c/web-platform-tests/css/cssom/serialize-all-longhands.html
+
+* css/CSSComputedStyleDeclaration.cpp:
+(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
+
 2022-05-12  Zan Dobersek  
 
 [GTK][WPE] Respect and use the DMABuf modifier values


Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (294100 => 294101)

--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2022-05-12 13:30:17 UTC (rev 294100)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2022-05-12 13:49:11 UTC (rev 294101)
@@ -3969,7 +3969,7 @@
 case CSSPropertyWebkitTextCombine:
 if (style.textCombine() == TextCombine::All)
 return CSSPrimitiveValue::createIdentifier(CSSValueHorizontal);
-return nullptr;
+return cssValuePool.createValue(style.textCombine());
 case CSSPropertyTextCombineUpright:
 return cssValuePool.createValue(style.textCombine());
 case CSSPropertyWebkitTextOrientation:






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [294002] trunk

2022-05-09 Thread obrufau
Title: [294002] trunk








Revision 294002
Author obru...@igalia.com
Date 2022-05-09 23:52:20 -0700 (Mon, 09 May 2022)


Log Message
[cssom] Don't index perspective/transform-origin-* in computed styles
https://bugs.webkit.org/show_bug.cgi?id=239670

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update some test expectations.

Add serialize-all-longhands.html, it still fails due to
https://webkit.org/b/239965 and https://webkit.org/b/239989.

* web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt:
* web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
* web-platform-tests/css/cssom/serialize-all-longhands-expected.txt: Added.
* web-platform-tests/css/cssom/serialize-all-longhands.html: Added.

Source/WebCore:

'perspective-origin' and 'transform-origin' are shorthands in WebKit.
The longhands are 'perspective-origin-x/y' and 'transform-origin-x/y/z'.
But these aren't standard properties, so they serialize to empty string
in computed styles. However, they were still indexed.

This patch stops indexing these longhands, so they won't appear when
iterating a computed style. Also, the shorthands will now be indexed.

Test: fast/css/getComputedStyle/computed-style.html
  fast/css/getComputedStyle/computed-style-without-renderer.html
  imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml.html
  imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer.html
  imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree.html
  imported/w3c/web-platform-tests/css/cssom/serialize-all-longhands.html
  svg/css/getComputedStyle-basic.xhtml

* css/CSSProperties.json:
Add "computable" flag.

* css/makeprop.pl:
(skippedFromComputedStyle):
(addProperty):
Let "computable" flag override default logic for indexing or not in
computed styles.

Tools:

Add checker for new "computable" flag.

* Scripts/webkitpy/style/checkers/jsonchecker.py:
(JSONCSSPropertiesChecker.check_codegen_properties):

LayoutTests:

Update test expectations.

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
* platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt
trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSProperties.json
trunk/Source/WebCore/css/makeprop.pl
trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/style/checkers/jsonchecker.py


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/serialize-all-longhands-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/serialize-all-longhands.html




Diff

Modified: trunk/LayoutTests/ChangeLog (294001 => 294002)

--- trunk/LayoutTests/ChangeLog	2022-05-10 06:48:49 UTC (rev 294001)
+++ trunk/LayoutTests/ChangeLog	2022-05-10 06:52:20 UTC (rev 294002)
@@ -1,3 +1,22 @@
+2022-05-09  Oriol Brufau  
+
+[cssom] Don't index perspective/transform-origin-* in computed styles
+https://bugs.webk

[webkit-changes] [293689] trunk

2022-05-02 Thread obrufau
Title: [293689] trunk








Revision 293689
Author obru...@igalia.com
Date 2022-05-02 15:35:13 -0700 (Mon, 02 May 2022)


Log Message
[cssom] Don't index 'all' shorthand in computed styles
https://bugs.webkit.org/show_bug.cgi?id=239669

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update test expectations.

* web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:

Source/WebCore:

Computed styles should provide getters for both longhands and shorthands,
but only the former should be indexed.

However, the 'all' shorthand was being indexed as if it was a longhand.

Tests: imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml.html
   imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree.html

* css/makeprop.pl:
(skippedFromComputedStyle):

LayoutTests:

Update test expectations.

* platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
* platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/makeprop.pl




Diff

Modified: trunk/LayoutTests/ChangeLog (293688 => 293689)

--- trunk/LayoutTests/ChangeLog	2022-05-02 22:33:52 UTC (rev 293688)
+++ trunk/LayoutTests/ChangeLog	2022-05-02 22:35:13 UTC (rev 293689)
@@ -1,3 +1,19 @@
+2022-05-02  Oriol Brufau  
+
+[cssom] Don't index 'all' shorthand in computed styles
+https://bugs.webkit.org/show_bug.cgi?id=239669
+
+Reviewed by Darin Adler.
+
+Update test expectations.
+
+* platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
+* platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
+* platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
+* platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
+* platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
+* platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
+
 2022-05-02  Devin Rousso  
 
 [Modern Media Controls] REGRESSION(?) tapping a video to start playing for the first time doesn't start playing


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (293688 => 293689)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-05-02 22:33:52 UTC (rev 293688)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-05-02 22:35:13 UTC (rev 293689)
@@ -1,3 +1,15 @@
+2022-05-02  Oriol Brufau  
+
+[cssom] Don't index 'all' shorthand in computed styles
+https://bugs.webkit.org/show_bug.cgi?id=239669
+
+Reviewed by Darin Adler.
+
+Update test expectations.
+
+* web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
+* web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
+
 2022-05-02  Youenn Fablet  
 
 Cancel response stream if load is being cancelled by the web page


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt (293688 => 293689)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt	2022-05-02 22:33:52 UTC (rev 293688)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt	2022-05-02 22:35:13 UTC (rev 293689)
@@ -7,7 +7,6 @@
 PASS align-items
 PASS align-self
 PASS alignment-baseline

[webkit-changes] [293670] trunk

2022-05-02 Thread obrufau
Title: [293670] trunk








Revision 293670
Author obru...@igalia.com
Date 2022-05-02 11:05:02 -0700 (Mon, 02 May 2022)


Log Message
[cssom] Enumerate all logical longhands in the computed style
https://bugs.webkit.org/show_bug.cgi?id=239910

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update test expectations.

* web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt:
* web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:

Source/WebCore:

Bug 210695 made computed styles enumerate most logical longhands, but
only the ones thefined in the css-logical spec were included. Other
specs, like css-scroll-snap, can also define logical longhands.

This patch fixes the logic, and instead of checking the spec, it checks
the "logical-property-group" field.

Tests: imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml.html
   imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer.html
   imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree.html

* css/makeprop.pl:
(isLogical):

LayoutTests:

Update test expectations.
all-prop-initial-xml-expected.txt for ios was clearly outdated, so just
removing it.

* platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
* platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: Removed.
* platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt
trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/makeprop.pl


Removed Paths

trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-cascade/




Diff

Modified: trunk/LayoutTests/ChangeLog (293669 => 293670)

--- trunk/LayoutTests/ChangeLog	2022-05-02 17:21:34 UTC (rev 293669)
+++ trunk/LayoutTests/ChangeLog	2022-05-02 18:05:02 UTC (rev 293670)
@@ -1,3 +1,22 @@
+2022-05-02  Oriol Brufau  
+
+[cssom] Enumerate all logical longhands in the computed style
+https://bugs.webkit.org/show_bug.cgi?id=239910
+
+Reviewed by Darin Adler.
+
+Update test expectations.
+all-prop-initial-xml-expected.txt for ios was clearly outdated, so just
+removing it.
+
+* platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
+* platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
+* platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: Removed.
+* platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
+* platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt:
+* platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
+* platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
+
 2022-05-02  Antti Koivisto  
 
 REGRESSION: fast/css/stylesheet-candidate-nodes-crash.xhtml is a constant text failure


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (293669 => 293670)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-05-02 17:21:34 UTC (rev 293669)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-05-02 18:05:02 UTC (rev 293670)
@@ -1,3 +1,16 @

[webkit-changes] [293622] trunk/Source/WebCore

2022-04-29 Thread obrufau
Title: [293622] trunk/Source/WebCore








Revision 293622
Author obru...@igalia.com
Date 2022-04-29 11:08:24 -0700 (Fri, 29 Apr 2022)


Log Message
[css-cascade] Sort shorthand properties at the end of CSSPropertyID enum
https://bugs.webkit.org/show_bug.cgi?id=23

Reviewed by Darin Adler.

Only longhands should matter during the CSS Cascade, so by sorting
shorthands at the end, and ignoring them, we can save some memory and
avoid some iterations.

No test since now there should be no observable change in behavior.

* css/StylePropertyShorthand.cpp:
(WebCore::isShorthandCSSProperty): Deleted.
* css/StylePropertyShorthand.h:
(WebCore::isShorthandCSSProperty):
Turn function into a simple constexpr comparison.

* css/makeprop.pl:
(addProperty):
(sortByDescendingPriorityAndName):
Sort shorthand properties at the end.

* style/PropertyCascade.h:
Update comment.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/StylePropertyShorthand.cpp
trunk/Source/WebCore/css/StylePropertyShorthand.h
trunk/Source/WebCore/css/makeprop.pl
trunk/Source/WebCore/style/PropertyCascade.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (293621 => 293622)

--- trunk/Source/WebCore/ChangeLog	2022-04-29 17:47:48 UTC (rev 293621)
+++ trunk/Source/WebCore/ChangeLog	2022-04-29 18:08:24 UTC (rev 293622)
@@ -1,3 +1,30 @@
+2022-04-29  Oriol Brufau  
+
+[css-cascade] Sort shorthand properties at the end of CSSPropertyID enum
+https://bugs.webkit.org/show_bug.cgi?id=23
+
+Reviewed by Darin Adler.
+
+Only longhands should matter during the CSS Cascade, so by sorting
+shorthands at the end, and ignoring them, we can save some memory and
+avoid some iterations.
+
+No test since now there should be no observable change in behavior.
+
+* css/StylePropertyShorthand.cpp:
+(WebCore::isShorthandCSSProperty): Deleted.
+* css/StylePropertyShorthand.h:
+(WebCore::isShorthandCSSProperty):
+Turn function into a simple constexpr comparison.
+
+* css/makeprop.pl:
+(addProperty):
+(sortByDescendingPriorityAndName):
+Sort shorthand properties at the end.
+
+* style/PropertyCascade.h:
+Update comment.
+
 2022-04-29  Jer Noble  
 
 [iOS] Video on twitch.tv shifts to top of screen when toggling playback in fullscreen


Modified: trunk/Source/WebCore/css/StylePropertyShorthand.cpp (293621 => 293622)

--- trunk/Source/WebCore/css/StylePropertyShorthand.cpp	2022-04-29 17:47:48 UTC (rev 293621)
+++ trunk/Source/WebCore/css/StylePropertyShorthand.cpp	2022-04-29 18:08:24 UTC (rev 293622)
@@ -53,11 +53,6 @@
 return StylePropertyShorthand(CSSPropertyTransition, transitionProperties);
 }
 
-bool isShorthandCSSProperty(CSSPropertyID id)
-{
-return shorthandForProperty(id).length();
-}
-
 unsigned indexOfShorthandForLonghand(CSSPropertyID shorthandID, const StylePropertyShorthandVector& shorthands)
 {
 for (unsigned i = 0, size = shorthands.size(); i < size; ++i) {


Modified: trunk/Source/WebCore/css/StylePropertyShorthand.h (293621 => 293622)

--- trunk/Source/WebCore/css/StylePropertyShorthand.h	2022-04-29 17:47:48 UTC (rev 293621)
+++ trunk/Source/WebCore/css/StylePropertyShorthand.h	2022-04-29 18:08:24 UTC (rev 293622)
@@ -66,6 +66,9 @@
 
 unsigned indexOfShorthandForLonghand(CSSPropertyID, const StylePropertyShorthandVector&);
 
-bool isShorthandCSSProperty(CSSPropertyID);
+constexpr bool isShorthandCSSProperty(CSSPropertyID id)
+{
+return id >= firstShorthandProperty && id <= lastShorthandProperty;
+}
 
 } // namespace WebCore


Modified: trunk/Source/WebCore/css/makeprop.pl (293621 => 293622)

--- trunk/Source/WebCore/css/makeprop.pl	2022-04-29 17:47:48 UTC (rev 293621)
+++ trunk/Source/WebCore/css/makeprop.pl	2022-04-29 18:08:24 UTC (rev 293622)
@@ -285,8 +285,10 @@
 } elsif ($codegenOptionName eq "comment") {
 next;
 } elsif ($codegenOptionName eq "high-priority") {
+die "$name is a shorthand, but has high-priority" if exists $codegenProperties->{"longhands"};
 $nameIsHighPriority{$name} = 1;
 } elsif ($codegenOptionName eq "sink-priority") {
+die "$name is a shorthand, but has sink-priority" if exists $codegenProperties->{"longhands"};
 $namePriorityShouldSink{$name} = 1;
 } elsif ($codegenOptionName eq "related-property") {
 $nameIsDeferred{$name} = 1;
@@ -356,7 +358,14 @@
 
 sub sortByDescendingPriorityAndName
 {
-# Sort names with high priority to the front
+# Sort shorthands to the back
+if (exists $propertiesWithStyleBuilderOptions{$a}{"longhands"} < exists $propertiesWithStyleBuilderOptions{$b}{"longhands"}) {
+return -1;
+}
+if (exists $propertiesWithStyleBuilderOptions{$a}{"longhands"} > exists $propertiesWithStyleBuilderOptions{$b}{"longhands"}) {

[webkit-changes] [293602] trunk

2022-04-28 Thread obrufau
Title: [293602] trunk








Revision 293602
Author obru...@igalia.com
Date 2022-04-28 18:46:53 -0700 (Thu, 28 Apr 2022)


Log Message
[css-cascade] Mark properties sharing a computed value as related
https://bugs.webkit.org/show_bug.cgi?id=239579

Reviewed by Tim Nguyen.

LayoutTests/imported/w3c:

Some failures are now passing.

* web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt:

Source/WebCore:

Some longhand properties share a computed value with another property,
like a legacy -webkit- prefixed one.

In that case, when both properties are specified, the last one should
win. That is typically done by marking the properties as related, using
the "related-property" field. This defers the properties and makes
them cascade properly.

However, some properties weren't marked as related despite sharing a
computed value. So this patch marks these pairs:
 - mask-clip and -webkit-mask-clip
 - mask-composite and -webkit-mask-composite
 - mask-mode and -webkit-mask-source-type
 - text-combine-upright and -webkit-text-combine

Test: imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer.html

* css/CSSProperties.json:

LayoutTests:

Some failures are now passing.

* platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSProperties.json




Diff

Modified: trunk/LayoutTests/ChangeLog (293601 => 293602)

--- trunk/LayoutTests/ChangeLog	2022-04-29 01:28:29 UTC (rev 293601)
+++ trunk/LayoutTests/ChangeLog	2022-04-29 01:46:53 UTC (rev 293602)
@@ -1,3 +1,14 @@
+2022-04-28  Oriol Brufau  
+
+[css-cascade] Mark properties sharing a computed value as related
+https://bugs.webkit.org/show_bug.cgi?id=239579
+
+Reviewed by Tim Nguyen.
+
+Some failures are now passing.
+
+* platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt:
+
 2022-04-28  Karl Rackler  
 
 [ macOS wk1 ] imported/w3c/web-platform-tests/css/css-text/text-transform/text-transform-upperlower-003.html is a flaky image failure


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (293601 => 293602)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-04-29 01:28:29 UTC (rev 293601)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-04-29 01:46:53 UTC (rev 293602)
@@ -1,3 +1,14 @@
+2022-04-28  Oriol Brufau  
+
+[css-cascade] Mark properties sharing a computed value as related
+https://bugs.webkit.org/show_bug.cgi?id=239579
+
+Reviewed by Tim Nguyen.
+
+Some failures are now passing.
+
+* web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt:
+
 2022-04-28  Arcady Goldmints-Orlov  
 
 [GLIB] Update test expectations and baselines. Unreviewed test gardening.


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt (293601 => 293602)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt	2022-04-29 01:28:29 UTC (rev 293601)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt	2022-04-29 01:46:53 UTC (rev 293602)
@@ -184,10 +184,10 @@
 PASS marker-end
 PASS marker-mid
 PASS marker-start
-FAIL mask-clip assert_not_equals: Should get a different computed value. got disallowed value "border-box"
-FAIL mask-composite assert_not_equals: Should get a different computed value. got disallowed value "add"
+PASS mask-clip
+PASS mask-composite
 PASS mask-image
-FAIL mask-mode assert_not_equals: Should get a different computed value. got disallowed value "match-source"
+PASS mask-mode
 PASS mask-origin
 PASS mask-repeat
 PASS mask-size
@@ -284,7 +284,7 @@
 PASS table-layout
 PASS text-align
 PASS text-anchor
-FAIL text-combine-upright assert_not_equals: Should get a different computed value. got disallowed value "none"
+PASS text-combine-upright
 PASS text-decoration
 PASS text-decoration-color
 PASS text-decoration-line


Modified: trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt (293601 => 293602)

--- trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt	2022-04-29 01:28:29 UTC (rev 293601)
+++ trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt	2022-04-29 01:46:53 UTC (rev 293602)
@@ -184,10 +184,10 @@
 PASS marker-end
 PASS marker-mid
 PASS marker-start
-FAIL mask-clip assert_not_equals: Should get a different computed value. got dis

[webkit-changes] [293543] trunk

2022-04-27 Thread obrufau
Title: [293543] trunk








Revision 293543
Author obru...@igalia.com
Date 2022-04-27 15:58:31 -0700 (Wed, 27 Apr 2022)


Log Message
LayoutTests/imported/w3c:
Fix CSS cascade regarding logical properties
https://bugs.webkit.org/show_bug.cgi?id=236199

Reviewed by Darin Adler.

Expect animation-004.html to pass.
Add new test logicalprops-with-deferred-writing-mode.html

* web-platform-tests/css/css-logical/animation-004-expected.txt:
* web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode-expected.txt: Added.
* web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode.html: Added.

Source/WebCore:
Reland "Fix CSS cascade regarding logical properties"
https://bugs.webkit.org/show_bug.cgi?id=236199

Reviewed by Antti Koivisto.

This is a reland of https://commits.webkit.org/r291546, which was
reverted due to a performance regression. This problem should have been
addressed by bug 238260.

Original summary:
> The CSS cascade was trying to resolve logical properties into physical
> ones too early. This failed if we still didn't know the direction or
> writing-mode, e.g. because they were set to a variable or to a CSS-wide
> keyword.
>
> This patch keeps logical properties as-is during the cascade. They are
> only resolved when finally applied. Also, both logical properties and
> their physical equivalents are now set to apply in parse order, since
> 'height: 0px; block-size: 1px' and 'block-size: 1px; height: 0px' can be
> different, the order matters.

Tests: imported/w3c/web-platform-tests/css/css-logical/animation-004.html
   imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode.html

* css/makeprop.pl:
(addProperty):
(sortByDescendingPriorityAndName):
Defer properties that belong to a logical property group.

* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseValueWithVariableReferences):
Logical properties no longer need special handling for variables.

* style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::PropertyCascade):
Remove members no longer needed.

(WebCore::Style::PropertyCascade::set):
This method is no longer used for properties in a logical property
group. Remove dead code and add assert.

(WebCore::Style::PropertyCascade::setDeferred):
Remove assert, logical properties are now handled here.

(WebCore::Style::PropertyCascade::lastDeferredPropertyResolvingRelated const):
Take into account that properties in a logical property group are now
deferred.

(WebCore::Style::PropertyCascade::resolveDirectionAndWritingMode const): Deleted.
(WebCore::Style::PropertyCascade::direction const): Deleted.
Remove broken logic.

* style/PropertyCascade.h:
Remove members, struct and methods no longer needed.
Update method signatures.

* style/StyleBuilder.cpp:
(WebCore::Style::Builder::Builder):
Remove argument no longer needed.

(WebCore::Style::Builder::applyProperty):
Resolve logical properties using the direction and writing-mode from the
style.

(WebCore::Style::directionFromStyle): Deleted.
Remove function no longer needed.

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-004-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/makeprop.pl
trunk/Source/WebCore/css/parser/CSSParser.cpp
trunk/Source/WebCore/style/PropertyCascade.cpp
trunk/Source/WebCore/style/PropertyCascade.h
trunk/Source/WebCore/style/StyleBuilder.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode.html




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (293542 => 293543)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-04-27 22:46:30 UTC (rev 293542)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-04-27 22:58:31 UTC (rev 293543)
@@ -1,3 +1,17 @@
+2022-04-27  Oriol Brufau  
+
+Fix CSS cascade regarding logical properties
+https://bugs.webkit.org/show_bug.cgi?id=236199
+
+Reviewed by Darin Adler.
+
+Expect animation-004.html to pass.
+Add new test logicalprops-with-deferred-writing-mode.html
+
+* web-platform-tests/css/css-logical/animation-004-expected.txt:
+* web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode-expected.txt: Added.
+* web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode.html: Added.
+
 2022-04-27  Tim Nguyen  
 
 Rebaseline imported/w3c/web-platform-tests/css/css-text/inheritance.html after r293521


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-004-expected.txt (293542 => 293543)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-004-expected.txt	2022-04-27 22:46:30 UTC (rev 293542)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logi

[webkit-changes] [293493] trunk/Source/WebCore

2022-04-26 Thread obrufau
Title: [293493] trunk/Source/WebCore








Revision 293493
Author obru...@igalia.com
Date 2022-04-26 19:01:32 -0700 (Tue, 26 Apr 2022)


Log Message
[css-logical] Side border shorthands should not be logical/physical
https://bugs.webkit.org/show_bug.cgi?id=239734

Reviewed by Tim Nguyen.

No test since now there should be no observable change in behavior.

However, this refactoring will be needed for bug 236199.

* animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
Mark logical side border shorthands as animatable.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
Add code for serializing logical side border shorthands.

* css/CSSProperties.json:
Stop side border shorthands from being in a logical property group.
They will just expand into logical or physical longhands, but the
shorthands themselves will be normal.

* css/makeprop.pl:
(addProperty):
Assert that no shorthand belongs to a logical property group.

* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseValueWithVariableReferences):
Remove dead code.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
trunk/Source/WebCore/css/CSSProperties.json
trunk/Source/WebCore/css/makeprop.pl
trunk/Source/WebCore/css/parser/CSSParser.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (293492 => 293493)

--- trunk/Source/WebCore/ChangeLog	2022-04-27 02:00:03 UTC (rev 293492)
+++ trunk/Source/WebCore/ChangeLog	2022-04-27 02:01:32 UTC (rev 293493)
@@ -1,3 +1,35 @@
+2022-04-26  Oriol Brufau  
+
+[css-logical] Side border shorthands should not be logical/physical
+https://bugs.webkit.org/show_bug.cgi?id=239734
+
+Reviewed by Tim Nguyen.
+
+No test since now there should be no observable change in behavior.
+
+However, this refactoring will be needed for bug 236199.
+
+* animation/CSSPropertyAnimation.cpp:
+(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
+Mark logical side border shorthands as animatable.
+
+* css/CSSComputedStyleDeclaration.cpp:
+(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
+Add code for serializing logical side border shorthands.
+
+* css/CSSProperties.json:
+Stop side border shorthands from being in a logical property group.
+They will just expand into logical or physical longhands, but the
+shorthands themselves will be normal.
+
+* css/makeprop.pl:
+(addProperty):
+Assert that no shorthand belongs to a logical property group.
+
+* css/parser/CSSParser.cpp:
+(WebCore::CSSParser::parseValueWithVariableReferences):
+Remove dead code.
+
 2022-04-26  Jean-Yves Avenard  
 
 MediaSession.setPositionState() does not work.


Modified: trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp (293492 => 293493)

--- trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp	2022-04-27 02:00:03 UTC (rev 293492)
+++ trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp	2022-04-27 02:01:32 UTC (rev 293493)
@@ -3373,6 +3373,7 @@
 CSSPropertyWebkitMaskPosition,
 CSSPropertyMaskRepeat,
 CSSPropertyBorderTop, CSSPropertyBorderRight, CSSPropertyBorderBottom, CSSPropertyBorderLeft,
+CSSPropertyBorderBlockStart, CSSPropertyBorderBlockEnd, CSSPropertyBorderInlineStart, CSSPropertyBorderInlineEnd,
 CSSPropertyBorderColor,
 CSSPropertyBorderRadius,
 CSSPropertyBorderWidth,


Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (293492 => 293493)

--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2022-04-27 02:00:03 UTC (rev 293492)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2022-04-27 02:01:32 UTC (rev 293493)
@@ -4043,6 +4043,10 @@
 }
 case CSSPropertyBorderBlockColor:
 return getCSSPropertyValuesFor2SidesShorthand(borderBlockColorShorthand());
+case CSSPropertyBorderBlockEnd:
+return getCSSPropertyValuesForShorthandProperties(borderBlockEndShorthand());
+case CSSPropertyBorderBlockStart:
+return getCSSPropertyValuesForShorthandProperties(borderBlockStartShorthand());
 case CSSPropertyBorderBlockStyle:
 return getCSSPropertyValuesFor2SidesShorthand(borderBlockStyleShorthand());
 case CSSPropertyBorderBlockWidth:
@@ -4061,6 +4065,10 @@
 }
 case CSSPropertyBorderInlineColor:
 return getCSSPropertyValuesFor2SidesShorthand(borderInlineColorShorthand());
+case CSSPropertyBorderInlineEnd:
+return getCSSPropertyValuesForShorthandProperties(borderInlineEndShorthand());
+case CSSPropertyBorderInlineStart:
+return getCSSPropertyValuesForShorthandProperties(borderInlineStartShorthand(

[webkit-changes] [293485] trunk

2022-04-26 Thread obrufau
Title: [293485] trunk








Revision 293485
Author obru...@igalia.com
Date 2022-04-26 17:19:14 -0700 (Tue, 26 Apr 2022)


Log Message
[css-cascade] Fix cascade rollback for deferred properties
https://bugs.webkit.org/show_bug.cgi?id=238125

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add a test. It still has some failures due to bug 239579, bug 239669,
and bug 239670.

* web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt: Added.
* web-platform-tests/css/css-cascade/all-prop-revert-layer.html: Added.

Source/WebCore:

When a deferred property was set to 'revert' or 'revert-layer', it used
to roll back to a declaration of the same exact property (or behave as
'unset' if none).

This patch lets deferred properties roll back to their related property,
e.g. '-webkit-box-shadow: revert-layer' can roll back to a 'box-shadow'
declaration in the previous layer.

This is consistent with logical and physical properties, where the
rollback happens after resolving logical properties.

Test: imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer.html

* style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::lastDeferredPropertyResolvingRelated const):
* style/PropertyCascade.h:
* style/StyleBuilder.cpp:
(WebCore::Style::Builder::applyProperty):

LayoutTests:

Add custom expectation for mac-wk1 since scroll-behavior is disabled
there, and thus not checked by the test.

* platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/style/PropertyCascade.cpp
trunk/Source/WebCore/style/PropertyCascade.h
trunk/Source/WebCore/style/StyleBuilder.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer.html
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (293484 => 293485)

--- trunk/LayoutTests/ChangeLog	2022-04-26 23:44:58 UTC (rev 293484)
+++ trunk/LayoutTests/ChangeLog	2022-04-27 00:19:14 UTC (rev 293485)
@@ -1,3 +1,15 @@
+2022-04-26  Oriol Brufau  
+
+[css-cascade] Fix cascade rollback for deferred properties
+https://bugs.webkit.org/show_bug.cgi?id=238125
+
+Reviewed by Antti Koivisto.
+
+Add custom expectation for mac-wk1 since scroll-behavior is disabled
+there, and thus not checked by the test.
+
+* platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt: Added.
+
 2022-04-26  Karl Rackler  
 
 [ macOS ] webanimations/accelerated-animation-slot-invalidation.html is a flaky image failure


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (293484 => 293485)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-04-26 23:44:58 UTC (rev 293484)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-04-27 00:19:14 UTC (rev 293485)
@@ -1,3 +1,16 @@
+2022-04-26  Oriol Brufau  
+
+[css-cascade] Fix cascade rollback for deferred properties
+https://bugs.webkit.org/show_bug.cgi?id=238125
+
+Reviewed by Antti Koivisto.
+
+Add a test. It still has some failures due to bug 239579, bug 239669,
+and bug 239670.
+
+* web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt: Added.
+* web-platform-tests/css/css-cascade/all-prop-revert-layer.html: Added.
+
 2022-04-26  Ziran Sun  
 
 Constructed FormData object should not contain an entry for the submit button that was used to submit the form


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt (0 => 293485)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt	2022-04-27 00:19:14 UTC (rev 293485)
@@ -0,0 +1,336 @@
+
+PASS accent-color
+PASS align-content
+PASS align-items
+PASS align-self
+PASS alignment-baseline
+PASS alt
+PASS animation-composition
+PASS animation-delay
+PASS animation-direction
+PASS animation-duration
+PASS animation-fill-mode
+PASS animation-iteration-count
+PASS animation-name
+PASS animation-play-state
+PASS animation-timing-function
+PASS appearance
+PASS aspect-ratio
+PASS backface-visibility
+PASS background-attachment
+PASS background-blend-mode
+PASS background-clip
+PASS background-color
+PASS background-image
+PASS background-origin
+PASS background-position-x
+PASS background-position-y
+PASS background-repeat
+PASS background-size
+PASS baseline-shift
+PASS block-s

[webkit-changes] [293100] trunk/Source/WebCore

2022-04-20 Thread obrufau
Title: [293100] trunk/Source/WebCore








Revision 293100
Author obru...@igalia.com
Date 2022-04-20 09:35:01 -0700 (Wed, 20 Apr 2022)


Log Message
[css-cascade] Optimize code for deferred properties
https://bugs.webkit.org/show_bug.cgi?id=238260

Reviewed by Darin Adler.

CSS declarations for deferred properties were just appended to a vector,
which could grow huge. Then StyleBuilder would apply them one by one,
doing useless work if a property appeared multiple times.

The point of deferred properties is that they should be applied in
relative order. But if a property appears multiple times, we should only
care about the last occurrence.

So this patch removes the vector and instead stores the Property in the
same array as non-deferred properties. To track the indices, it uses an
array instead of a HashMap.

When applying the properties, the property IDs are placed in a vector,
which is then sorted according to the corresponding indices. This can
have some overhead, but the size of the vector will be limited by the
number of deferred properties. Currently there are only 8 of these (in
bug 236199 I plan to add 96 more, but 104 is still not that big).

No new tests since there should be no change in behavior.

* style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::buildCascade):
Call sortDeferredPropertyIDs().

(WebCore::Style::initializeCSSValue):
Move a low-level idiom into its own function.

(WebCore::Style::PropertyCascade::set):
Use the new initializeCSSValue().

(WebCore::Style::PropertyCascade::setDeferred):
Use the new data structures for deferred properties.

(WebCore::Style::PropertyCascade::sortDeferredPropertyIDs):
New private method to sort the deferred property IDs according to their
index.

* style/PropertyCascade.h:
(WebCore::Style::PropertyCascade::deferredPropertyIndex const):
New private method to get the index of the deferred property.

(WebCore::Style::PropertyCascade::setDeferredPropertyIndex):
New private method to set the index of a deferred property.

(WebCore::Style::PropertyCascade::hasDeferredProperty const):
Use the new data structures for deferred properties.

(WebCore::Style::PropertyCascade::deferredProperty const):
Use the new data structures for deferred properties.

(WebCore::Style::PropertyCascade::deferredPropertyIDs const):
New method to get the deferred property IDs sorted by their index.

(WebCore::Style::PropertyCascade::deferredProperties const): Deleted.

* style/StyleBuilder.cpp:
(WebCore::Style::Builder::applyDeferredProperties):
Use the new data structures for deferred properties.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/style/PropertyCascade.cpp
trunk/Source/WebCore/style/PropertyCascade.h
trunk/Source/WebCore/style/StyleBuilder.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (293099 => 293100)

--- trunk/Source/WebCore/ChangeLog	2022-04-20 16:17:41 UTC (rev 293099)
+++ trunk/Source/WebCore/ChangeLog	2022-04-20 16:35:01 UTC (rev 293100)
@@ -1,3 +1,69 @@
+2022-04-20  Oriol Brufau  
+
+[css-cascade] Optimize code for deferred properties
+https://bugs.webkit.org/show_bug.cgi?id=238260
+
+Reviewed by Darin Adler.
+
+CSS declarations for deferred properties were just appended to a vector,
+which could grow huge. Then StyleBuilder would apply them one by one,
+doing useless work if a property appeared multiple times.
+
+The point of deferred properties is that they should be applied in
+relative order. But if a property appears multiple times, we should only
+care about the last occurrence.
+
+So this patch removes the vector and instead stores the Property in the
+same array as non-deferred properties. To track the indices, it uses an
+array instead of a HashMap.
+
+When applying the properties, the property IDs are placed in a vector,
+which is then sorted according to the corresponding indices. This can
+have some overhead, but the size of the vector will be limited by the
+number of deferred properties. Currently there are only 8 of these (in
+bug 236199 I plan to add 96 more, but 104 is still not that big).
+
+No new tests since there should be no change in behavior.
+
+* style/PropertyCascade.cpp:
+(WebCore::Style::PropertyCascade::buildCascade):
+Call sortDeferredPropertyIDs().
+
+(WebCore::Style::initializeCSSValue):
+Move a low-level idiom into its own function.
+
+(WebCore::Style::PropertyCascade::set):
+Use the new initializeCSSValue().
+
+(WebCore::Style::PropertyCascade::setDeferred):
+Use the new data structures for deferred properties.
+
+(WebCore::Style::PropertyCascade::sortDeferredPropertyIDs):
+New private method to sort the deferred property IDs according to their
+index.
+
+* style/PropertyCascade.h:
+(WebCore::Style::PropertyCascade::deferredProper

[webkit-changes] [292639] trunk/Source/WebCore

2022-04-08 Thread obrufau
Title: [292639] trunk/Source/WebCore








Revision 292639
Author obru...@igalia.com
Date 2022-04-08 15:47:08 -0700 (Fri, 08 Apr 2022)


Log Message
[css-cascade] Sort deferred properties at the end of CSSPropertyID enum
https://bugs.webkit.org/show_bug.cgi?id=238345

Reviewed by Darin Adler.

Bug 238260 will optimize the logic for cascading deferred properties.
This sorts them at the end, after low priority ones, which will allow
some further optimizations.
This is in preparation of bug 238260, which plans to turn all logical
and physical properties into deferred.

No new tests since there should be no change in behavior.

* css/makeprop.pl:
(sortByDescendingPriorityAndName):
Sort deferred properties at the end of CSSPropertyID enum.
Add firstHighPriorityProperty, firstLowPriorityProperty,
lastLowPriorityProperty, firstDeferredProperty and lastDeferredProperty.

* style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::set):
(WebCore::Style::PropertyCascade::setDeferred):
(WebCore::Style::PropertyCascade::addMatch):
(WebCore::Style::shouldApplyPropertyInParseOrder): Deleted.
Delete shouldApplyPropertyInParseOrder(), since instead we can just
compare the CSSPropertyId and firstDeferredProperty with < or >=.

* style/PropertyCascade.h:
(WebCore::Style::PropertyCascade::hasNormalProperty const):
(WebCore::Style::PropertyCascade::normalProperty const):
(WebCore::Style::PropertyCascade::hasDeferredProperty const):
(WebCore::Style::PropertyCascade::hasProperty const): Deleted.
(WebCore::Style::PropertyCascade::property const): Deleted.
Rename hasProperty() and property() to hasNormalProperty() and
normalProperty(), to make it clear they are not for deferred properties.
Reduce the size of m_properties array and m_propertyIsPresent bitset,
since they don't need to include deferred properties.

* style/StyleBuilder.cpp:
(WebCore::Style::Builder::applyAllProperties):
(WebCore::Style::Builder::applyHighPriorityProperties):
(WebCore::Style::Builder::applyNonHighPriorityProperties):
(WebCore::Style::Builder::applyPropertiesImpl):
(WebCore::Style::Builder::applyProperty):
(WebCore::Style::Builder::applyLowPriorityProperties): Deleted.
Rename applyLowPriorityProperties() to applyNonHighPriorityProperties()
to make it clear that it includes custom and deferred properties.
Use the new firstHighPriorityProperty and lastLowPriorityProperty
constants for clarity and to skip deferred properties.
Rename hasProperty() and property() to hasNormalProperty() and
normalProperty(), to make it clear they are not for deferred properties.

* style/StyleBuilder.h:
Rename applyLowPriorityProperties() to applyNonHighPriorityProperties()
to make it clear that it includes custom and deferred properties.

* style/StyleResolver.cpp:
(WebCore::Style::Resolver::applyMatchedProperties):
Rename applyLowPriorityProperties() to applyNonHighPriorityProperties()
to make it clear that it includes custom and deferred properties.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/makeprop.pl
trunk/Source/WebCore/style/PropertyCascade.cpp
trunk/Source/WebCore/style/PropertyCascade.h
trunk/Source/WebCore/style/StyleBuilder.cpp
trunk/Source/WebCore/style/StyleBuilder.h
trunk/Source/WebCore/style/StyleResolver.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (292638 => 292639)

--- trunk/Source/WebCore/ChangeLog	2022-04-08 22:07:25 UTC (rev 292638)
+++ trunk/Source/WebCore/ChangeLog	2022-04-08 22:47:08 UTC (rev 292639)
@@ -1,3 +1,66 @@
+2022-04-08  Oriol Brufau  
+
+[css-cascade] Sort deferred properties at the end of CSSPropertyID enum
+https://bugs.webkit.org/show_bug.cgi?id=238345
+
+Reviewed by Darin Adler.
+
+Bug 238260 will optimize the logic for cascading deferred properties.
+This sorts them at the end, after low priority ones, which will allow
+some further optimizations.
+This is in preparation of bug 238260, which plans to turn all logical
+and physical properties into deferred.
+
+No new tests since there should be no change in behavior.
+
+* css/makeprop.pl:
+(sortByDescendingPriorityAndName):
+Sort deferred properties at the end of CSSPropertyID enum.
+Add firstHighPriorityProperty, firstLowPriorityProperty,
+lastLowPriorityProperty, firstDeferredProperty and lastDeferredProperty.
+
+* style/PropertyCascade.cpp:
+(WebCore::Style::PropertyCascade::set):
+(WebCore::Style::PropertyCascade::setDeferred):
+(WebCore::Style::PropertyCascade::addMatch):
+(WebCore::Style::shouldApplyPropertyInParseOrder): Deleted.
+Delete shouldApplyPropertyInParseOrder(), since instead we can just
+compare the CSSPropertyId and firstDeferredProperty with < or >=.
+
+* style/PropertyCascade.h:
+(WebCore::Style::PropertyCascade::hasNormalProperty const):
+(WebCore::Style::PropertyCascade::normalProperty const):
+(WebCore::Style::PropertyCa

[webkit-changes] [292636] trunk/Source/WebCore

2022-04-08 Thread obrufau
Title: [292636] trunk/Source/WebCore








Revision 292636
Author obru...@igalia.com
Date 2022-04-08 14:39:57 -0700 (Fri, 08 Apr 2022)


Log Message
[css-cascade] Merge getRelatedPropertyId() and shouldApplyPropertyInParseOrder()
https://bugs.webkit.org/show_bug.cgi?id=238350

Reviewed by Darin Adler.

Both getRelatedPropertyId() and shouldApplyPropertyInParseOrder() pursue
the same thing: if there are two properties (typically a standard one
and a -webkit- prefixed one) which share the same field in RenderStyle,
then we should take specified order into account when applying them.

The problem is that the logic for getRelatedPropertyId() doesn't work
well in all cases. It was only used for -webkit-text-orientation and
text-orientation, but bug 238356 implemented the former as a shorthand.
So now there is no consumer of getRelatedPropertyId().

On the other hand, shouldApplyPropertyInParseOrder() works better, but
it will need to be automatically generated for bug 238345, and bug
238125 will need to know which property shares a computed value with a
given one.

So this patch removes the consumers of the old getRelatedPropertyId(),
and changes shouldApplyPropertyInParseOrder() to be based on it.

No new tests since there is no change in behavior.

* css/CSSProperties.json:
Mark properties for which shouldApplyPropertyInParseOrder() returned
true with the "related-property" flag.

* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
Remove old getRelatedPropertyId() logic which was unused.

* css/makeprop.pl:
Throw errors if "related-property" flag is invalid.

* css/parser/CSSParserImpl.cpp:
(WebCore::filterProperties):
Remove old getRelatedPropertyId() logic which was unused.

* style/PropertyCascade.cpp:
(WebCore::Style::shouldApplyPropertyInParseOrder):
Base shouldApplyPropertyInParseOrder() on getRelatedPropertyId().

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSProperties.json
trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp
trunk/Source/WebCore/css/makeprop.pl
trunk/Source/WebCore/css/parser/CSSParserImpl.cpp
trunk/Source/WebCore/style/PropertyCascade.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (292635 => 292636)

--- trunk/Source/WebCore/ChangeLog	2022-04-08 21:35:00 UTC (rev 292635)
+++ trunk/Source/WebCore/ChangeLog	2022-04-08 21:39:57 UTC (rev 292636)
@@ -1,3 +1,49 @@
+2022-04-08  Oriol Brufau  
+
+[css-cascade] Merge getRelatedPropertyId() and shouldApplyPropertyInParseOrder()
+https://bugs.webkit.org/show_bug.cgi?id=238350
+
+Reviewed by Darin Adler.
+
+Both getRelatedPropertyId() and shouldApplyPropertyInParseOrder() pursue
+the same thing: if there are two properties (typically a standard one
+and a -webkit- prefixed one) which share the same field in RenderStyle,
+then we should take specified order into account when applying them.
+
+The problem is that the logic for getRelatedPropertyId() doesn't work
+well in all cases. It was only used for -webkit-text-orientation and
+text-orientation, but bug 238356 implemented the former as a shorthand.
+So now there is no consumer of getRelatedPropertyId().
+
+On the other hand, shouldApplyPropertyInParseOrder() works better, but
+it will need to be automatically generated for bug 238345, and bug
+238125 will need to know which property shares a computed value with a
+given one.
+
+So this patch removes the consumers of the old getRelatedPropertyId(),
+and changes shouldApplyPropertyInParseOrder() to be based on it.
+
+No new tests since there is no change in behavior.
+
+* css/CSSProperties.json:
+Mark properties for which shouldApplyPropertyInParseOrder() returned
+true with the "related-property" flag.
+
+* css/PropertySetCSSStyleDeclaration.cpp:
+(WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
+Remove old getRelatedPropertyId() logic which was unused.
+
+* css/makeprop.pl:
+Throw errors if "related-property" flag is invalid.
+
+* css/parser/CSSParserImpl.cpp:
+(WebCore::filterProperties):
+Remove old getRelatedPropertyId() logic which was unused.
+
+* style/PropertyCascade.cpp:
+(WebCore::Style::shouldApplyPropertyInParseOrder):
+Base shouldApplyPropertyInParseOrder() on getRelatedPropertyId().
+
 2022-04-08  Antti Koivisto  
 
 [CSS Container Queries] Search query containers for ::slotted and and ::part rules in their scope


Modified: trunk/Source/WebCore/css/CSSProperties.json (292635 => 292636)

--- trunk/Source/WebCore/css/CSSProperties.json	2022-04-08 21:35:00 UTC (rev 292635)
+++ trunk/Source/WebCore/css/CSSProperties.json	2022-04-08 21:39:57 UTC (rev 292636)
@@ -142,10 +142,13 @@
 "in CSS cascading order.",
 "",
 "* related-pro

[webkit-changes] [292463] trunk

2022-04-06 Thread obrufau
Title: [292463] trunk








Revision 292463
Author obru...@igalia.com
Date 2022-04-06 07:19:18 -0700 (Wed, 06 Apr 2022)


Log Message
[css] Turn -webkit-text-orientation into a legacy shorthand
https://bugs.webkit.org/show_bug.cgi?id=238356

Reviewed by Antti Koivisto.

Source/WebCore:

`-webkit-text-orientation` and `text-orientation` were both implemented
as longhands, just with a `related-property` flag so that declaration
blocks with both of them would use the one appearing last.

However, the logic for `related-property` wasn't always working well.
In bug 238350 I plan to merge it with shouldApplyPropertyInParseOrder(),
which has the same purpose and works better. But it's not suitable for
high priority properties like `text-orientation`.

So this patch turns `-webkit-text-orientation` into a shorthand that
expands into `text-orientation`.

`-webkit-text-orientation` continues accepting the legacy value
`sideways-right`, which is now mapped into `sideways` at parse time.
Previously this happened at computed-value time, but it implied that
serializing `text-decoration` could yield an invalid value.

Tests: fast/text/text-orientation-parse-competition.html
   fast/text/text-orientation-parse-stylesheet.html

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator TextOrientation const):
Remove mapping of `sideways-right` into `sideways`, this is now
done at parse time. Also remove mapping of `vertical-right` into `mixed`
since `vertical-right` is a remnant of the past which has not been
considered valid syntax for years.

* css/CSSProperties.json:
Turn `-webkit-text-orientation` into a shorthand of `text-orientation`.
Remove their `related-property` flags and a remnant of `vertical-right`.

* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue const):
Add code for serializing the `-webkit-text-orientation` shorthand.

* css/makeprop.pl:
Avoid a compile warning in getRelatedPropertyId() when no property has
the `related-property` flag.

* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):
Remove `-webkit-text-orientation` from code which is only relevant for
longhands.

* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::consumeLegacyTextOrientation):
(WebCore::CSSPropertyParser::parseShorthand):
Add parsing logic for `-webkit-text-orientation` as a shorthand.

* css/parser/CSSPropertyParser.h:
Add parsing logic for `-webkit-text-orientation` as a shorthand.

* style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyValueWebkitTextOrientation): Deleted.
Remove `-webkit-text-orientation` from code which is only relevant for
longhands.

LayoutTests:

* fast/text/text-orientation-parse-competition-expected.txt:
* fast/text/text-orientation-parse-competition.html:
Check that if a stylesheet specifies both -webkit-text-orientation and
text-orientation for the same element, the last specified one wins.

* fast/text/text-orientation-parse-stylesheet-expected.txt:
* fast/text/text-orientation-parse-stylesheet.html:
Check that only -webkit-text-orientation accepts `sideways-right`, and
that it's mapped to `sideways` at parse time.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/text/text-orientation-parse-competition-expected.txt
trunk/LayoutTests/fast/text/text-orientation-parse-competition.html
trunk/LayoutTests/fast/text/text-orientation-parse-stylesheet-expected.txt
trunk/LayoutTests/fast/text/text-orientation-parse-stylesheet.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
trunk/Source/WebCore/css/CSSProperties.json
trunk/Source/WebCore/css/StyleProperties.cpp
trunk/Source/WebCore/css/makeprop.pl
trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
trunk/Source/WebCore/css/parser/CSSPropertyParser.h
trunk/Source/WebCore/style/StyleBuilderCustom.h




Diff

Modified: trunk/LayoutTests/ChangeLog (292462 => 292463)

--- trunk/LayoutTests/ChangeLog	2022-04-06 13:33:26 UTC (rev 292462)
+++ trunk/LayoutTests/ChangeLog	2022-04-06 14:19:18 UTC (rev 292463)
@@ -1,3 +1,20 @@
+2022-04-06  Oriol Brufau  
+
+[css] Turn -webkit-text-orientation into a legacy shorthand
+https://bugs.webkit.org/show_bug.cgi?id=238356
+
+Reviewed by Antti Koivisto.
+
+* fast/text/text-orientation-parse-competition-expected.txt:
+* fast/text/text-orientation-parse-competition.html:
+Check that if a stylesheet specifies both -webkit-text-orientation and
+text-orientation for the same element, the last specified one wins.
+
+* fast/text/text-orientation-parse-stylesheet-expected.txt:
+* fast/text/text-orientation-parse-stylesheet.html:
+Check that only -webkit-text-orientation accepts `sideways-right`, and
+that it's mapped to `sideways` at parse time.
+
 2022-04-06  Youenn Fablet  
 

[webkit-changes] [291594] trunk

2022-03-21 Thread obrufau
Title: [291594] trunk








Revision 291594
Author obru...@igalia.com
Date 2022-03-21 18:35:47 -0700 (Mon, 21 Mar 2022)


Log Message
[css-cascade] Let revert-layer roll back to preshints
https://bugs.webkit.org/show_bug.cgi?id=237532

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Add test.

* web-platform-tests/css/css-cascade/presentational-hints-rollback-expected.txt: Added.
* web-platform-tests/css/css-cascade/presentational-hints-rollback.html: Added.

Source/WebCore:

The patch makes presentational hints use a cascade layer priority of 0.
The priority of the lowest layer is then increased to 1.
This allows 'revert-layer' in author origin revert to the presentational
hints origin, which is between user origin and author origin.

Test: imported/w3c/web-platform-tests/css/css-cascade/presentational-hints-rollback.html

* style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::addElementStyleProperties):
(WebCore::Style::ElementRuleCollector::matchAllRules):
(WebCore::Style::ElementRuleCollector::addElementInlineStyleProperties):
* style/ElementRuleCollector.h:
* style/RuleSetBuilder.cpp:
(WebCore::Style::RuleSetBuilder::updateCascadeLayerPriorities):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/style/ElementRuleCollector.cpp
trunk/Source/WebCore/style/ElementRuleCollector.h
trunk/Source/WebCore/style/RuleSet.h
trunk/Source/WebCore/style/RuleSetBuilder.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/presentational-hints-rollback-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/presentational-hints-rollback.html




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (291593 => 291594)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-22 01:19:00 UTC (rev 291593)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-22 01:35:47 UTC (rev 291594)
@@ -1,3 +1,15 @@
+2022-03-21  Oriol Brufau  
+
+[css-cascade] Let revert-layer roll back to preshints
+https://bugs.webkit.org/show_bug.cgi?id=237532
+
+Reviewed by Darin Adler.
+
+Add test.
+
+* web-platform-tests/css/css-cascade/presentational-hints-rollback-expected.txt: Added.
+* web-platform-tests/css/css-cascade/presentational-hints-rollback.html: Added.
+
 2022-03-21  Chris Dumez  
 
 BroadcastChannel instances in distinct opaque origins can communicate


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/presentational-hints-rollback-expected.txt (0 => 291594)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/presentational-hints-rollback-expected.txt	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/presentational-hints-rollback-expected.txt	2022-03-22 01:35:47 UTC (rev 291594)
@@ -0,0 +1,18 @@
+
+PASS #tests > * 1
+PASS #tests > * 2
+PASS #tests > * 3
+PASS #tests > * 4
+PASS #tests > * 5
+PASS #tests > * 6
+PASS #tests > * 7
+PASS #tests > * 8
+PASS #tests > * 9
+PASS #tests > * 10
+PASS #tests > * 11
+PASS #tests > * 12
+PASS #tests > * 13
+PASS #tests > * 14
+PASS #tests > * 15
+PASS #tests > * 16
+


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/presentational-hints-rollback.html (0 => 291594)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/presentational-hints-rollback.html	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/presentational-hints-rollback.html	2022-03-22 01:35:47 UTC (rev 291594)
@@ -0,0 +1,125 @@
+
+
+CSS Cascade: rolling back the cascade with presentation hints
+
+
+
+@layer {
+  .revert-1 {
+width: revert;
+height: revert;
+  }
+  .revert-layer-1 {
+width: revert-layer;
+height: revert-layer;
+  }
+}
+
+.revert-2 {
+  width: revert;
+  height: revert;
+}
+.revert-layer-2 {
+  width: revert-layer;
+  height: revert-layer;
+}
+
+.revert-3 {
+  animation: revert-3 paused 2s -1s;
+}
+.revert-layer-3 {
+  animation: revert-layer-3 paused 2s -1s;
+}
+@keyframes revert-3 {
+  from, to {
+width: revert;
+height: revert;
+  }
+}
+@keyframes revert-layer-3 {
+  from, to {
+width: revert-layer;
+height: revert-layer;
+  }
+}
+
+
+
+
+
+  
+  
+  
+  
+  
+
+  
+  
+  
+  
+  
+
+  
+  
+  
+  
+  
+
+  
+  
+  
+  
+  
+
+
+
+addEventListener("load", function() {
+  checkLayout("#tests > *", false);
+  done();
+}, {once: true});
+


Modified: trunk/Source/WebCore/ChangeLog (291593 => 291594)

--- trunk/Source/WebCore/ChangeLog	2022-03-22 01:19:00 UTC (rev 291593)
+++ trunk/Source/WebCore/ChangeLog	2022-03-22 01:35:47 UTC (rev 291594)
@@ -1,3 +1,25 @@
+2022-03-21  Oriol Brufau  
+
+[css-cascade] Let revert-layer roll back to preshints
+https://bugs.webkit.org/show_bug.cgi?id=237532
+
+Reviewed by Darin Adler.
+
+The patch makes presentational hints use a cascade layer prior

[webkit-changes] [291568] trunk/Source/WebCore

2022-03-21 Thread obrufau
Title: [291568] trunk/Source/WebCore








Revision 291568
Author obru...@igalia.com
Date 2022-03-21 11:00:07 -0700 (Mon, 21 Mar 2022)


Log Message
[css-cascade] Don't defer applying text decoration properties
https://bugs.webkit.org/show_bug.cgi?id=238126

Reviewed by Darin Adler.

shouldApplyPropertyInParseOrder() was returning true for these:
 - webkit-text-decoration
 - text-decoration-line
 - text-decoration-style
 - text-decoration-color
 - text-decoration-skip
 - text-decoration-skip-ink
 - text-underline-position
 - text-underline-offset
 - text-decoration-thickness
 - text-decoration

This was previously needed for text-decoration-line and text-decoration,
since they were implemented as longhands that shared a computed value.
But that's no longer the case, text-decoration became a shorthand in bug
237175.

AFAIK -webkit-text-decoration has always been a shorthand since it was
implemented in bug 92000, so having it in the list it's pointless,
only longhands matter. And text-decoration-skip became a shorthand in
bug 230244, so it's also pointless.

The other longhands seem unnecessary too, since they don't share a
computed style with other properties.

No test since there should be no observable change in behavior.

* style/PropertyCascade.cpp:
(WebCore::Style::shouldApplyPropertyInParseOrder):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/style/PropertyCascade.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (291567 => 291568)

--- trunk/Source/WebCore/ChangeLog	2022-03-21 17:58:21 UTC (rev 291567)
+++ trunk/Source/WebCore/ChangeLog	2022-03-21 18:00:07 UTC (rev 291568)
@@ -1,3 +1,40 @@
+2022-03-21  Oriol Brufau  
+
+[css-cascade] Don't defer applying text decoration properties
+https://bugs.webkit.org/show_bug.cgi?id=238126
+
+Reviewed by Darin Adler.
+
+shouldApplyPropertyInParseOrder() was returning true for these:
+ - webkit-text-decoration
+ - text-decoration-line
+ - text-decoration-style
+ - text-decoration-color
+ - text-decoration-skip
+ - text-decoration-skip-ink
+ - text-underline-position
+ - text-underline-offset
+ - text-decoration-thickness
+ - text-decoration
+
+This was previously needed for text-decoration-line and text-decoration,
+since they were implemented as longhands that shared a computed value.
+But that's no longer the case, text-decoration became a shorthand in bug
+237175.
+
+AFAIK -webkit-text-decoration has always been a shorthand since it was
+implemented in bug 92000, so having it in the list it's pointless,
+only longhands matter. And text-decoration-skip became a shorthand in
+bug 230244, so it's also pointless.
+
+The other longhands seem unnecessary too, since they don't share a
+computed style with other properties.
+
+No test since there should be no observable change in behavior.
+
+* style/PropertyCascade.cpp:
+(WebCore::Style::shouldApplyPropertyInParseOrder):
+
 2022-03-21  Youenn Fablet  
 
 Remove unneeded quotes in capture attribution string


Modified: trunk/Source/WebCore/style/PropertyCascade.cpp (291567 => 291568)

--- trunk/Source/WebCore/style/PropertyCascade.cpp	2022-03-21 17:58:21 UTC (rev 291567)
+++ trunk/Source/WebCore/style/PropertyCascade.cpp	2022-03-21 18:00:07 UTC (rev 291568)
@@ -56,16 +56,6 @@
 case CSSPropertyBorderImageWidth:
 case CSSPropertyWebkitBoxShadow:
 case CSSPropertyBoxShadow:
-case CSSPropertyWebkitTextDecoration:
-case CSSPropertyTextDecorationLine:
-case CSSPropertyTextDecorationStyle:
-case CSSPropertyTextDecorationColor:
-case CSSPropertyTextDecorationSkip:
-case CSSPropertyTextDecorationSkipInk:
-case CSSPropertyTextUnderlinePosition:
-case CSSPropertyTextUnderlineOffset:
-case CSSPropertyTextDecorationThickness:
-case CSSPropertyTextDecoration:
 return true;
 default:
 return CSSProperty::isInLogicalPropertyGroup(propertyID);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [291546] trunk

2022-03-20 Thread obrufau
Title: [291546] trunk








Revision 291546
Author obru...@igalia.com
Date 2022-03-20 09:37:43 -0700 (Sun, 20 Mar 2022)


Log Message
Fix CSS cascade regarding logical properties
https://bugs.webkit.org/show_bug.cgi?id=236199

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Expect animation-004.html to pass.
Add new test logicalprops-with-deferred-writing-mode.html

* web-platform-tests/css/css-logical/animation-004-expected.txt:
* web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode-expected.txt: Added.
* web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode.html: Added.

Source/WebCore:

The CSS cascade was trying to resolve logical properties into physical
ones too early. This failed if we still didn't know the direction or
writing-mode, e.g. because they were set to a variable or to a CSS-wide
keyword.

This patch keeps logical properties as-is during the cascade. They are
only resolved when finally applied. Also, both logical properties and
their physical equivalents are now set to apply in parse order, since
'height: 0px; block-size: 1px' and 'block-size: 1px; height: 0px' can be
different, the order matters.

Tests: imported/w3c/web-platform-tests/css/css-logical/animation-004.html
   imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* css/CSSProperties.json:
* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseValueWithVariableReferences):
* style/PropertyCascade.cpp:
(WebCore::Style::shouldApplyPropertyInParseOrder):
(WebCore::Style::PropertyCascade::PropertyCascade):
(WebCore::Style::PropertyCascade::set):
(WebCore::Style::PropertyCascade::setDeferred):
(WebCore::Style::PropertyCascade::resolveDirectionAndWritingMode const): Deleted.
(WebCore::Style::PropertyCascade::direction const): Deleted.
* style/PropertyCascade.h:
(WebCore::Style::PropertyCascade::areDeferredInOrder const):
* style/StyleBuilder.cpp:
(WebCore::Style::Builder::Builder):
(WebCore::Style::Builder::applyProperty):
(WebCore::Style::directionFromStyle): Deleted.

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-004-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
trunk/Source/WebCore/css/CSSProperties.json
trunk/Source/WebCore/css/parser/CSSParser.cpp
trunk/Source/WebCore/style/PropertyCascade.cpp
trunk/Source/WebCore/style/PropertyCascade.h
trunk/Source/WebCore/style/StyleBuilder.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode.html




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (291545 => 291546)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-20 15:04:42 UTC (rev 291545)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-20 16:37:43 UTC (rev 291546)
@@ -1,3 +1,17 @@
+2022-03-20  Oriol Brufau  
+
+Fix CSS cascade regarding logical properties
+https://bugs.webkit.org/show_bug.cgi?id=236199
+
+Reviewed by Darin Adler.
+
+Expect animation-004.html to pass.
+Add new test logicalprops-with-deferred-writing-mode.html
+
+* web-platform-tests/css/css-logical/animation-004-expected.txt:
+* web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode-expected.txt: Added.
+* web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode.html: Added.
+
 2022-03-19  Oriol Brufau  
 
 [cssom] Implement border-image serialization


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-004-expected.txt (291545 => 291546)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-004-expected.txt	2022-03-20 15:04:42 UTC (rev 291545)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-004-expected.txt	2022-03-20 16:37:43 UTC (rev 291546)
@@ -11,7 +11,7 @@
 PASS Filling transitions update when the writing-mode is changed
 PASS The number of interpolating properties can be increased when the writing-mode is changed
 PASS The number of interpolating properties can be decreased when the writing-mode is changed
-FAIL Transitions update when the writing-mode is changed through a CSS variable assert_equals: expected "50px" but got "0px"
+PASS Transitions update when the writing-mode is changed through a CSS variable
 PASS Transitions update when the direction is changed
 PASS Transitions from logical to physical update when the direction is changed
 PASS Transitions from physical to logical update when the direction is changed


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-m

[webkit-changes] [291537] trunk

2022-03-19 Thread obrufau
Title: [291537] trunk








Revision 291537
Author obru...@igalia.com
Date 2022-03-19 20:18:09 -0700 (Sat, 19 Mar 2022)


Log Message
[cssom] Implement border-image serialization
https://bugs.webkit.org/show_bug.cgi?id=238102

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Let the test accept some equivalent serializations.
Expect it to pass.

* web-platform-tests/css/css-backgrounds/parsing/border-image-valid-expected.txt:
* web-platform-tests/css/css-backgrounds/parsing/border-image-valid.html:

Source/WebCore:

Add logic for serializing border-image at specified-value time.

Tests: fast/css/parse-border-image-repeat-null-crash.html
   imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-image-valid.html

* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue const):
(WebCore::StyleProperties::borderImagePropertyValue const):
(WebCore::StyleProperties::asText const):
* css/StyleProperties.h:

LayoutTests:

Expect cssText to serialize border-image instead of longhands.

* fast/css/parse-border-image-repeat-null-crash-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/css/parse-border-image-repeat-null-crash-expected.txt
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-image-valid-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-image-valid.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/StyleProperties.cpp
trunk/Source/WebCore/css/StyleProperties.h




Diff

Modified: trunk/LayoutTests/ChangeLog (291536 => 291537)

--- trunk/LayoutTests/ChangeLog	2022-03-20 02:18:04 UTC (rev 291536)
+++ trunk/LayoutTests/ChangeLog	2022-03-20 03:18:09 UTC (rev 291537)
@@ -1,5 +1,16 @@
 2022-03-19  Oriol Brufau  
 
+[cssom] Implement border-image serialization
+https://bugs.webkit.org/show_bug.cgi?id=238102
+
+Reviewed by Darin Adler.
+
+Expect cssText to serialize border-image instead of longhands.
+
+* fast/css/parse-border-image-repeat-null-crash-expected.txt:
+
+2022-03-19  Oriol Brufau  
+
 Fix hasExplicitlySetBorderRadius flag
 https://bugs.webkit.org/show_bug.cgi?id=238062
 


Modified: trunk/LayoutTests/fast/css/parse-border-image-repeat-null-crash-expected.txt (291536 => 291537)

--- trunk/LayoutTests/fast/css/parse-border-image-repeat-null-crash-expected.txt	2022-03-20 02:18:04 UTC (rev 291536)
+++ trunk/LayoutTests/fast/css/parse-border-image-repeat-null-crash-expected.txt	2022-03-20 03:18:09 UTC (rev 291537)
@@ -1,2 +1,2 @@
-CONSOLE MESSAGE: border-image-source: url("images/shadow-border.png"); border-image-slice: 10; border-image-repeat: stretch;
+CONSOLE MESSAGE: border-image: url("images/shadow-border.png") 10 stretch;
 This test should not crash


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (291536 => 291537)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-20 02:18:04 UTC (rev 291536)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-20 03:18:09 UTC (rev 291537)
@@ -1,3 +1,16 @@
+2022-03-19  Oriol Brufau  
+
+[cssom] Implement border-image serialization
+https://bugs.webkit.org/show_bug.cgi?id=238102
+
+Reviewed by Darin Adler.
+
+Let the test accept some equivalent serializations.
+Expect it to pass.
+
+* web-platform-tests/css/css-backgrounds/parsing/border-image-valid-expected.txt:
+* web-platform-tests/css/css-backgrounds/parsing/border-image-valid.html:
+
 2022-03-19  Antoine Quint  
 
 Dialog element only animates once


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-image-valid-expected.txt (291536 => 291537)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-image-valid-expected.txt	2022-03-20 02:18:04 UTC (rev 291536)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-image-valid-expected.txt	2022-03-20 03:18:09 UTC (rev 291537)
@@ -1,32 +1,32 @@
 
-FAIL e.style['border-image'] = "none" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['border-image'] = "stretch" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['border-image'] = "none 100% / 1 / 0 stretch" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['border-image'] = "url(\"http://www.example.com/\") 1 2 3 4 fill" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['border-image'] = "url(\"http://www.example.com/\") 1 2 3 4 fill / 1 / 0 stretch" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['border-image'] = "url(\"http://www.example.com/\")" should set the property value assert_not

[webkit-changes] [291536] trunk

2022-03-19 Thread obrufau
Title: [291536] trunk








Revision 291536
Author obru...@igalia.com
Date 2022-03-19 19:18:04 -0700 (Sat, 19 Mar 2022)


Log Message
Fix hasExplicitlySetBorderRadius flag
https://bugs.webkit.org/show_bug.cgi?id=238062

Reviewed by Darin Adler.

Source/WebCore:

The four border-*-radius longhands were sharing the same flag, so the
behavior was broken when setting longhands individually.

This patch splits the flag into 4 different ones, one for each longhand.
Also makes sure to set it properly when a longhand is set to 'initial'.

It's ugly to have all this boilerplate code for the flags, but
https://webkit.org/b/212506 will make it automatically generated.

Test: fast/css/appearance-apple-pay-button-border-radius-longhands.html

* css/CSSProperties.json:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::RenderStyle):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::hasExplicitlySetBorderBottomLeftRadius const):
(WebCore::RenderStyle::hasExplicitlySetBorderBottomRightRadius const):
(WebCore::RenderStyle::hasExplicitlySetBorderTopLeftRadius const):
(WebCore::RenderStyle::hasExplicitlySetBorderTopRightRadius const):
(WebCore::RenderStyle::hasExplicitlySetBorderRadius const):
(WebCore::RenderStyle::setHasExplicitlySetBorderBottomLeftRadius):
(WebCore::RenderStyle::setHasExplicitlySetBorderBottomRightRadius):
(WebCore::RenderStyle::setHasExplicitlySetBorderTopLeftRadius):
(WebCore::RenderStyle::setHasExplicitlySetBorderTopRightRadius):
(WebCore::RenderStyle::NonInheritedFlags::operator== const):
(WebCore::RenderStyle::NonInheritedFlags::copyNonInheritedFrom):
(WebCore::RenderStyle::setHasExplicitlySetBorderRadius): Deleted.
* style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyInitialBorderBottomLeftRadius):
(WebCore::Style::BuilderCustom::applyInheritBorderBottomLeftRadius):
(WebCore::Style::BuilderCustom::applyValueBorderBottomLeftRadius):
(WebCore::Style::BuilderCustom::applyInitialBorderBottomRightRadius):
(WebCore::Style::BuilderCustom::applyInheritBorderBottomRightRadius):
(WebCore::Style::BuilderCustom::applyValueBorderBottomRightRadius):
(WebCore::Style::BuilderCustom::applyInitialBorderTopLeftRadius):
(WebCore::Style::BuilderCustom::applyInheritBorderTopLeftRadius):
(WebCore::Style::BuilderCustom::applyValueBorderTopLeftRadius):
(WebCore::Style::BuilderCustom::applyInitialBorderTopRightRadius):
(WebCore::Style::BuilderCustom::applyInheritBorderTopRightRadius):
(WebCore::Style::BuilderCustom::applyValueBorderTopRightRadius):

LayoutTests:

Add test, skip it except in iOS and Mac.

* TestExpectations:
* fast/css/appearance-apple-pay-button-border-radius-longhands-expected.html: Added.
* fast/css/appearance-apple-pay-button-border-radius-longhands.html: Added.
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/platform/ios/TestExpectations
trunk/LayoutTests/platform/mac/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSProperties.json
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
trunk/Source/WebCore/rendering/style/RenderStyle.h
trunk/Source/WebCore/style/StyleBuilderCustom.h


Added Paths

trunk/LayoutTests/fast/css/appearance-apple-pay-button-border-radius-longhands-expected.html
trunk/LayoutTests/fast/css/appearance-apple-pay-button-border-radius-longhands.html




Diff

Modified: trunk/LayoutTests/ChangeLog (291535 => 291536)

--- trunk/LayoutTests/ChangeLog	2022-03-20 00:45:31 UTC (rev 291535)
+++ trunk/LayoutTests/ChangeLog	2022-03-20 02:18:04 UTC (rev 291536)
@@ -1,3 +1,18 @@
+2022-03-19  Oriol Brufau  
+
+Fix hasExplicitlySetBorderRadius flag
+https://bugs.webkit.org/show_bug.cgi?id=238062
+
+Reviewed by Darin Adler.
+
+Add test, skip it except in iOS and Mac.
+
+* TestExpectations:
+* fast/css/appearance-apple-pay-button-border-radius-longhands-expected.html: Added.
+* fast/css/appearance-apple-pay-button-border-radius-longhands.html: Added.
+* platform/ios/TestExpectations:
+* platform/mac/TestExpectations:
+
 2022-03-19  Myles C. Maxfield  
 
 Make fast/text/emoji-num-glyphs.html more robust


Modified: trunk/LayoutTests/TestExpectations (291535 => 291536)

--- trunk/LayoutTests/TestExpectations	2022-03-20 00:45:31 UTC (rev 291535)
+++ trunk/LayoutTests/TestExpectations	2022-03-20 02:18:04 UTC (rev 291536)
@@ -278,6 +278,7 @@
 # ApplePay is only available on iOS (greater than iOS 10) and macOS (greater than macOS 10.12) and only for WebKit2.
 fast/css/appearance-apple-pay-button.html [ Skip ]
 fast/css/appearance-apple-pay-button-border-radius.html [ Skip ]
+fast/css/appearance-apple-pay-button-border-radius-longhands.html [ Skip ]
 fast/css/appearance-apple-pay-button-default-corners.html [ Skip ]
 fast/css/getComputedStyle/computed-style-apple-pay-button.html [ Skip ]
 fast/css/webkit-named-image/apple-pay-logo-black [ Skip ]


Added: trun

[webkit-changes] [291407] trunk

2022-03-17 Thread obrufau
Title: [291407] trunk








Revision 291407
Author obru...@igalia.com
Date 2022-03-17 08:13:14 -0700 (Thu, 17 Mar 2022)


Log Message
Clarify code for logical-to-physical mappings, and add physical-to-logical mappings
https://bugs.webkit.org/show_bug.cgi?id=237967

Reviewed by Darin Adler.

Source/WebCore:

The code for logical-to-physical mappings wasn't easy to understand, e.g.
mapLogicalSideToPhysicalSide used to cast a LogicalBoxSide enum into a
BoxSide enum, and then maybe casting it into an int and back to BoxSide.
So the code relied on the arbitrary order of the enum values, and it was
hard to grasp what was going on.

This patch makes these mappings much clearer, and also adds the inverse
physical-to-logical mappings. Being able to convert a physical property
into its logical equivalent will be needed for bug 236199.

No new tests because there is no change in behavior.

Tests in imported/w3c/web-platform-tests/css/css-logical/ ensure that
this patch doesn't break logical-to-physical mappings.
Some new API tests ensure that the physical-to-logical mappings
are the correct inverse.

Tests: WritingMode.LogicalBoxSide
   WritingMode.BoxSide
   WritingMode.LogicalBoxCorner
   WritingMode.BoxCorner
   WritingMode.LogicalBoxAxis
   WritingMode.BoxAxis

* css/CSSProperty.h:
* css/makeprop.pl:
* platform/text/WritingMode.h:
(WebCore::mapLogicalSideToPhysicalSide):
(WebCore::mapPhysicalSideToLogicalSide):
(WebCore::mapLogicalCornerToPhysicalCorner):
(WebCore::mapPhysicalCornerToLogicalCorner):
(WebCore::mapLogicalAxisToPhysicalAxis):
(WebCore::mapPhysicalAxisToLogicalAxis):
(WebCore::isHorizontalPhysicalSide): Deleted.
(WebCore::mirrorPhysicalSide): Deleted.
(WebCore::rotatePhysicalSide): Deleted.

Tools:

Add tests.

* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/WritingModeTests.cpp: Added.
(TestWebKitAPI::TEST):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSProperty.h
trunk/Source/WebCore/css/makeprop.pl
trunk/Source/WebCore/platform/text/WritingMode.h
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/CMakeLists.txt
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Tools/TestWebKitAPI/Tests/WebCore/WritingModeTests.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (291406 => 291407)

--- trunk/Source/WebCore/ChangeLog	2022-03-17 14:46:39 UTC (rev 291406)
+++ trunk/Source/WebCore/ChangeLog	2022-03-17 15:13:14 UTC (rev 291407)
@@ -1,3 +1,47 @@
+2022-03-17  Oriol Brufau  
+
+Clarify code for logical-to-physical mappings, and add physical-to-logical mappings
+https://bugs.webkit.org/show_bug.cgi?id=237967
+
+Reviewed by Darin Adler.
+
+The code for logical-to-physical mappings wasn't easy to understand, e.g.
+mapLogicalSideToPhysicalSide used to cast a LogicalBoxSide enum into a
+BoxSide enum, and then maybe casting it into an int and back to BoxSide.
+So the code relied on the arbitrary order of the enum values, and it was
+hard to grasp what was going on.
+
+This patch makes these mappings much clearer, and also adds the inverse
+physical-to-logical mappings. Being able to convert a physical property
+into its logical equivalent will be needed for bug 236199.
+
+No new tests because there is no change in behavior.
+
+Tests in imported/w3c/web-platform-tests/css/css-logical/ ensure that
+this patch doesn't break logical-to-physical mappings.
+Some new API tests ensure that the physical-to-logical mappings
+are the correct inverse.
+
+Tests: WritingMode.LogicalBoxSide
+   WritingMode.BoxSide
+   WritingMode.LogicalBoxCorner
+   WritingMode.BoxCorner
+   WritingMode.LogicalBoxAxis
+   WritingMode.BoxAxis
+
+* css/CSSProperty.h:
+* css/makeprop.pl:
+* platform/text/WritingMode.h:
+(WebCore::mapLogicalSideToPhysicalSide):
+(WebCore::mapPhysicalSideToLogicalSide):
+(WebCore::mapLogicalCornerToPhysicalCorner):
+(WebCore::mapPhysicalCornerToLogicalCorner):
+(WebCore::mapLogicalAxisToPhysicalAxis):
+(WebCore::mapPhysicalAxisToLogicalAxis):
+(WebCore::isHorizontalPhysicalSide): Deleted.
+(WebCore::mirrorPhysicalSide): Deleted.
+(WebCore::rotatePhysicalSide): Deleted.
+
 2022-03-17  Nikolas Zimmermann  
 
 Build broken on macOS Monterey 12.3 - PassKitSPI related error


Modified: trunk/Source/WebCore/css/CSSProperty.h (291406 => 291407)

--- trunk/Source/WebCore/css/CSSProperty.h	2022-03-17 14:46:39 UTC (rev 291406)
+++ trunk/Source/WebCore/css/CSSProperty.h	2022-03-17 15:13:14 UTC (rev 291407)
@@ -77,6 +77,7 @@
 void wrapValueInCommaSeparatedList();
 
 static CSSPropertyID resolveDirectionAwareProperty(CSSPropertyID, TextDirection, WritingMode);
+st

[webkit-changes] [291260] trunk

2022-03-14 Thread obrufau
Title: [291260] trunk








Revision 291260
Author obru...@igalia.com
Date 2022-03-14 18:48:15 -0700 (Mon, 14 Mar 2022)


Log Message
[css-cascade] Fix 'revert' on low-priority properties
https://bugs.webkit.org/show_bug.cgi?id=236272

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Add one test and expect an existing one to pass.

* web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt:
* web-platform-tests/css/css-cascade/all-prop-revert-noop-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt.
* web-platform-tests/css/css-cascade/all-prop-revert-noop.html: Added.

Source/WebCore:

Some CSS properties are low-priority (a.k.a deferred or applied in parse
order). The logic for the 'revert' keyword was not taking these into
account, so it just behaved as 'unset'.
That made elements like , ,  and  lose the line-through
or underline thet they get in UA origin, when styled with 'all: revert'
or 'text-decoration: revert'.

This patch takes these properties into account so that 'revert' works.

Tests: imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop.html
   imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-noop.html

* style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::setDeferred):
* style/PropertyCascade.h:
(WebCore::Style::PropertyCascade::hasDeferredProperty const):
(WebCore::Style::PropertyCascade::deferredProperty const):
* style/StyleBuilder.cpp:
(WebCore::Style::Builder::applyProperty):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/style/PropertyCascade.cpp
trunk/Source/WebCore/style/PropertyCascade.h
trunk/Source/WebCore/style/StyleBuilder.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-noop-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-noop.html




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (291259 => 291260)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-15 01:40:14 UTC (rev 291259)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-15 01:48:15 UTC (rev 291260)
@@ -1,3 +1,16 @@
+2022-03-14  Oriol Brufau  
+
+[css-cascade] Fix 'revert' on low-priority properties
+https://bugs.webkit.org/show_bug.cgi?id=236272
+
+Reviewed by Darin Adler.
+
+Add one test and expect an existing one to pass.
+
+* web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt:
+* web-platform-tests/css/css-cascade/all-prop-revert-noop-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt.
+* web-platform-tests/css/css-cascade/all-prop-revert-noop.html: Added.
+
 2022-03-14  Antoine Quint  
 
 [web-animations] marker-start should support discrete animation


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt (291259 => 291260)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt	2022-03-15 01:40:14 UTC (rev 291259)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt	2022-03-15 01:48:15 UTC (rev 291260)
@@ -23,7 +23,7 @@
 PASS data
 PASS datalist
 PASS dd
-FAIL del assert_equals: text-decoration expected "line-through" but got "none"
+PASS del
 PASS details
 PASS dfn
 PASS dialog
@@ -51,7 +51,7 @@
 PASS iframe
 PASS img
 PASS input
-FAIL ins assert_equals: text-decoration expected "underline" but got "none"
+PASS ins
 PASS kbd
 PASS label
 PASS legend
@@ -79,7 +79,7 @@
 PASS rp
 PASS rt
 PASS ruby
-FAIL s assert_equals: text-decoration expected "line-through" but got "none"
+PASS s
 PASS samp
 PASS script
 PASS section
@@ -106,7 +106,7 @@
 PASS title
 PASS tr
 PASS track
-FAIL u assert_equals: text-decoration expected "underline" but got "none"
+PASS u
 PASS ul
 PASS var
 PASS video


Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-noop-expected.txt (from rev 291259, trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt) (0 => 291260)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-noop-expected.txt	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-noop-expected.txt	2022-03-15 01:48:15 UTC (rev 291260)
@@ -0,0 +1,125 @@
+
+PASS a
+PASS abbr
+PASS address
+PASS area
+PASS article
+PASS aside
+PASS audio
+PASS b
+PASS base
+PASS bdi
+PASS bdo
+PASS blockquote
+PASS body
+PASS br
+PASS button
+PASS canvas
+PASS caption
+PASS cite
+PASS code
+PASS col
+PASS colgroup

[webkit-changes] [291257] trunk/Source/WebCore

2022-03-14 Thread obrufau
Title: [291257] trunk/Source/WebCore








Revision 291257
Author obru...@igalia.com
Date 2022-03-14 17:42:00 -0700 (Mon, 14 Mar 2022)


Log Message
Rename RenderStyle::textDecoration() to RenderStyle::textDecorationLine()
https://bugs.webkit.org/show_bug.cgi?id=237400

Reviewed by Darin Adler.

Before https://webkit.org/b/237175, the text-decoration-line and
text-decoration properties were 2 longhands that shared a computed
value, accessed via RenderStyle::textDecoration().

But now text-decoration is a proper shorthand of text-decoration-line.
So it doesn't make much sense to continue accessing the line via
textDecoration(), it should be textDecorationLine() instead.

Same for RenderStyle::setTextDecoration(), etc.

No tests since it's just a rename, no change in behavior.

* accessibility/atspi/AccessibilityObjectTextAtspi.cpp:
(WebCore::AccessibilityObjectAtspi::textAttributes const):
* animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* css/CSSProperties.json:
* rendering/TextDecorationPainter.cpp:
(WebCore::collectStylesForRenderer):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::RenderStyle):
(WebCore::RenderStyle::changeAffectsVisualOverflow const):
(WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline const):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::textDecorationsInEffect const):
(WebCore::RenderStyle::textDecorationLine const):
(WebCore::RenderStyle::addToTextDecorationsInEffect):
(WebCore::RenderStyle::setTextDecorationsInEffect):
(WebCore::RenderStyle::setTextDecorationLine):
(WebCore::RenderStyle::initialTextDecorationLine):
(WebCore::RenderStyle::InheritedFlags::operator== const):
(WebCore::RenderStyle::textDecoration const): Deleted.
(WebCore::RenderStyle::setTextDecoration): Deleted.
(WebCore::RenderStyle::initialTextDecoration): Deleted.
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleVisualData.cpp:
(WebCore::StyleVisualData::StyleVisualData):
* rendering/style/StyleVisualData.h:
(WebCore::StyleVisualData::operator== const):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::findRendererDefininingTextDecoration):
* style/InlineTextBoxStyle.cpp:
(WebCore::minLogicalTopForTextDecorationLine):
(WebCore::maxLogicalBottomForTextDecorationLine):
(WebCore::enclosingRendererWithTextDecoration):
* style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjust const):
* style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertTextDecorationLine):
(WebCore::Style::BuilderConverter::convertTextDecoration): Deleted.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectTextAtspi.cpp
trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
trunk/Source/WebCore/css/CSSProperties.json
trunk/Source/WebCore/rendering/TextDecorationPainter.cpp
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
trunk/Source/WebCore/rendering/style/RenderStyle.h
trunk/Source/WebCore/rendering/style/RenderStyleConstants.h
trunk/Source/WebCore/rendering/style/StyleVisualData.cpp
trunk/Source/WebCore/rendering/style/StyleVisualData.h
trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
trunk/Source/WebCore/style/InlineTextBoxStyle.cpp
trunk/Source/WebCore/style/StyleAdjuster.cpp
trunk/Source/WebCore/style/StyleBuilderConverter.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (291256 => 291257)

--- trunk/Source/WebCore/ChangeLog	2022-03-15 00:17:53 UTC (rev 291256)
+++ trunk/Source/WebCore/ChangeLog	2022-03-15 00:42:00 UTC (rev 291257)
@@ -1,3 +1,63 @@
+2022-03-14  Oriol Brufau  
+
+Rename RenderStyle::textDecoration() to RenderStyle::textDecorationLine()
+https://bugs.webkit.org/show_bug.cgi?id=237400
+
+Reviewed by Darin Adler.
+
+Before https://webkit.org/b/237175, the text-decoration-line and
+text-decoration properties were 2 longhands that shared a computed
+value, accessed via RenderStyle::textDecoration().
+
+But now text-decoration is a proper shorthand of text-decoration-line.
+So it doesn't make much sense to continue accessing the line via
+textDecoration(), it should be textDecorationLine() instead.
+
+Same for RenderStyle::setTextDecoration(), etc.
+
+No tests since it's just a rename, no change in behavior.
+
+* accessibility/atspi/AccessibilityObjectTextAtspi.cpp:
+(WebCore::AccessibilityObjectAtspi::textAttributes const):
+* animation/CSSPropertyAnimation.cpp:
+(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
+* css/CSSComputedStyleDeclaration.cpp:
+(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
+* css/CSSProperties.json:
+* rendering/TextDecorationPainter.cpp:
+(WebCore::col

[webkit-changes] [291244] trunk

2022-03-14 Thread obrufau
Title: [291244] trunk








Revision 291244
Author obru...@igalia.com
Date 2022-03-14 12:18:11 -0700 (Mon, 14 Mar 2022)


Log Message
[css] Implement 'text-decoration' as a shorthand.
https://bugs.webkit.org/show_bug.cgi?id=237175

Reviewed by Darin Adler.

Source/WebCore:

The 'text-decoration' property was considered to be a longhand, sharing
a computed value with 'text-decoration-line'.

This patch switches 'text-decoration' to be shorthand instead.
According to the CSS Text Decoration spec, the longhands should be
'text-decoration-line', 'text-decoration-thickness',
'text-decoration-style' and 'text-decoration-color'.
I tried that in https://commits.webkit.org/r290756, but it got reverted
because of a performance regression. So as a first step, here I'm making
'text-decoration-line' be the only longhand.

There is a bunch of editing code that was getting/setting/removing
'text-decoration' as a longhand, so I'm switching that to instead
use 'text-decoration-line'.

Tests: fast/css/getComputedStyle/computed-style.html
   fast/css/getComputedStyle/computed-style-without-renderer.html
   fast/css/getComputedStyle/getComputedStyle-text-decoration.html
   fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand.html
   imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml.html
   imported/w3c/web-platform-tests/css/css-variables/variable-presentation-attribute.html
   imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree.html
   svg/css/getComputedStyle-basic.xhtml

* css/CSSProperties.json:
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue const):
(WebCore::StyleProperties::asText const):
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseShorthand):
* editing/EditingStyle.cpp:
(WebCore::HTMLTextDecorationEquivalent::HTMLTextDecorationEquivalent):
(WebCore::EditingStyle::init):
(WebCore::EditingStyle::styleWithResolvedTextDecorations const):
(WebCore::EditingStyle::collapseTextDecorationProperties):
(WebCore::textDecorationValueList):
(WebCore::EditingStyle::conflictsWithInlineStyleOfElement const):
(WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode const):
(WebCore::EditingStyle::mergeStyle):
(WebCore::reconcileTextDecorationProperties):
(WebCore::StyleChange::StyleChange):
(WebCore::StyleChange::extractTextStyles):
(WebCore::extractPropertiesNotIn):
* editing/cocoa/HTMLConverter.mm:
(HTMLConverterCaches::propertyValueForNode):
(HTMLConverter::computedAttributesForElement):
* editing/ios/EditorIOS.mm:
(WebCore::Editor::removeUnchangeableStyles):
* editing/markup.cpp:
(WebCore::serializePreservingVisualAppearanceInternal):
* style/PropertyAllowlist.cpp:
(WebCore::Style::isValidCueStyleProperty):

LayoutTests:

Update tests to take into account that 'text-decoration' is a shorthand.

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/getComputedStyle/getComputedStyle-text-decoration-expected.txt:
* fast/css/getComputedStyle/getComputedStyle-text-decoration.html:
* fast/css/getComputedStyle/resources/property-names.js:
* fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand-expected.txt:
* fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand.html:
* svg/css/getComputedStyle-basic-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-text-decoration-expected.txt
trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-text-decoration.html
trunk/LayoutTests/fast/css/getComputedStyle/resources/property-names.js
trunk/LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand-expected.txt
trunk/LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand.html
trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSProperties.json
trunk/Source/WebCore/css/StyleProperties.cpp
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
trunk/Source/WebCore/editing/EditingStyle.cpp
trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm
trunk/Source/WebCore/editing/ios/EditorIOS.mm
trunk/Source/WebCore/editing/markup.cpp
trunk/Source/WebCore/style/PropertyAllowlist.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (291243 => 291244)

--- trunk/LayoutTests/ChangeLog	2022-03-14 19:11:33 UTC (rev 291243)
+++ trunk/LayoutTests/ChangeLog	2022-03-14 19:18:11 UTC (rev 291244)
@@ -1,3 +1,21 @@
+2022-03-14  Oriol Brufau  
+
+[css] Implement 'text-decoration' as a shorth

[webkit-changes] [290902] trunk/LayoutTests

2022-03-07 Thread obrufau
Title: [290902] trunk/LayoutTests








Revision 290902
Author obru...@igalia.com
Date 2022-03-07 12:53:07 -0800 (Mon, 07 Mar 2022)


Log Message
Remove duplicated platform expectations for computed-style.html, computed-style-without-renderer.html, getComputedStyle-basic.xhtml
https://bugs.webkit.org/show_bug.cgi?id=237534

Unreviewed test gardening.


* platform/glib/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
* platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
* platform/glib/svg/css/getComputedStyle-basic-expected.txt: Removed.
* platform/ios/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
* platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
* platform/ios/svg/css/getComputedStyle-basic-expected.txt: Removed.

Modified Paths

trunk/LayoutTests/ChangeLog


Removed Paths

trunk/LayoutTests/platform/glib/fast/css/getComputedStyle/
trunk/LayoutTests/platform/glib/svg/css/getComputedStyle-basic-expected.txt
trunk/LayoutTests/platform/ios/fast/css/getComputedStyle/
trunk/LayoutTests/platform/ios/svg/css/getComputedStyle-basic-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (290901 => 290902)

--- trunk/LayoutTests/ChangeLog	2022-03-07 20:29:13 UTC (rev 290901)
+++ trunk/LayoutTests/ChangeLog	2022-03-07 20:53:07 UTC (rev 290902)
@@ -1,3 +1,17 @@
+2022-03-07  Oriol Brufau  
+
+Remove duplicated platform expectations for computed-style.html, computed-style-without-renderer.html, getComputedStyle-basic.xhtml
+https://bugs.webkit.org/show_bug.cgi?id=237534
+
+Unreviewed test gardening.
+
+* platform/glib/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
+* platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
+* platform/glib/svg/css/getComputedStyle-basic-expected.txt: Removed.
+* platform/ios/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
+* platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
+* platform/ios/svg/css/getComputedStyle-basic-expected.txt: Removed.
+
 2022-03-07  Kimmo Kinnunen  
 
 LayoutTests/webgl/max-active-contexts-gc.html is flaky


Deleted: trunk/LayoutTests/platform/glib/svg/css/getComputedStyle-basic-expected.txt (290901 => 290902)

--- trunk/LayoutTests/platform/glib/svg/css/getComputedStyle-basic-expected.txt	2022-03-07 20:29:13 UTC (rev 290901)
+++ trunk/LayoutTests/platform/glib/svg/css/getComputedStyle-basic-expected.txt	2022-03-07 20:53:07 UTC (rev 290902)
@@ -1,1021 +0,0 @@
-rect: style.getPropertyValue(align-content) : normal
-rect: style.getPropertyCSSValue(align-content) : [object CSSValueList]
-rect: style.getPropertyValue(align-items) : normal
-rect: style.getPropertyCSSValue(align-items) : [object CSSValueList]
-rect: style.getPropertyValue(align-self) : auto
-rect: style.getPropertyCSSValue(align-self) : [object CSSValueList]
-rect: style.getPropertyValue(alignment-baseline) : auto
-rect: style.getPropertyCSSValue(alignment-baseline) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(appearance) : none
-rect: style.getPropertyCSSValue(appearance) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(background-attachment) : scroll
-rect: style.getPropertyCSSValue(background-attachment) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(background-clip) : border-box
-rect: style.getPropertyCSSValue(background-clip) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(background-color) : rgba(0, 0, 0, 0)
-rect: style.getPropertyCSSValue(background-color) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(background-image) : none
-rect: style.getPropertyCSSValue(background-image) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(background-origin) : padding-box
-rect: style.getPropertyCSSValue(background-origin) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(background-repeat) : repeat
-rect: style.getPropertyCSSValue(background-repeat) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(background-size) : auto
-rect: style.getPropertyCSSValue(background-size) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(baseline-shift) : baseline
-rect: style.getPropertyCSSValue(baseline-shift) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(border-bottom-color) : rgb(0, 0, 0)
-rect: style.getPropertyCSSValue(border-bottom-color) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(border-bottom-left-radius) : 0px
-rect: style.getPropertyCSSValue(border-bottom-left-radius) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(border-bottom-right-radius) : 0px
-rect: style.getPropertyCSSValue(border-bottom-right-radius) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(border-bottom-style) : none
-rect: style.getPropertyCSSValue(border-bottom-style) : [object CSSP

[webkit-changes] [290864] trunk

2022-03-05 Thread obrufau
Title: [290864] trunk








Revision 290864
Author obru...@igalia.com
Date 2022-03-05 03:18:55 -0800 (Sat, 05 Mar 2022)


Log Message
[css-cascade] Let 'revert-layer' in lowest layer roll back to user styles
https://bugs.webkit.org/show_bug.cgi?id=237486

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add test. It still has some remaining failures due to bug 236272.

* web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt: Added.
* web-platform-tests/css/css-cascade/all-prop-revert-layer-noop.html: Added.

Source/WebCore:

When 'revert-layer' was used in the lowest @layer, then it would behave
as 'unset'. This patch fixes ensureRollbackCascadeForRevertLayer() to
not return nullptr and instead return ensureRollbackCascadeForRevert()
in that case. This imples that 'revert-layer' will behave like 'revert'
and roll back to user (or UA) styles.

Test: imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop.html

* style/StyleBuilder.cpp:
(WebCore::Style::Builder::ensureRollbackCascadeForRevertLayer):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/style/StyleBuilder.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop.html




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (290863 => 290864)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-05 07:22:15 UTC (rev 290863)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-05 11:18:55 UTC (rev 290864)
@@ -1,3 +1,15 @@
+2022-03-05  Oriol Brufau  
+
+[css-cascade] Let 'revert-layer' in lowest layer roll back to user styles
+https://bugs.webkit.org/show_bug.cgi?id=237486
+
+Reviewed by Antti Koivisto.
+
+Add test. It still has some remaining failures due to bug 236272.
+
+* web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt: Added.
+* web-platform-tests/css/css-cascade/all-prop-revert-layer-noop.html: Added.
+
 2022-03-04  Chris Dumez  
 
 Home link on weather.gov is not working


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt (0 => 290864)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt	2022-03-05 11:18:55 UTC (rev 290864)
@@ -0,0 +1,125 @@
+
+PASS a
+PASS abbr
+PASS address
+PASS area
+PASS article
+PASS aside
+PASS audio
+PASS b
+PASS base
+PASS bdi
+PASS bdo
+PASS blockquote
+PASS body
+PASS br
+PASS button
+PASS canvas
+PASS caption
+PASS cite
+PASS code
+PASS col
+PASS colgroup
+PASS data
+PASS datalist
+PASS dd
+FAIL del assert_equals: text-decoration expected "line-through" but got "none"
+PASS details
+PASS dfn
+PASS dialog
+PASS div
+PASS dl
+PASS dt
+PASS em
+PASS embed
+PASS fieldset
+PASS figcaption
+PASS figure
+PASS footer
+PASS form
+PASS h1
+PASS h2
+PASS h3
+PASS h4
+PASS h5
+PASS h6
+PASS head
+PASS header
+PASS hr
+PASS html
+PASS i
+PASS iframe
+PASS img
+PASS input
+FAIL ins assert_equals: text-decoration expected "underline" but got "none"
+PASS kbd
+PASS label
+PASS legend
+PASS li
+PASS link
+PASS main
+PASS map
+PASS mark
+PASS math
+PASS menu
+PASS meta
+PASS meter
+PASS nav
+PASS noscript
+PASS object
+PASS ol
+PASS optgroup
+PASS option
+PASS output
+PASS p
+PASS param
+PASS pre
+PASS progress
+PASS q
+PASS rp
+PASS rt
+PASS ruby
+FAIL s assert_equals: text-decoration expected "line-through" but got "none"
+PASS samp
+PASS script
+PASS section
+PASS select
+PASS slot
+PASS small
+PASS source
+PASS span
+PASS strong
+PASS style
+PASS sub
+PASS summary
+PASS sup
+PASS svg
+PASS table
+PASS tbody
+PASS td
+PASS template
+PASS textarea
+PASS tfoot
+PASS th
+PASS thead
+PASS time
+PASS title
+PASS tr
+PASS track
+FAIL u assert_equals: text-decoration expected "underline" but got "none"
+PASS ul
+PASS var
+PASS video
+PASS wbr
+PASS z-custom
+
+
+
+
+
+
+
+
+
+
+


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop.html (0 => 290864)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop.html	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop.html	2022-03-05 11:18:55 UTC (rev 290864)
@@ -0,0 +1,55 @@
+
+
+CSS Cascade: "all: revert-layer"
+
+
+
+@layer {
+  .revert-all {
+all: revert-layer;
+  }
+}
+
+
+
+
+
+
+function cloneStyle(style) {
+  const clone = Object.create(null);
+  for (let property of style) {
+clone[property] = style.getPropertyValue(property);
+  }
+  return clone;
+}
+
+function assertSameClones(clone1, clone2, callback)

[webkit-changes] [290729] trunk

2022-03-02 Thread obrufau
Title: [290729] trunk








Revision 290729
Author obru...@igalia.com
Date 2022-03-02 07:23:29 -0800 (Wed, 02 Mar 2022)


Log Message
[css-cascade] Support 'revert-layer' in @keyframes
https://bugs.webkit.org/show_bug.cgi?id=237152

Reviewed by Antti Koivisto.

Source/WebCore:

In @keyframes, 'revert-layer' should roll back the cascaded value to
author origin. Resolver::styleForKeyframe already has the base style of
the element, so we only need to avoid applying properties with the
'revert-layer' value.

Test: imported/w3c/web-platform-tests/css/css-cascade/revert-layer-010.html.html

* style/StyleBuilder.cpp:
(WebCore::Style::Builder::applyProperty):
* style/StyleBuilderState.h:
(WebCore::Style::BuilderState::setIsBuildingKeyframeStyle):
* style/StyleResolver.cpp:
(WebCore::Style::Resolver::styleForKeyframe):

LayoutTests:

Expect test to pass.

* TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/style/StyleBuilder.cpp
trunk/Source/WebCore/style/StyleBuilderState.h
trunk/Source/WebCore/style/StyleResolver.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (290728 => 290729)

--- trunk/LayoutTests/ChangeLog	2022-03-02 15:06:43 UTC (rev 290728)
+++ trunk/LayoutTests/ChangeLog	2022-03-02 15:23:29 UTC (rev 290729)
@@ -1,3 +1,14 @@
+2022-03-02  Oriol Brufau  
+
+[css-cascade] Support 'revert-layer' in @keyframes
+https://bugs.webkit.org/show_bug.cgi?id=237152
+
+Reviewed by Antti Koivisto.
+
+Expect test to pass.
+
+* TestExpectations:
+
 2022-03-02  Alan Bujtas  
 
 [RTL] Incorrect alt text position in right to left context


Modified: trunk/LayoutTests/TestExpectations (290728 => 290729)

--- trunk/LayoutTests/TestExpectations	2022-03-02 15:06:43 UTC (rev 290728)
+++ trunk/LayoutTests/TestExpectations	2022-03-02 15:23:29 UTC (rev 290729)
@@ -2122,8 +2122,7 @@
 
 imported/w3c/web-platform-tests/css/css-cascade/important-prop.html [ ImageOnlyFailure ]
 webkit.org/b/187093 [ Debug ] imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml.html [ Skip ]
-webkit.org/b/233937 imported/w3c/web-platform-tests/css/css-cascade/revert-layer-010.html [ ImageOnlyFailure ]
-webkit.org/b/233937 imported/w3c/web-platform-tests/css/css-cascade/revert-layer-011.html [ ImageOnlyFailure ]
+webkit.org/b/192334 imported/w3c/web-platform-tests/css/css-cascade/revert-layer-011.html [ ImageOnlyFailure ]
 
 # Initial failures on the import of css-content
 


Modified: trunk/Source/WebCore/ChangeLog (290728 => 290729)

--- trunk/Source/WebCore/ChangeLog	2022-03-02 15:06:43 UTC (rev 290728)
+++ trunk/Source/WebCore/ChangeLog	2022-03-02 15:23:29 UTC (rev 290729)
@@ -1,3 +1,24 @@
+2022-03-02  Oriol Brufau  
+
+[css-cascade] Support 'revert-layer' in @keyframes
+https://bugs.webkit.org/show_bug.cgi?id=237152
+
+Reviewed by Antti Koivisto.
+
+In @keyframes, 'revert-layer' should roll back the cascaded value to
+author origin. Resolver::styleForKeyframe already has the base style of
+the element, so we only need to avoid applying properties with the
+'revert-layer' value.
+
+Test: imported/w3c/web-platform-tests/css/css-cascade/revert-layer-010.html.html
+
+* style/StyleBuilder.cpp:
+(WebCore::Style::Builder::applyProperty):
+* style/StyleBuilderState.h:
+(WebCore::Style::BuilderState::setIsBuildingKeyframeStyle):
+* style/StyleResolver.cpp:
+(WebCore::Style::Resolver::styleForKeyframe):
+
 2022-03-02  Michael Catanzaro  
 
 [GTK] setDragImage ignores offset


Modified: trunk/Source/WebCore/style/StyleBuilder.cpp (290728 => 290729)

--- trunk/Source/WebCore/style/StyleBuilder.cpp	2022-03-02 15:06:43 UTC (rev 290728)
+++ trunk/Source/WebCore/style/StyleBuilder.cpp	2022-03-02 15:23:29 UTC (rev 290729)
@@ -300,6 +300,11 @@
 bool isRevertLayer = valueToApply->isRevertLayerValue() || customPropertyValueID == CSSValueRevertLayer;
 
 if (isRevert || isRevertLayer) {
+// In @keyframes, 'revert-layer' rolls back the cascaded value to the author level.
+// We can just not apply the property in order to keep the value from the base style.
+if (isRevertLayer && m_state.m_isBuildingKeyframeStyle)
+return;
+
 auto* rollbackCascade = isRevert ? ensureRollbackCascadeForRevert() : ensureRollbackCascadeForRevertLayer();
 
 if (rollbackCascade) {


Modified: trunk/Source/WebCore/style/StyleBuilderState.h (290728 => 290729)

--- trunk/Source/WebCore/style/StyleBuilderState.h	2022-03-02 15:06:43 UTC (rev 290728)
+++ trunk/Source/WebCore/style/StyleBuilderState.h	2022-03-02 15:23:29 UTC (rev 290729)
@@ -107,6 +107,8 @@
 const CSSToLengthConversionData& cssToLengthConversionData() const { return m_cssToLengthConversionData; }
 CSSToStyleMap& styleMap() { return m_styleMap; }
 
+void setIsBuildingKeyframeStyle() { m

[webkit-changes] [290457] trunk

2022-02-24 Thread obrufau
Title: [290457] trunk








Revision 290457
Author obru...@igalia.com
Date 2022-02-24 13:19:40 -0800 (Thu, 24 Feb 2022)


Log Message
[css-cascade] Support 'revert' in @keyframes
https://bugs.webkit.org/show_bug.cgi?id=237073

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Expect tests to pass.

* web-platform-tests/css/css-cascade/revert-val-006-expected.txt:
* web-platform-tests/css/css-cascade/revert-val-007-expected.txt:
* web-platform-tests/css/css-cascade/revert-val-008-expected.txt:
* web-platform-tests/css/css-cascade/revert-val-010-expected.txt:

Source/WebCore:

Resolver::styleForKeyframe was constructing a RenderStyle with only the
styles specified in the @keyframes. But not taking into account the UA
and user rules that affect the element meant that 'revert' was broken.
Since Builder::applyProperty didn't find the declarations from other
origins, 'revert' just behaved as 'unset'.

This patch solves it by detecting if the @keyframes has a 'revert' value
and in that case it collects the UA and user rules so that it can be
resolved properly.

Tests: imported/w3c/web-platform-tests/css/css-cascade/revert-val-006.html
   imported/w3c/web-platform-tests/css/css-cascade/revert-val-007.html
   imported/w3c/web-platform-tests/css/css-cascade/revert-val-008.html
   imported/w3c/web-platform-tests/css/css-cascade/revert-val-010.html

* style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::addAuthorKeyframeRules):
* style/ElementRuleCollector.h:
* style/StyleResolver.cpp:
(WebCore::Style::Resolver::styleForKeyframe):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/revert-val-006-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/revert-val-007-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/revert-val-008-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/revert-val-010-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/style/ElementRuleCollector.cpp
trunk/Source/WebCore/style/ElementRuleCollector.h
trunk/Source/WebCore/style/StyleResolver.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (290456 => 290457)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-24 21:16:24 UTC (rev 290456)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-24 21:19:40 UTC (rev 290457)
@@ -1,3 +1,17 @@
+2022-02-24  Oriol Brufau  
+
+[css-cascade] Support 'revert' in @keyframes
+https://bugs.webkit.org/show_bug.cgi?id=237073
+
+Reviewed by Darin Adler.
+
+Expect tests to pass.
+
+* web-platform-tests/css/css-cascade/revert-val-006-expected.txt:
+* web-platform-tests/css/css-cascade/revert-val-007-expected.txt:
+* web-platform-tests/css/css-cascade/revert-val-008-expected.txt:
+* web-platform-tests/css/css-cascade/revert-val-010-expected.txt:
+
 2022-02-24  Alan Bujtas  
 
 [IFC][Integration] Enable non-paginated vertical-rl writing mode


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/revert-val-006-expected.txt (290456 => 290457)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/revert-val-006-expected.txt	2022-02-24 21:16:24 UTC (rev 290456)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/revert-val-006-expected.txt	2022-02-24 21:19:40 UTC (rev 290457)
@@ -1,3 +1,3 @@
 
-FAIL The revert keyword works with @keyframes assert_equals: expected "21.440001px" but got "0px"
+PASS The revert keyword works with @keyframes
 


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/revert-val-007-expected.txt (290456 => 290457)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/revert-val-007-expected.txt	2022-02-24 21:16:24 UTC (rev 290456)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/revert-val-007-expected.txt	2022-02-24 21:19:40 UTC (rev 290457)
@@ -1,3 +1,3 @@
 
-FAIL A @keyframe animation with revert works when applied to multiple identical elements assert_equals: expected "21.440001px" but got "0px"
+PASS A @keyframe animation with revert works when applied to multiple identical elements
 


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/revert-val-008-expected.txt (290456 => 290457)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/revert-val-008-expected.txt	2022-02-24 21:16:24 UTC (rev 290456)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/revert-val-008-expected.txt	2022-02-24 21:19:40 UTC (rev 290457)
@@ -1,3 +1,3 @@
 
-FAIL The revert keyword works in the final frame of a web animation assert_between_exclusive: expected a number greater than 21 and less than 42 but got 15
+PASS The revert keyword works in the final frame of a web animation
 


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade

[webkit-changes] [288879] trunk

2022-02-01 Thread obrufau
Title: [288879] trunk








Revision 288879
Author obru...@igalia.com
Date 2022-02-01 08:41:43 -0800 (Tue, 01 Feb 2022)


Log Message
[css-cascade] Fix removal of not yet loaded CSS @import
https://bugs.webkit.org/show_bug.cgi?id=235930

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add new test.

* web-platform-tests/css/css-cascade/import-removal-expected.html: Added.
* web-platform-tests/css/css-cascade/import-removal.html: Added.

Source/WebCore:

When removing a not yet loaded CSS @import, the hasPendingSheet() flag
was not cleared. This resulted in a completely blank page.
This patch makes sure to cancel the load before deleting the rule.

Test: imported/w3c/web-platform-tests/css/css-cascade/import-removal.html

* css/StyleRuleImport.cpp:
(WebCore::StyleRuleImport::cancelLoad):
* css/StyleRuleImport.h:
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::wrapperDeleteRule):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/StyleRuleImport.cpp
trunk/Source/WebCore/css/StyleRuleImport.h
trunk/Source/WebCore/css/StyleSheetContents.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/import-removal-expected.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/import-removal.html




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (288878 => 288879)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-01 16:35:37 UTC (rev 288878)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-01 16:41:43 UTC (rev 288879)
@@ -1,3 +1,15 @@
+2022-02-01  Oriol Brufau  
+
+[css-cascade] Fix removal of not yet loaded CSS @import
+https://bugs.webkit.org/show_bug.cgi?id=235930
+
+Reviewed by Antti Koivisto.
+
+Add new test.
+
+* web-platform-tests/css/css-cascade/import-removal-expected.html: Added.
+* web-platform-tests/css/css-cascade/import-removal.html: Added.
+
 2022-02-01  Tim Nguyen  
 
 Entirely remove support for -apple-trailing-word


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/import-removal-expected.html (0 => 288879)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/import-removal-expected.html	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/import-removal-expected.html	2022-02-01 16:41:43 UTC (rev 288879)
@@ -0,0 +1,4 @@
+
+Test passes if there is a filled green square.
+


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/import-removal.html (0 => 288879)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/import-removal.html	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/import-removal.html	2022-02-01 16:41:43 UTC (rev 288879)
@@ -0,0 +1,18 @@
+
+
+
+
+Test passes if there is a filled green square.
+
+
+const style = document.createElement("style");
+document.head.append(style);
+const {sheet} = style;
+sheet.insertRule("@import url('data:text/css,div { background: red !important }');");
+sheet.insertRule("div { background: green }", 1);
+sheet.deleteRule(0);
+


Modified: trunk/Source/WebCore/ChangeLog (288878 => 288879)

--- trunk/Source/WebCore/ChangeLog	2022-02-01 16:35:37 UTC (rev 288878)
+++ trunk/Source/WebCore/ChangeLog	2022-02-01 16:41:43 UTC (rev 288879)
@@ -1,3 +1,22 @@
+2022-02-01  Oriol Brufau  
+
+[css-cascade] Fix removal of not yet loaded CSS @import
+https://bugs.webkit.org/show_bug.cgi?id=235930
+
+Reviewed by Antti Koivisto.
+
+When removing a not yet loaded CSS @import, the hasPendingSheet() flag
+was not cleared. This resulted in a completely blank page.
+This patch makes sure to cancel the load before deleting the rule.
+
+Test: imported/w3c/web-platform-tests/css/css-cascade/import-removal.html
+
+* css/StyleRuleImport.cpp:
+(WebCore::StyleRuleImport::cancelLoad):
+* css/StyleRuleImport.h:
+* css/StyleSheetContents.cpp:
+(WebCore::StyleSheetContents::wrapperDeleteRule):
+
 2022-02-01  Antti Koivisto  
 
 AX: nullptr crash under AccessibilityRenderObject::computeAccessibilityIsIgnored


Modified: trunk/Source/WebCore/css/StyleRuleImport.cpp (288878 => 288879)

--- trunk/Source/WebCore/css/StyleRuleImport.cpp	2022-02-01 16:35:37 UTC (rev 288878)
+++ trunk/Source/WebCore/css/StyleRuleImport.cpp	2022-02-01 16:41:43 UTC (rev 288879)
@@ -52,6 +52,16 @@
 m_mediaQueries = MediaQuerySet::create(String(), MediaQueryParserContext());
 }
 
+void StyleRuleImport::cancelLoad()
+{
+if (!isLoading())
+return;
+
+m_loading = false;
+if (m_parentStyleSheet)
+m_parentStyleSheet->checkLoaded();
+}
+
 StyleRuleImport::~StyleRuleImport()
 {
 if (m_styleSheet)


Modified: trunk/Source/WebCore/css/StyleRuleImport.h (288878 => 288879)

--- trunk/Source/WebCore/css/StyleRuleI

[webkit-changes] [288404] trunk

2022-01-22 Thread obrufau
Title: [288404] trunk








Revision 288404
Author obru...@igalia.com
Date 2022-01-22 09:26:35 -0800 (Sat, 22 Jan 2022)


Log Message
[CSS Cascade Layers] Enable CSSImportRule.layerName for WebKitGTK
https://bugs.webkit.org/show_bug.cgi?id=235455

Reviewed by Darin Adler.

Source/WebCore:

Bug 231340 added support for CSSImportRule.layerName, but CMakeLists.txt
wasn't listing CSSImportRule+Layer.idl

So the attribute was not there when running WebKitGTK, built with CMake.

Tests: imported/w3c/web-platform-tests/css/css-cascade/idlharness.html
   imported/w3c/web-platform-tests/css/css-cascade/layer-rules-cssom.html

* CMakeLists.txt: link missing css/CSSImportRule+Layer.idl

LayoutTests:

Expect the tests to pass.

* platform/glib/imported/w3c/web-platform-tests/css/css-cascade/idlharness-expected.txt: Removed.
* platform/glib/imported/w3c/web-platform-tests/css/css-cascade/layer-rules-cssom-expected.txt: Removed.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog


Removed Paths

trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-cascade/idlharness-expected.txt
trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-cascade/layer-rules-cssom-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (288403 => 288404)

--- trunk/LayoutTests/ChangeLog	2022-01-22 09:31:27 UTC (rev 288403)
+++ trunk/LayoutTests/ChangeLog	2022-01-22 17:26:35 UTC (rev 288404)
@@ -1,3 +1,15 @@
+2022-01-22  Oriol Brufau  
+
+[CSS Cascade Layers] Enable CSSImportRule.layerName for WebKitGTK
+https://bugs.webkit.org/show_bug.cgi?id=235455
+
+Reviewed by Darin Adler.
+
+Expect the tests to pass.
+
+* platform/glib/imported/w3c/web-platform-tests/css/css-cascade/idlharness-expected.txt: Removed.
+* platform/glib/imported/w3c/web-platform-tests/css/css-cascade/layer-rules-cssom-expected.txt: Removed.
+
 2022-01-21  Simon Fraser  
 
 Unreviewed test resource change.


Deleted: trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-cascade/idlharness-expected.txt (288403 => 288404)

--- trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-cascade/idlharness-expected.txt	2022-01-22 09:31:27 UTC (rev 288403)
+++ trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-cascade/idlharness-expected.txt	2022-01-22 17:26:35 UTC (rev 288404)
@@ -1,29 +0,0 @@
-
-PASS idl_test setup
-PASS idl_test validation
-PASS Partial interface CSSImportRule: original interface defined
-PASS Partial interface CSSImportRule: valid exposure set
-PASS Partial interface CSSImportRule: member names are unique
-PASS CSSLayerBlockRule interface: existence and properties of interface object
-PASS CSSLayerBlockRule interface object length
-PASS CSSLayerBlockRule interface object name
-PASS CSSLayerBlockRule interface: existence and properties of interface prototype object
-PASS CSSLayerBlockRule interface: existence and properties of interface prototype object's "constructor" property
-PASS CSSLayerBlockRule interface: existence and properties of interface prototype object's @@unscopables property
-PASS CSSLayerBlockRule interface: attribute name
-PASS CSSLayerBlockRule must be primary interface of block
-PASS Stringification of block
-PASS CSSLayerBlockRule interface: block must inherit property "name" with the proper type
-PASS CSSLayerStatementRule interface: existence and properties of interface object
-PASS CSSLayerStatementRule interface object length
-PASS CSSLayerStatementRule interface object name
-PASS CSSLayerStatementRule interface: existence and properties of interface prototype object
-PASS CSSLayerStatementRule interface: existence and properties of interface prototype object's "constructor" property
-PASS CSSLayerStatementRule interface: existence and properties of interface prototype object's @@unscopables property
-PASS CSSLayerStatementRule interface: attribute nameList
-PASS CSSLayerStatementRule must be primary interface of statement
-PASS Stringification of statement
-PASS CSSLayerStatementRule interface: statement must inherit property "nameList" with the proper type
-FAIL CSSImportRule interface: attribute layerName assert_true: The prototype object must have a property "layerName" expected true got false
-FAIL CSSImportRule interface: layeredImport must inherit property "layerName" with the proper type assert_inherits: property "layerName" not found in prototype chain
-


Deleted: trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-cascade/layer-rules-cssom-expected.txt (288403 => 288404)

--- trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-cascade/layer-rules-cssom-expected.txt	2022-01-22 09:31:27 UTC (rev 288403)
+++ trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-cascade/layer-rules-cssom-expected.txt	2022-01-22 17:26:35 UTC (rev 288404)
@@ -1,11 +0,0 @@
-
-PASS B

[webkit-changes] [288114] trunk/Source/WebCore

2022-01-18 Thread obrufau
Title: [288114] trunk/Source/WebCore








Revision 288114
Author obru...@igalia.com
Date 2022-01-18 04:28:44 -0800 (Tue, 18 Jan 2022)


Log Message
[css-logical] Simplify logical property groups
https://bugs.webkit.org/show_bug.cgi?id=228130

Reviewed by Antti Koivisto.

Refactors logical property group code in makeprop.pl to make it a bit
more simple and easy the extend if new kinds of logical properties are
introduced in the future.

No new tests since no change in behavior.

* css/makeprop.pl:
(addProperty):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/makeprop.pl




Diff

Modified: trunk/Source/WebCore/ChangeLog (288113 => 288114)

--- trunk/Source/WebCore/ChangeLog	2022-01-18 11:02:49 UTC (rev 288113)
+++ trunk/Source/WebCore/ChangeLog	2022-01-18 12:28:44 UTC (rev 288114)
@@ -1,3 +1,19 @@
+2022-01-18  Oriol Brufau  
+
+[css-logical] Simplify logical property groups
+https://bugs.webkit.org/show_bug.cgi?id=228130
+
+Reviewed by Antti Koivisto.
+
+Refactors logical property group code in makeprop.pl to make it a bit
+more simple and easy the extend if new kinds of logical properties are
+introduced in the future.
+
+No new tests since no change in behavior.
+
+* css/makeprop.pl:
+(addProperty):
+
 2022-01-17  Sergio Villar Senin  
 
 [css-flexbox] Add support for intrinsic sizes in flex-basis


Modified: trunk/Source/WebCore/css/makeprop.pl (288113 => 288114)

--- trunk/Source/WebCore/css/makeprop.pl	2022-01-18 11:02:49 UTC (rev 288113)
+++ trunk/Source/WebCore/css/makeprop.pl	2022-01-18 12:28:44 UTC (rev 288114)
@@ -71,30 +71,22 @@
 my %nameIsInherited;
 my %namePriorityShouldSink;
 my %logicalPropertyGroups;
-my %resolverKinds = (
+my %logicalPropertyGroupResolvers = (
 "logical" => {
-"block" => "axis",
-"inline" => "axis",
-"block-start" => "side",
-"block-end" => "side",
-"inline-start" => "side",
-"inline-end" => "side",
-"start-start" => "corner",
-"start-end" => "corner",
-"end-start" => "corner",
-"end-end" => "corner",
+# Order matches LogicalBoxAxis enum in Source/WebCore/platform/text/WritingMode.h.
+"axis" => ["inline", "block"],
+# Order matches LogicalBoxSide enum in Source/WebCore/platform/text/WritingMode.h.
+"side" => ["block-start", "inline-end", "block-end", "inline-start"],
+# Order matches LogicalBoxCorner enum in Source/WebCore/platform/text/WritingMode.h.
+"corner" => ["start-start", "start-end", "end-start", "end-end"],
 },
 "physical" => {
-"horizontal" => "axis",
-"vertical" => "axis",
-"top" => "side",
-"right" => "side",
-"bottom" => "side",
-"left" => "side",
-"top-left" => "corner",
-"top-right" => "corner",
-"bottom-right" => "corner",
-"bottom-left" => "corner",
+# Order matches BoxAxis enum in Source/WebCore/platform/text/WritingMode.h.
+"axis" => ["horizontal", "vertical"],
+# Order matches BoxSide enum in Source/WebCore/platform/text/WritingMode.h.
+"side" => ["top", "right", "bottom", "left"],
+# Order matches BoxCorner enum in Source/WebCore/platform/text/WritingMode.h.
+"corner" => ["top-left", "top-right", "bottom-right", "bottom-left"],
 },
 );
 my %propertiesWithStyleBuilderOptions;
@@ -136,16 +128,15 @@
 }
 
 while (my ($groupName, $logicalPropertyGroup) = each %logicalPropertyGroups) {
-for my $logic (keys %resolverKinds) {
+my $kind = $logicalPropertyGroup->{"kind"};
+while (my ($logic, $resolversForLogic) = each %logicalPropertyGroupResolvers) {
 my $properties = $logicalPropertyGroup->{$logic};
 if (!$properties) {
 die "Logical property group \"$groupName\" has no \"$logic\" property.";
 }
-while (my ($resolver, $kind) = each %{ $resolverKinds{$logic} }) {
-if ($kind eq $logicalPropertyGroup->{"kind"}) {
-if (!$properties->{$resolver}) {
-die "Logical property group \"$groupName\" requires a \"$resolver\" property.";
-}
+for my $resolver (@{ $resolversForLogic->{$kind} }) {
+if (!$properties->{$resolver}) {
+die "Logical property group \"$groupName\" requires a \"$resolver\" property.";
 }
 }
 }
@@ -319,11 +310,17 @@
 my $resolver = $codegenProperties->{$codegenOptionName}{"resolver"};
 my $kind;
 my $logic;
-if ($kind = $resolverKinds{"logical"}{$resolver}) {
-$logic = "logical";
-} elsif ($kind = $resolverKinds{"physical"}{$resolver}) {
-$logic = "physical";
-} else {
+while (my ($currentLogic, $resolversForLogic) = 

[webkit-changes] [285025] trunk

2021-10-29 Thread obrufau
Title: [285025] trunk








Revision 285025
Author obru...@igalia.com
Date 2021-10-29 05:05:24 -0700 (Fri, 29 Oct 2021)


Log Message
Add obrufau's GitHub username to contributors.json

Unreviewed.

* metadata/contributors.json:

Modified Paths

trunk/ChangeLog
trunk/metadata/contributors.json




Diff

Modified: trunk/ChangeLog (285024 => 285025)

--- trunk/ChangeLog	2021-10-29 10:59:34 UTC (rev 285024)
+++ trunk/ChangeLog	2021-10-29 12:05:24 UTC (rev 285025)
@@ -1,3 +1,11 @@
+2021-10-29  Oriol Brufau  
+
+Add obrufau's GitHub username to contributors.json
+
+Unreviewed.
+
+* metadata/contributors.json:
+
 2021-10-28  Myles C. Maxfield  
 
 The space glyph in the Filicudi font is not substituted by shaping in the complex text codepath, thereby breaking the visual effect of the font


Modified: trunk/metadata/contributors.json (285024 => 285025)

--- trunk/metadata/contributors.json	2021-10-29 10:59:34 UTC (rev 285024)
+++ trunk/metadata/contributors.json	2021-10-29 12:05:24 UTC (rev 285025)
@@ -5101,6 +5101,7 @@
   "emails" : [
  "obru...@igalia.com"
   ],
+  "github": "Loirooriol",
   "name" : "Oriol Brufau",
   "nicks" : [
  "obrufau"






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [279044] trunk

2021-06-18 Thread obrufau
Title: [279044] trunk








Revision 279044
Author obru...@igalia.com
Date 2021-06-18 12:44:30 -0700 (Fri, 18 Jun 2021)


Log Message
[css-logical] Fix cssom "set a CSS declaration" for logical properties
https://bugs.webkit.org/show_bug.cgi?id=226461

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

This test is now passing.

* web-platform-tests/css/cssom/cssstyledeclaration-setter-logical-expected.txt:

Source/WebCore:

Test: imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-setter-logical.html

Before this patch, setting a value to a property already in the list of
declarations, would just update its value, without reordering.

The problem was that the order is important when there is a mix of
logical and physical properties:

  el.style.paddingTop = "1px";
  el.style.paddingBlockStart = "2px";
  el.style.cssText; // "padding-top: 1px; padding-block-start: 2px"
  el.style.paddingTop = "3px";
  el.style.cssText; // "padding-top: 3px; padding-block-start: 2px"
  getComputedStyle(el).paddingTop; // "2px" -- no effect!

Therefore, this patch implements this part of the spec:
> If there are CSS declarations in declarations whose property name is
> in the same logical property group as property, but has a different
> mapping logic, target declaration must be at an index after all of
> those CSS declarations.

This change is based on this Chromium CL:
https://chromium-review.googlesource.com/c/chromium/src/+/2575081/

* css/CSSProperty.h:
* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::canUpdateInPlace const):
(WebCore::MutableStyleProperties::setProperty):
* css/StyleProperties.h:
* css/makeprop.pl:

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-setter-logical-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSProperty.h
trunk/Source/WebCore/css/StyleProperties.cpp
trunk/Source/WebCore/css/StyleProperties.h
trunk/Source/WebCore/css/makeprop.pl




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (279043 => 279044)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-06-18 19:15:40 UTC (rev 279043)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-06-18 19:44:30 UTC (rev 279044)
@@ -1,3 +1,14 @@
+2021-06-18  Oriol Brufau  
+
+[css-logical] Fix cssom "set a CSS declaration" for logical properties
+https://bugs.webkit.org/show_bug.cgi?id=226461
+
+Reviewed by Antti Koivisto.
+
+This test is now passing.
+
+* web-platform-tests/css/cssom/cssstyledeclaration-setter-logical-expected.txt:
+
 2021-06-17  Chris Dumez  
 
 Add support for IDBCursor.request


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-setter-logical-expected.txt (279043 => 279044)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-setter-logical-expected.txt	2021-06-18 19:15:40 UTC (rev 279043)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-setter-logical-expected.txt	2021-06-18 19:44:30 UTC (rev 279044)
@@ -1,3 +1,3 @@
 
-FAIL newly set declaration should be after all declarations in the same logical property group but have different logical kind assert_less_than: padding-top should be after padding-block-start after setting padding-top expected a number less than 0 but got 4
+PASS newly set declaration should be after all declarations in the same logical property group but have different logical kind
 


Modified: trunk/Source/WebCore/ChangeLog (279043 => 279044)

--- trunk/Source/WebCore/ChangeLog	2021-06-18 19:15:40 UTC (rev 279043)
+++ trunk/Source/WebCore/ChangeLog	2021-06-18 19:44:30 UTC (rev 279044)
@@ -1,3 +1,41 @@
+2021-06-18  Oriol Brufau  
+
+[css-logical] Fix cssom "set a CSS declaration" for logical properties
+https://bugs.webkit.org/show_bug.cgi?id=226461
+
+Reviewed by Antti Koivisto.
+
+Test: imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-setter-logical.html
+
+Before this patch, setting a value to a property already in the list of
+declarations, would just update its value, without reordering.
+
+The problem was that the order is important when there is a mix of
+logical and physical properties:
+
+  el.style.paddingTop = "1px";
+  el.style.paddingBlockStart = "2px";
+  el.style.cssText; // "padding-top: 1px; padding-block-start: 2px"
+  el.style.paddingTop = "3px";
+  el.style.cssText; // "padding-top: 3px; padding-block-start: 2px"
+  getComputedStyle(el).paddingTop; // "2px" -- no effect!
+
+Therefore, this patch implements this part of the spec:
+> If there are CSS declarations in declarations whose property name is
+> in the same logical property group as property, but has a different
+> mapping logic, target declaration must be at an index after all of
+  

[webkit-changes] [278985] trunk

2021-06-17 Thread obrufau
Title: [278985] trunk








Revision 278985
Author obru...@igalia.com
Date 2021-06-17 06:13:49 -0700 (Thu, 17 Jun 2021)


Log Message
[css-logical] Implement logical property groups
https://bugs.webkit.org/show_bug.cgi?id=226878

Reviewed by Antti Koivisto.

Source/WebCore:

In order to have proper CSSOM support for logical properties, we will
need to determine whether two properties belong to the same logical
property group but with a different mapping logic.

Before this patch, we only knew the physical properties belonging to the
same logical property group as a given logical property. But given a
physical property, we didn't know if there were logical properties that
could map to it.

Therefore this patch changes CSSProperties.json so that both logical and
physical properties specify their logical property group.

The code for resolving a logical property into its physical equivalent
is now automatically generated.

The CSSOM fix will be done in a follow-up (bug 226461).

This patch introduces no behavior changes.

* css/CSSProperties.json:
* css/CSSProperty.cpp:
* css/makeprop.pl:
(nameToId):
(addProperty):
* platform/RectEdges.h:
(WebCore::RectEdges::before):
(WebCore::RectEdges::after):
(WebCore::RectEdges::start):
(WebCore::RectEdges::end):
(WebCore::RectEdges::before const):
(WebCore::RectEdges::after const):
(WebCore::RectEdges::start const):
(WebCore::RectEdges::end const):
* platform/text/WritingMode.h:
(WebCore::mapLogicalAxisToPhysicalAxis):

Tools:

Add validator for new codegen property "logical-property-group",
replacing the old "direction-aware-property".

* Scripts/webkitpy/style/checkers/jsonchecker.py:
(JSONCSSPropertiesChecker.validate_logical_property_group):
(JSONCSSPropertiesChecker.check_codegen_properties):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSProperties.json
trunk/Source/WebCore/css/CSSProperty.cpp
trunk/Source/WebCore/css/makeprop.pl
trunk/Source/WebCore/platform/RectEdges.h
trunk/Source/WebCore/platform/text/WritingMode.h
trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/style/checkers/jsonchecker.py




Diff

Modified: trunk/Source/WebCore/ChangeLog (278984 => 278985)

--- trunk/Source/WebCore/ChangeLog	2021-06-17 13:05:46 UTC (rev 278984)
+++ trunk/Source/WebCore/ChangeLog	2021-06-17 13:13:49 UTC (rev 278985)
@@ -1,3 +1,46 @@
+2021-06-17  Oriol Brufau  
+
+[css-logical] Implement logical property groups
+https://bugs.webkit.org/show_bug.cgi?id=226878
+
+Reviewed by Antti Koivisto.
+
+In order to have proper CSSOM support for logical properties, we will
+need to determine whether two properties belong to the same logical
+property group but with a different mapping logic.
+
+Before this patch, we only knew the physical properties belonging to the
+same logical property group as a given logical property. But given a
+physical property, we didn't know if there were logical properties that
+could map to it.
+
+Therefore this patch changes CSSProperties.json so that both logical and
+physical properties specify their logical property group.
+
+The code for resolving a logical property into its physical equivalent
+is now automatically generated.
+
+The CSSOM fix will be done in a follow-up (bug 226461).
+
+This patch introduces no behavior changes.
+
+* css/CSSProperties.json:
+* css/CSSProperty.cpp:
+* css/makeprop.pl:
+(nameToId):
+(addProperty):
+* platform/RectEdges.h:
+(WebCore::RectEdges::before):
+(WebCore::RectEdges::after):
+(WebCore::RectEdges::start):
+(WebCore::RectEdges::end):
+(WebCore::RectEdges::before const):
+(WebCore::RectEdges::after const):
+(WebCore::RectEdges::start const):
+(WebCore::RectEdges::end const):
+* platform/text/WritingMode.h:
+(WebCore::mapLogicalAxisToPhysicalAxis):
+
 2021-06-17  Enrique Ocaña González  
 
 [GStreamer] Refactor MediaPlayerPrivateGStreamer::notifyPlayerOf*


Modified: trunk/Source/WebCore/css/CSSProperties.json (278984 => 278985)

--- trunk/Source/WebCore/css/CSSProperties.json	2021-06-17 13:05:46 UTC (rev 278984)
+++ trunk/Source/WebCore/css/CSSProperties.json	2021-06-17 13:13:49 UTC (rev 278985)
@@ -92,9 +92,21 @@
 "Indicates that this CSS property is color-related (populates",
 "CSSProperty::isColorProperty().",
 "",
-"* direction-aware-property:",
-"Indicates that this CSS property is direction aware (populates.",
-"CSSProperty::isDirectionAwareProperty().",
+"* logical-property-group:",
+"Indicates that this CSS property belongs to a logical property group",
+"(https://drafts.csswg.org/css-logical/#logical-property-group)",
+"This is used for both logical properties that depend on writing-mode",
+"and/or text-direction (for which CSSPr

[webkit-changes] [276837] trunk

2021-04-30 Thread obrufau
Title: [276837] trunk








Revision 276837
Author obru...@igalia.com
Date 2021-04-30 07:24:32 -0700 (Fri, 30 Apr 2021)


Log Message
[css-logical] Fix logical shorthands with var()
https://bugs.webkit.org/show_bug.cgi?id=224594

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Add a new test.
Some cases still fail because of bug 225206 and bug 225209.

* web-platform-tests/css/css-logical/logicalprops-with-variables-expected.txt: Added.
* web-platform-tests/css/css-logical/logicalprops-with-variables.html: Added.

Source/WebCore:

Logical shorthands with var() were not working because when resolving
the pending-substitution value of the equivalent physical longhand,
parseValueWithVariableReferences would parse the logical shorthand into
the logical longhands, which would be different properties than the
physical longhand being resolved.

So this patch compares with the equivalent physical property instead.

Test: imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-variables.html

* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseValueWithVariableReferences):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/parser/CSSParser.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-variables-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-variables.html




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (276836 => 276837)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-04-30 12:19:26 UTC (rev 276836)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-04-30 14:24:32 UTC (rev 276837)
@@ -1,3 +1,16 @@
+2021-04-30  Oriol Brufau  
+
+[css-logical] Fix logical shorthands with var()
+https://bugs.webkit.org/show_bug.cgi?id=224594
+
+Reviewed by Manuel Rego Casasnovas.
+
+Add a new test.
+Some cases still fail because of bug 225206 and bug 225209.
+
+* web-platform-tests/css/css-logical/logicalprops-with-variables-expected.txt: Added.
+* web-platform-tests/css/css-logical/logicalprops-with-variables.html: Added.
+
 2021-04-30  Sergio Villar Senin  
 
 Nullopt in RenderFlexibleBox::layoutFlexItems in RenderFlexibleBox::layoutBlock via RenderMultiColumnFlow::layout


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-variables-expected.txt (0 => 276837)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-variables-expected.txt	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-variables-expected.txt	2021-04-30 14:24:32 UTC (rev 276837)
@@ -0,0 +1,14 @@
+
+PASS Logical longhands with variables - margin-inline-start
+PASS Logical longhands with variables - margin-inline-end
+FAIL Logical longhands with variables - margin-inline assert_equals: Specified value expected "" but got "var(--one) var(--two)"
+PASS Logical shorthand with 1 variable - margin-inline-start
+PASS Logical shorthand with 1 variable - margin-inline-end
+FAIL Logical shorthand with 1 variable - margin-inline assert_equals: Specified value expected "var(--one)" but got ""
+PASS Logical shorthand with 2 variables - margin-inline-start
+PASS Logical shorthand with 2 variables - margin-inline-end
+FAIL Logical shorthand with 2 variables - margin-inline assert_equals: Specified value expected "var(--one) var(--two)" but got ""
+PASS Logical shorthand with 1 variable and 1 length - margin-inline-start
+PASS Logical shorthand with 1 variable and 1 length - margin-inline-end
+FAIL Logical shorthand with 1 variable and 1 length - margin-inline assert_equals: Specified value expected "var(--one) 2px" but got ""
+


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-variables.html (0 => 276837)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-variables.html	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-variables.html	2021-04-30 14:24:32 UTC (rev 276837)
@@ -0,0 +1,69 @@
+
+
+Logical properties with var()
+
+
+
+
+const target = document.getElementById("target");
+const {style} = target;
+const computedStyle = getComputedStyle(target);
+let title;
+
+function check(property, specifiedExpected, expectedComputed) {
+  test(() => {
+const specifiedActual = style.getPropertyValue(property);
+assert_equals(specifiedActual, specifiedExpected, "Specified value");
+const computedActual = computedStyle.getPropertyValue(property);
+assert_equals(computedActual, expectedComputed, "Computed value");
+  }, title + " - " + property);
+}
+
+{
+  title = "Logical longhands with variables";
+  style.cssText = "";
+  style.setProperty("--one", "1px");
+  style.setProperty("--two", "2px");
+  style.setPrope

[webkit-changes] [269509] trunk/Source/WebCore

2020-11-11 Thread obrufau
Title: [269509] trunk/Source/WebCore








Revision 269509
Author obru...@igalia.com
Date 2020-11-06 06:09:47 -0800 (Fri, 06 Nov 2020)


Log Message
[css-grid] Prevent FindUsedFlexFraction from iterating items twice
https://bugs.webkit.org/show_bug.cgi?id=218630

Reviewed by Javier Fernandez.

IndefiniteSizeStrategy::findUsedFlexFraction needs to iterate all grid
items that cross a flexible track. To do so it, takes the indices of the
flex tracks, and for each one it uses GridIterator to iterate the items
in that track.

Then, to avoid processing the same item multiple times, it used to check
that the item started in the current flex track, not in a previous one.

However, this was insufficient: it wasn't taking into account that an
item can be in a single flex track, but span multiple tracks in the
other axis.

Therefore, this patch changes it to use the same approach as in
GridTrackSizingAlgorithm::resolveIntrinsicTrackSizes, i.e. creates a
HashSet outside of the loop, and inserts each given grid item to it,
checking whether it's a new entry or not.

This is a port of https://crrev.com/821910 from Chromium.

* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::IndefiniteSizeStrategy::findUsedFlexFraction const):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (269508 => 269509)

--- trunk/Source/WebCore/ChangeLog	2020-11-06 13:47:04 UTC (rev 269508)
+++ trunk/Source/WebCore/ChangeLog	2020-11-06 14:09:47 UTC (rev 269509)
@@ -1,3 +1,32 @@
+2020-11-06  Oriol Brufau  
+
+[css-grid] Prevent FindUsedFlexFraction from iterating items twice
+https://bugs.webkit.org/show_bug.cgi?id=218630
+
+Reviewed by Javier Fernandez.
+
+IndefiniteSizeStrategy::findUsedFlexFraction needs to iterate all grid
+items that cross a flexible track. To do so it, takes the indices of the
+flex tracks, and for each one it uses GridIterator to iterate the items
+in that track.
+
+Then, to avoid processing the same item multiple times, it used to check
+that the item started in the current flex track, not in a previous one.
+
+However, this was insufficient: it wasn't taking into account that an
+item can be in a single flex track, but span multiple tracks in the
+other axis.
+
+Therefore, this patch changes it to use the same approach as in
+GridTrackSizingAlgorithm::resolveIntrinsicTrackSizes, i.e. creates a
+HashSet outside of the loop, and inserts each given grid item to it,
+checking whether it's a new entry or not.
+
+This is a port of https://crrev.com/821910 from Chromium.
+
+* rendering/GridTrackSizingAlgorithm.cpp:
+(WebCore::IndefiniteSizeStrategy::findUsedFlexFraction const):
+
 2020-11-06  Chris Lord  
 
 REGRESSION(r269503): [GTK][WPE] >200 tests are failing


Modified: trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp (269508 => 269509)

--- trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp	2020-11-06 13:47:04 UTC (rev 269508)
+++ trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp	2020-11-06 14:09:47 UTC (rev 269509)
@@ -972,15 +972,16 @@
 if (!grid.hasGridItems())
 return flexFraction;
 
-for (unsigned i = 0; i < flexibleSizedTracksIndex.size(); ++i) {
-GridIterator iterator(grid, direction, flexibleSizedTracksIndex[i]);
+HashSet itemsSet;
+for (const auto& trackIndex : flexibleSizedTracksIndex) {
+GridIterator iterator(grid, direction, trackIndex);
 while (auto* gridItem = iterator.nextGridItem()) {
-const GridSpan& span = grid.gridItemSpan(*gridItem, direction);
-
 // Do not include already processed items.
-if (i > 0 && span.startLine() <= flexibleSizedTracksIndex[i - 1])
+if (!itemsSet.add(gridItem).isNewEntry)
 continue;
 
+const GridSpan& span = grid.gridItemSpan(*gridItem, direction);
+
 // Removing gutters from the max-content contribution of the item, so they are not taken into account in FindFrUnitSize().
 LayoutUnit leftOverSpace = maxContentForChild(*gridItem) - renderGrid()->guttersSize(m_algorithm.grid(), direction, span.startLine(), span.integerSpan(), availableSpace());
 flexFraction = std::max(flexFraction, findFrUnitSize(span, leftOverSpace));






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [268310] trunk/LayoutTests

2020-10-10 Thread obrufau
Title: [268310] trunk/LayoutTests








Revision 268310
Author obru...@igalia.com
Date 2020-10-10 05:50:53 -0700 (Sat, 10 Oct 2020)


Log Message
Fix mac expectations for text-selection.html
https://bugs.webkit.org/show_bug.cgi?id=217475

Reviewed by Alexey Proskuryakov.

In Mojave this test produces a different result than in other platforms.
r268233 already added a Mojave-specific expected.txt, this patch removes
the failure from TestExpectations and removes the Mac-specific
expected.txt, which is identical to the non-platform-specific one.

* platform/mac/TestExpectations:
* platform/mac/imported/w3c/web-platform-tests/css/css-pseudo/text-selection-expected.txt: Removed.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/mac/TestExpectations


Removed Paths

trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/css/css-pseudo/




Diff

Modified: trunk/LayoutTests/ChangeLog (268309 => 268310)

--- trunk/LayoutTests/ChangeLog	2020-10-10 12:49:16 UTC (rev 268309)
+++ trunk/LayoutTests/ChangeLog	2020-10-10 12:50:53 UTC (rev 268310)
@@ -1,3 +1,19 @@
+2020-10-10  Oriol Brufau  
+
+Fix mac expectations for text-selection.html
+https://bugs.webkit.org/show_bug.cgi?id=217475
+
+Reviewed by Alexey Proskuryakov.
+
+In Mojave this test produces a different result than in other platforms.
+r268233 already added a Mojave-specific expected.txt, this patch removes
+the failure from TestExpectations and removes the Mac-specific
+expected.txt, which is identical to the non-platform-specific one.
+
+
+* platform/mac/TestExpectations:
+* platform/mac/imported/w3c/web-platform-tests/css/css-pseudo/text-selection-expected.txt: Removed.
+
 2020-10-09  Hector Lopez  
 
 [ macOS wk2 Debug ] editing/mac/spelling/autocorrection-contraction.html is a constant timeout


Modified: trunk/LayoutTests/platform/mac/TestExpectations (268309 => 268310)

--- trunk/LayoutTests/platform/mac/TestExpectations	2020-10-10 12:49:16 UTC (rev 268309)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2020-10-10 12:50:53 UTC (rev 268310)
@@ -2241,8 +2241,6 @@
 
 webkit.org/b/217461 [ Mojave+ ] imported/w3c/web-platform-tests/css/css-masking/clip-path/svg-clipPath.svg [ Skip ]
 
-webkit.org/b/167729 [ Mojave ] imported/w3c/web-platform-tests/css/css-pseudo/text-selection.html [ Failure ]
-
 webkit.org/b/217542 imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/processing-after-resume.https.html [ Pass Failure ]
 
 webkit.org/b/217543 webaudio/OfflineAudioContext/onstatechange.html [ Pass Failure ]






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [267940] trunk

2020-10-03 Thread obrufau
Title: [267940] trunk








Revision 267940
Author obru...@igalia.com
Date 2020-10-03 18:58:51 -0700 (Sat, 03 Oct 2020)


Log Message
[css-lists] Implement list-style-type: 
https://bugs.webkit.org/show_bug.cgi?id=167729

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update test expectations, and await document.fonts.ready in a test with Ahem.

* web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt:
* web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt:
* web-platform-tests/css/css-pseudo/marker-hit-testing-expected.txt:
* web-platform-tests/css/css-pseudo/marker-intrinsic-contribution-001-expected.txt:
* web-platform-tests/css/css-pseudo/marker-intrinsic-contribution-001.html:

Source/WebCore:

This patch extends the syntax of the list-style-type property to accept
arbitrary string values in order to customize the marker contents.
When a string is specified for list-style-type, the patch sets it to a
special ListStyleType::String, and the string value is stored in an
extra field.

It's a reland of r252076, which got reverted because in some platform
the number of bitfields in GreaterThanOrSameSizeAsStyleRareInheritedData
was actually smaller than in StyleRareInheritedData, due to padding
differences. Hopefully this will no longer be an issue.

Tests: imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001a.html
   imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001b.html
   imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-002.html
   imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-003.html
   imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-007.html
   imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed.html
   imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid.html
   imported/w3c/web-platform-tests/css/css-pseudo/marker-hit-testing.html
   imported/w3c/web-platform-tests/css/css-pseudo/marker-intrinsic-contribution-001.html

Some tests fail because mixed-bidi is not supported in markers
(https://bugs.webkit.org/show_bug.cgi?id=202849).

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSProperties.json:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isPartialKeywordPropertyID):
* css/parser/CSSParserFastPaths.h:
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseSingleValue):
* rendering/RenderListMarker.cpp:
(WebCore::effectiveListMarkerType):
(WebCore::listMarkerSuffix):
(WebCore::listMarkerText):
(WebCore::RenderListMarker::styleDidChange):
(WebCore::RenderListMarker::paint):
(WebCore::RenderListMarker::updateContent):
(WebCore::RenderListMarker::computePreferredLogicalWidths):
(WebCore::RenderListMarker::updateMargins):
(WebCore::RenderListMarker::suffix const):
(WebCore::RenderListMarker::getRelativeMarkerRect):
* rendering/style/CounterContent.h:
(WebCore::CounterContent::CounterContent):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::listStyleStringValue const):
(WebCore::RenderStyle::setListStyleStringValue):
(WebCore::RenderStyle::initialListStyleStringValue):
* rendering/style/RenderStyleConstants.cpp:
(WebCore::operator<<):
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator== const):
* rendering/style/StyleRareInheritedData.h:
* style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyInheritListStyleType):
(WebCore::Style::BuilderCustom::applyInitialListStyleType):
(WebCore::Style::BuilderCustom::applyValueListStyleType):

LayoutTests:

Most tests for 'list-style-type: ' pass now, but some still fail
because mixed-bidi is not supported in markers
(https://bugs.webkit.org/show_bug.cgi?id=202849).

Various tests for the 'content' property in ::marker fail now. This is
expected because they were only passing by chance, since ::marker does
not support 'content' (https://bugs.webkit.org/show_bug.cgi?id=204163).

iOS and Mac have some extra failures due to subpixel differences for the
marker position.

* TestExpectations:
* platform/gtk/imported/w3c/web-platform-tests/css/css-pseudo/marker-intrinsic-contribution-001-expected.txt: Removed.
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:
* platform/mac/imported/w3c/web-platform-tests/css/css-pseudo/text-selection-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/css/css-pseudo/marker-intrinsic-contribution-001-expected.txt: Removed.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed-

[webkit-changes] [267503] trunk

2020-09-23 Thread obrufau
Title: [267503] trunk








Revision 267503
Author obru...@igalia.com
Date 2020-09-23 15:31:47 -0700 (Wed, 23 Sep 2020)


Log Message
[css-grid] Clear the override width for computing percent margins
https://bugs.webkit.org/show_bug.cgi?id=209461

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Update test expectations.

The 2 grid-items-percentage-paddings tests are now expected to have some
failures because of bug 191964. In fact they were already failing before
this patch, as can be seen in wpt.fyi:
https://wpt.fyi/results/css/css-grid/grid-items?q=grid-items-percentage-paddings-vertical-%20-002.html
It's just that the bug that is being fixed made the test runner think
that the tests were passing, probably some racy condition or such.

* web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages-expected.txt:
* web-platform-tests/css/css-grid/grid-items/grid-item-dynamic-min-contribution-001-expected.txt:
* web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001-expected.txt:
* web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002-expected.txt:
* web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-002-expected.txt:

Source/WebCore:

When calculating the min-content contribution of a grid item of an auto
sized grid track we must consider the grid item's margin. When the grid
item's area is indefinite, a percent margin is resolved to zero.
However, when performing a relayout, the percent margin may be solved
against the previously computed grid area, since the grid item has
already an OverrideContainingBlockLogicalWidth value.

In order to re-compute the percent margin properly, we need to clear
the previously override value. It's important to be careful of not
clearing the override value set during intrinsic size, since we need
it for the actual layout phase. Hence, we only reset the 'override'
value when we are executing a definite strategy.

This is a reland of r261841, which was reverted because it broke spotify.
This problem is now avoided thanks to bug 210089.

Tests: imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-dynamic-min-contribution-001.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-003.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-004.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-005.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-006.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-007.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-008.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-009.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-010.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-005.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-006.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-009.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-010.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-002.html

* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::hasRelativeMarginOrPaddingForChild):
(WebCore::hasRelativeOrIntrinsicSizeForChild):
(WebCore::shouldClearOverrideContainingBlockContentSizeForChild):
(WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):
(WebCore::GridTrackSizingAlgorithmStrategy::minLogicalSizeForChild const):
(WebCore::DefiniteSizeStrategy::minLogicalSizeForChild const):
(WebCore::DefiniteSizeStrategy::minContentForChild const):
* rendering/GridTrackSizingAlgorithm.h:

LayoutTests:

Update test expectations.

* TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-dynamic-min-contribution-001-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthog

[webkit-changes] [266675] trunk

2020-09-05 Thread obrufau
Title: [266675] trunk








Revision 266675
Author obru...@igalia.com
Date 2020-09-05 17:26:23 -0700 (Sat, 05 Sep 2020)


Log Message
[css-grid] Use min-content size for intrinsic maximums resolution
https://bugs.webkit.org/show_bug.cgi?id=216142

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Import WPT test.

* web-platform-tests/css/css-grid/layout-algorithm/grid-intrinsic-track-sizes-001-expected.txt: Added.
* web-platform-tests/css/css-grid/layout-algorithm/grid-intrinsic-track-sizes-001.html: Added.
* web-platform-tests/css/css-grid/layout-algorithm/w3c-import.log:

Source/WebCore:

By mistake the specification used to say that, for items spanning
multiple tracks, the growth limits of the tracks with an intrinsic max
track sizing function should grow to accommodate the minimum
contribution of the item.

But this was a mistake, because an intrinsic max track sizing function
can only be min-content or max-content. So instead of distributing the
minimum contribution, it should be the min-content contribution.

The spec has been fixed and there is a CSSWG resolution in
https://github.com/w3c/csswg-drafts/issues/4790

This patch fixes the problem by reverting r207290. The change is likely
web compatible, since it only affects a rare edge case with 'minmax()'
where the min sizing function is 'auto' or a fixed value smaller than
the min-content contribution, the max sizing function is 'min-content',
and an item whose minimum contribution is forced to be different than
the min-content contribution, and spans multiple tracks.

This is a port of https://crrev.com/803871 from Chromium.

Tests: fast/css-grid-layout/grid-intrinsic-maximums.html
   imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-intrinsic-track-sizes-001.html

* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithm::itemSizeForTrackSizeComputationPhase const):

LayoutTests:

Update test expectations. Some are wrong due to bug 216144.

* fast/css-grid-layout/grid-intrinsic-maximums-expected.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/css-grid-layout/grid-intrinsic-maximums-expected.html
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/w3c-import.log
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-intrinsic-track-sizes-001-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-intrinsic-track-sizes-001.html




Diff

Modified: trunk/LayoutTests/ChangeLog (266674 => 266675)

--- trunk/LayoutTests/ChangeLog	2020-09-06 00:11:40 UTC (rev 266674)
+++ trunk/LayoutTests/ChangeLog	2020-09-06 00:26:23 UTC (rev 266675)
@@ -1,5 +1,16 @@
 2020-09-05  Oriol Brufau  
 
+[css-grid] Use min-content size for intrinsic maximums resolution
+https://bugs.webkit.org/show_bug.cgi?id=216142
+
+Reviewed by Darin Adler.
+
+Update test expectations. Some are wrong due to bug 216144.
+
+* fast/css-grid-layout/grid-intrinsic-maximums-expected.html:
+
+2020-09-05  Oriol Brufau  
+
 [css-logical] Ship flow-relative shorthand and offset properties
 https://bugs.webkit.org/show_bug.cgi?id=216178
 


Modified: trunk/LayoutTests/fast/css-grid-layout/grid-intrinsic-maximums-expected.html (266674 => 266675)

--- trunk/LayoutTests/fast/css-grid-layout/grid-intrinsic-maximums-expected.html	2020-09-06 00:11:40 UTC (rev 266674)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-intrinsic-maximums-expected.html	2020-09-06 00:26:23 UTC (rev 266675)
@@ -40,7 +40,7 @@
 
 
 
-
+
  
 
 
@@ -52,7 +52,8 @@
 
 
 
-
+
+
  
 
 
@@ -80,7 +81,7 @@
 
 
 
-
+
  
 
 
@@ -94,7 +95,8 @@
 
 
 
-
+
+
  
 
 
@@ -101,7 +103,7 @@
 
 
 
-
+
  
 
 
@@ -115,7 +117,8 @@
 
 
 
-
+
+
  
 
 


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (266674 => 266675)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-09-06 00:11:40 UTC (rev 266674)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-09-06 00:26:23 UTC (rev 266675)
@@ -1,5 +1,18 @@
 2020-09-05  Oriol Brufau  
 
+[css-grid] Use min-content size for intrinsic maximums resolution
+https://bugs.webkit.org/show_bug.cgi?id=216142
+
+Reviewed by Darin Adler.
+
+Import WPT test.
+
+* web-platform-tests/css/css-grid/layout-algorithm/grid-intrinsic-track-sizes-001-expected.txt: Added.
+* web-platform-tests/css/css-grid/layout-algorithm/grid-intrinsic-track-sizes-001.html: Added.
+* web-platform-tests/css/css-grid/layout-algorithm/w3c-import.log:
+
+2020-09-05  Oriol Brufau  
+
 [css-logical] Ship flow-relative shorthand and offset properties
 https://bugs.webkit.org/show_bug.cgi?

[webkit-changes] [266173] trunk

2020-08-26 Thread obrufau
Title: [266173] trunk








Revision 266173
Author obru...@igalia.com
Date 2020-08-26 10:40:36 -0700 (Wed, 26 Aug 2020)


Log Message
[css-grid] Set available column space before grid items prelayout
https://bugs.webkit.org/show_bug.cgi?id=199648

Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

Import WPT test.

* web-platform-tests/css/css-grid/alignment/self-baseline/grid-self-baseline-008-expected.html: Added.
* web-platform-tests/css/css-grid/alignment/self-baseline/grid-self-baseline-008.html: Added.
* web-platform-tests/css/css-grid/alignment/self-baseline/w3c-import.log:

Source/WebCore:

Before running the grid track sizing algorithm, there is a prelayout
step which takes care of the baseline alignment of the items.
In order to do that, we estimate the size of the grid area, since we
have not calculated the final size yet.

The problem was that, when calculating this estimate, the available
column space had not been set yet. So if a column had a percentage track
sizing function, it would be treated as auto and the estimated size
would be wrong.

This patch sets the available column space so that we can resolve
percentage track sizing functions and get a more correct estimate.

Test: imported/w3c/web-platform-tests/css/css-grid/alignment/self-baseline/grid-self-baseline-008.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/self-baseline/w3c-import.log
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderGrid.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/self-baseline/grid-self-baseline-008-expected.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/self-baseline/grid-self-baseline-008.html




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (266172 => 266173)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-08-26 17:34:57 UTC (rev 266172)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-08-26 17:40:36 UTC (rev 266173)
@@ -1,3 +1,16 @@
+2020-08-26  Oriol Brufau  
+
+[css-grid] Set available column space before grid items prelayout
+https://bugs.webkit.org/show_bug.cgi?id=199648
+
+Reviewed by Javier Fernandez.
+
+Import WPT test.
+
+* web-platform-tests/css/css-grid/alignment/self-baseline/grid-self-baseline-008-expected.html: Added.
+* web-platform-tests/css/css-grid/alignment/self-baseline/grid-self-baseline-008.html: Added.
+* web-platform-tests/css/css-grid/alignment/self-baseline/w3c-import.log:
+
 2020-08-26  Youenn Fablet  
 
 enumerateDevices should expose audiooutput devices that are tied to an audio input device


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/self-baseline/grid-self-baseline-008-expected.html (0 => 266173)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/self-baseline/grid-self-baseline-008-expected.html	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/self-baseline/grid-self-baseline-008-expected.html	2020-08-26 17:40:36 UTC (rev 266173)
@@ -0,0 +1,12 @@
+
+
+
+div {
+  float: left;
+  width: 200px;
+  height: 200px;
+  background: green;
+}
+
+
+


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/self-baseline/grid-self-baseline-008.html (0 => 266173)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/self-baseline/grid-self-baseline-008.html	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/self-baseline/grid-self-baseline-008.html	2020-08-26 17:40:36 UTC (rev 266173)
@@ -0,0 +1,39 @@
+
+
+CSS Grid Layout Test: baseline context and self alignment
+
+
+
+.grid {
+  display: grid;
+  width: 400px;
+  grid-template-columns: 25% 25% 25% 25%;
+  line-height: 0;
+}
+.percent {
+  width: 100%;
+}
+canvas {
+  background: green;
+}
+
+
+  
+  
+  
+
+
+  
+  
+
+
+  
+


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/self-baseline/w3c-import.log (266172 => 266173)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/self-baseline/w3c-import.log	2020-08-26 17:34:57 UTC (rev 266172)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/self-baseline/w3c-import.log	2020-08-26 17:40:36 UTC (rev 266173)
@@ -30,6 +30,8 @@
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/self-baseline/grid-self-baseline-006.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/self-baseline/grid-self-baseline-007-expected.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/self-baseline/grid-self-baseline-007.html
+/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/self-

[webkit-changes] [265020] trunk

2020-07-28 Thread obrufau
Title: [265020] trunk








Revision 265020
Author obru...@igalia.com
Date 2020-07-28 16:41:05 -0700 (Tue, 28 Jul 2020)


Log Message
[css-grid] Fix 'align-content' in grid containers with small content area
https://bugs.webkit.org/show_bug.cgi?id=214370

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Create a WPT test and import another one.

* web-platform-tests/css/css-grid/alignment/grid-place-content-001-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-place-content-001.html: Added.
* web-platform-tests/css/css-sizing/available-height-for-replaced-content-001-expected.txt: Added.
* web-platform-tests/css/css-sizing/available-height-for-replaced-content-001.html: Added.
* web-platform-tests/css/css-sizing/w3c-import.log:

Source/WebCore:

In order to properly obey 'align-content', grid containers need to know
the available grid space for the block axis. But there was a bug when
the sum of border and padding sizes in the block axis were bigger than
the content area. Then the available space was considered to be that sum.

This patch fixes it so that the available grid space is the size of its
content box when that is definite.

Tests: imported/w3c/web-platform-tests/css/css-grid/alignment/grid-place-content-001.html
   imported/w3c/web-platform-tests/css/css-sizing/available-height-for-replaced-content-001.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::availableLogicalHeight const):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/w3c-import.log
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderBox.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-place-content-001-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-place-content-001.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/available-height-for-replaced-content-001-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/available-height-for-replaced-content-001.html




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (265019 => 265020)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-07-28 23:21:53 UTC (rev 265019)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-07-28 23:41:05 UTC (rev 265020)
@@ -1,3 +1,18 @@
+2020-07-28  Oriol Brufau  
+
+[css-grid] Fix 'align-content' in grid containers with small content area
+https://bugs.webkit.org/show_bug.cgi?id=214370
+
+Reviewed by Darin Adler.
+
+Create a WPT test and import another one.
+
+* web-platform-tests/css/css-grid/alignment/grid-place-content-001-expected.txt: Added.
+* web-platform-tests/css/css-grid/alignment/grid-place-content-001.html: Added.
+* web-platform-tests/css/css-sizing/available-height-for-replaced-content-001-expected.txt: Added.
+* web-platform-tests/css/css-sizing/available-height-for-replaced-content-001.html: Added.
+* web-platform-tests/css/css-sizing/w3c-import.log:
+
 2020-07-28  Chris Dumez  
 
 [EventSource] WebKit fails to UTF-8 encode the Last-Event-ID HTTP header value


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-place-content-001-expected.txt (0 => 265020)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-place-content-001-expected.txt	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-place-content-001-expected.txt	2020-07-28 23:41:05 UTC (rev 265020)
@@ -0,0 +1,66 @@
+
+PASS .grid 1 
+PASS .grid 2 
+PASS .grid 3 
+PASS .grid 4 
+PASS .grid 5 
+PASS .grid 6 
+PASS .grid 7 
+PASS .grid 8 
+PASS .grid 9 
+PASS .grid 10 
+PASS .grid 11 
+PASS .grid 12 
+PASS .grid 13 
+PASS .grid 14 
+PASS .grid 15 
+PASS .grid 16 
+PASS .grid 17 
+PASS .grid 18 
+PASS .grid 19 
+PASS .grid 20 
+Small content area
+
+box-sizing: content-box
+X
+ 
+X
+ 
+X
+ 
+X
+ 
+X
+ box-sizing: border-box
+X
+ 
+X
+ 
+X
+ 
+X
+ 
+X
+Big content area
+
+box-sizing: content-box
+X
+ 
+X
+ 
+X
+ 
+X
+ 
+X
+ box-sizing: border-box
+X
+ 
+X
+ 
+X
+ 
+X
+ 
+X
+


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-place-content-001.html (0 => 265020)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-place-content-001.html	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-place-content-001.html	2020-07-28 23:41:05 UTC (rev 265020)
@@ -0,0 +1,139 @@
+
+
+CSS Grid Layout Test: Grid containers support 'place-content'
+
+
+
+
+
+.grid {
+  display: inline-grid;
+  position: relative;
+  vertical-align: top;
+  border: 10px solid black;
+  margin: 5px;
+  font: 40px/1 Ahem;
+  color: cyan;
+}
+.small {
+  padding: 40px;
+}
+.big {
+  padding: 0px;
+}
+.content-box.small {
+  width: 0px;
+  height: 

[webkit-changes] [264465] trunk

2020-07-16 Thread obrufau
Title: [264465] trunk








Revision 264465
Author obru...@igalia.com
Date 2020-07-16 09:59:18 -0700 (Thu, 16 Jul 2020)


Log Message
[css-grid] Fix line name positions after implicit tracks
https://bugs.webkit.org/show_bug.cgi?id=214315

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Expect the tests to pass.

* web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-implicit-track-expected.txt:
* web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-implicit-track-expected.txt:

Source/WebCore:

When serializing grid-template-rows/columns of a grid container, we get
the list of used track sizes, and then insert line names at the
corresponding indices.

Before this patch, these indices were simply taken from the computed
value. However, leading implicit tracks appear in the used value but not
in the computed one. Therefore, we have to offset the indices so that
the line names appear at the proper positions.

This patch is a port of https://crrev.com/777829

Tests: imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-implicit-track.html
   imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-implicit-track.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::populateGridTrackList):
(WebCore::valueForGridTrackList):
* rendering/RenderGrid.h:

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-implicit-track-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-implicit-track-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
trunk/Source/WebCore/rendering/RenderGrid.h




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (264464 => 264465)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-07-16 16:47:31 UTC (rev 264464)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-07-16 16:59:18 UTC (rev 264465)
@@ -1,3 +1,15 @@
+2020-07-16  Oriol Brufau  
+
+[css-grid] Fix line name positions after implicit tracks
+https://bugs.webkit.org/show_bug.cgi?id=214315
+
+Reviewed by Manuel Rego Casasnovas.
+
+Expect the tests to pass.
+
+* web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-implicit-track-expected.txt:
+* web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-implicit-track-expected.txt:
+
 2020-07-16  Carlos Alberto Lopez Perez  
 
 Update WPT tests for css-writing-modes (follow-up fix)


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-implicit-track-expected.txt (264464 => 264465)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-implicit-track-expected.txt	2020-07-16 16:47:31 UTC (rev 264464)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-implicit-track-expected.txt	2020-07-16 16:59:18 UTC (rev 264465)
@@ -1,26 +1,26 @@
 
 PASS Property grid-template-columns value 'none' computes to '10px' 
 PASS Property grid-template-columns value '1px' computes to '10px 1px' 
-FAIL Property grid-template-columns value '1px [a]' computes to '10px 1px [a]' assert_equals: expected "10px 1px [a]" but got "10px [a] 1px"
-FAIL Property grid-template-columns value '1px [a] 2px' computes to '10px 1px [a] 2px' assert_equals: expected "10px 1px [a] 2px" but got "10px [a] 1px 2px"
-FAIL Property grid-template-columns value '[a] 1px' computes to '10px [a] 1px' assert_equals: expected "10px [a] 1px" but got "[a] 10px 1px"
-FAIL Property grid-template-columns value '[a] 1px [b]' computes to '10px [a] 1px [b]' assert_equals: expected "10px [a] 1px [b]" but got "[a] 10px [b] 1px"
+PASS Property grid-template-columns value '1px [a]' computes to '10px 1px [a]' 
+PASS Property grid-template-columns value '1px [a] 2px' computes to '10px 1px [a] 2px' 
+PASS Property grid-template-columns value '[a] 1px' computes to '10px [a] 1px' 
+PASS Property grid-template-columns value '[a] 1px [b]' computes to '10px [a] 1px [b]' 
 PASS Property grid-template-columns value '1px repeat(1, 2px) 3px' computes to '10px 1px 2px 3px' 
 PASS Property grid-template-columns value '1px repeat(auto-fill, 2px) 3px' computes to '10px 1px 2px 3px' 
 PASS Property grid-template-columns value '1px repeat(auto-fit, 2px) 3px' computes to '10px 1px 0px 3px' 
-FAIL Property grid-template-columns value '1px [a] repeat(1, 2px 3px) [b] 4px' computes to '10px 1px [a] 2px 3px [b] 4px' assert_equals: expected "10px 1px [a] 2px 3px [b] 4px" but got "10px [a] 1px 2px [b] 3px 4px"
-FAIL Property grid-template-columns value '1px [a] repeat(auto-fill, 2px 3px) [b] 4px' computes to '10px 1px [a] 2px 3px [b] 4px' assert_equals: expected "10px 1px [a] 2px 3px [b] 4px" but got "10px [a] 1px 2p

[webkit-changes] [264403] trunk/Source/WebCore

2020-07-15 Thread obrufau
Title: [264403] trunk/Source/WebCore








Revision 264403
Author obru...@igalia.com
Date 2020-07-15 10:26:41 -0700 (Wed, 15 Jul 2020)


Log Message
[css-grid] Rename SmallestTrackStart to ExplicitGridStart
https://bugs.webkit.org/show_bug.cgi?id=214347

Reviewed by Manuel Rego Casasnovas.

The SmallestTrackStart method used to return a signed int which was
never positive, representing the smallest untranslated start among all
grid items, clamped by 0 as a maximum.

In practice, though, what we usually want is the index of the first
explicit track/line among all tracks/lines, or equivalently, the number
of leading implicit tracks/lines.

That number is precisely minus the return value of SmallestTrackStart.
Thus, in grid layout there were various std::abs() to invert the value.

But it's a bit confusing to have an API which returns a non-positive
integer, which then needs to be made non-negative. Therefore, this patch
renames SmallestTrackStart to ExplicitGridStart, and makes it return
the unsigned which is usually desired.

This patch should have no effect in practice.

This patch is a port of https://crrev.com/68

* rendering/Grid.cpp:
(WebCore::Grid::setExplicitGridStart):
(WebCore::Grid::explicitGridStart const):
(WebCore::Grid::setNeedsItemsPlacement):
* rendering/Grid.h:
* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithm::rawGridTrackSize const):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeEmptyTracksForAutoRepeat const):
(WebCore::RenderGrid::placeItemsOnGrid const):
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator const):
(WebCore::RenderGrid::gridAreaBreadthForOutOfFlowChild):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/Grid.cpp
trunk/Source/WebCore/rendering/Grid.h
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
trunk/Source/WebCore/rendering/RenderGrid.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (264402 => 264403)

--- trunk/Source/WebCore/ChangeLog	2020-07-15 17:09:25 UTC (rev 264402)
+++ trunk/Source/WebCore/ChangeLog	2020-07-15 17:26:41 UTC (rev 264403)
@@ -1,3 +1,43 @@
+2020-07-15  Oriol Brufau  
+
+[css-grid] Rename SmallestTrackStart to ExplicitGridStart
+https://bugs.webkit.org/show_bug.cgi?id=214347
+
+Reviewed by Manuel Rego Casasnovas.
+
+The SmallestTrackStart method used to return a signed int which was
+never positive, representing the smallest untranslated start among all
+grid items, clamped by 0 as a maximum.
+
+In practice, though, what we usually want is the index of the first
+explicit track/line among all tracks/lines, or equivalently, the number
+of leading implicit tracks/lines.
+
+That number is precisely minus the return value of SmallestTrackStart.
+Thus, in grid layout there were various std::abs() to invert the value.
+
+But it's a bit confusing to have an API which returns a non-positive
+integer, which then needs to be made non-negative. Therefore, this patch
+renames SmallestTrackStart to ExplicitGridStart, and makes it return
+the unsigned which is usually desired.
+
+This patch should have no effect in practice.
+
+This patch is a port of https://crrev.com/68
+
+* rendering/Grid.cpp:
+(WebCore::Grid::setExplicitGridStart):
+(WebCore::Grid::explicitGridStart const):
+(WebCore::Grid::setNeedsItemsPlacement):
+* rendering/Grid.h:
+* rendering/GridTrackSizingAlgorithm.cpp:
+(WebCore::GridTrackSizingAlgorithm::rawGridTrackSize const):
+* rendering/RenderGrid.cpp:
+(WebCore::RenderGrid::computeEmptyTracksForAutoRepeat const):
+(WebCore::RenderGrid::placeItemsOnGrid const):
+(WebCore::RenderGrid::populateExplicitGridAndOrderIterator const):
+(WebCore::RenderGrid::gridAreaBreadthForOutOfFlowChild):
+
 2020-07-15  Chris Dumez  
 
 Unreviewed atttempt to fix build after r264389.


Modified: trunk/Source/WebCore/rendering/Grid.cpp (264402 => 264403)

--- trunk/Source/WebCore/rendering/Grid.cpp	2020-07-15 17:09:25 UTC (rev 264402)
+++ trunk/Source/WebCore/rendering/Grid.cpp	2020-07-15 17:26:41 UTC (rev 264403)
@@ -74,17 +74,15 @@
 setGridItemArea(child, area);
 }
 
-void Grid::setSmallestTracksStart(int rowStart, int columnStart)
+void Grid::setExplicitGridStart(unsigned rowStart, unsigned columnStart)
 {
-ASSERT(rowStart > GridPosition::min() && rowStart < GridPosition::max() - 1);
-ASSERT(columnStart > GridPosition::min() && columnStart < GridPosition::max() - 1);
-m_smallestRowStart = rowStart;
-m_smallestColumnStart = columnStart;
+m_explicitRowStart = rowStart;
+m_explicitColumnStart = columnStart;
 }
 
-int Grid::smallestTrackStart(GridTrackSizingDirection direction) const
+unsigned Grid::explicitGridStart(GridTrackSizingDirection direction) const
 {
-return direction == ForRows ? m_small

[webkit-changes] [262333] trunk/LayoutTests

2020-05-29 Thread obrufau
Title: [262333] trunk/LayoutTests








Revision 262333
Author obru...@igalia.com
Date 2020-05-29 19:10:07 -0700 (Fri, 29 May 2020)


Log Message
[css-grid] Update WPT grid-items-sizing-alignment-001.html
https://bugs.webkit.org/show_bug.cgi?id=169271

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Import updated test and expectation.

* web-platform-tests/css/css-grid/grid-items/grid-items-sizing-alignment-001-expected.html:
* web-platform-tests/css/css-grid/grid-items/grid-items-sizing-alignment-001.html:

LayoutTests:

Expect the test to pass, except on iOS (bug 212493).

* TestExpectations:
* platform/ios/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-sizing-alignment-001-expected.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-sizing-alignment-001.html
trunk/LayoutTests/platform/ios/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (262332 => 262333)

--- trunk/LayoutTests/ChangeLog	2020-05-30 01:19:25 UTC (rev 262332)
+++ trunk/LayoutTests/ChangeLog	2020-05-30 02:10:07 UTC (rev 262333)
@@ -1,3 +1,15 @@
+2020-05-29  Oriol Brufau  
+
+[css-grid] Update WPT grid-items-sizing-alignment-001.html
+https://bugs.webkit.org/show_bug.cgi?id=169271
+
+Reviewed by Manuel Rego Casasnovas.
+
+Expect the test to pass, except on iOS (bug 212493).
+
+* TestExpectations:
+* platform/ios/TestExpectations:
+
 2020-05-29  Saam Barati  
 
 Skip a few more JSC tests when $memoryLimited


Modified: trunk/LayoutTests/TestExpectations (262332 => 262333)

--- trunk/LayoutTests/TestExpectations	2020-05-30 01:19:25 UTC (rev 262332)
+++ trunk/LayoutTests/TestExpectations	2020-05-30 02:10:07 UTC (rev 262333)
@@ -1055,7 +1055,6 @@
 webkit.org/b/136754 css3/flexbox/csswg/ttwf-reftest-flex-wrap.html [ ImageOnlyFailure ]
 
 # grid layout tests
-webkit.org/b/169271 imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-sizing-alignment-001.html [ ImageOnlyFailure ]
 webkit.org/b/191465 imported/w3c/web-platform-tests/css/css-grid/abspos/absolute-positioning-changing-containing-block-001.html [ ImageOnlyFailure ]
 webkit.org/b/191465 imported/w3c/web-platform-tests/css/css-grid/abspos/grid-item-absolute-positioning-dynamic-001.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-010.html [ Pass Failure ]


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (262332 => 262333)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-05-30 01:19:25 UTC (rev 262332)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-05-30 02:10:07 UTC (rev 262333)
@@ -1,3 +1,15 @@
+2020-05-29  Oriol Brufau  
+
+[css-grid] Update WPT grid-items-sizing-alignment-001.html
+https://bugs.webkit.org/show_bug.cgi?id=169271
+
+Reviewed by Manuel Rego Casasnovas.
+
+Import updated test and expectation.
+
+* web-platform-tests/css/css-grid/grid-items/grid-items-sizing-alignment-001-expected.html:
+* web-platform-tests/css/css-grid/grid-items/grid-items-sizing-alignment-001.html:
+
 2020-05-29  Chris Dumez  
 
 Update web-platform-tests/tools from upstream


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-sizing-alignment-001-expected.html (262332 => 262333)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-sizing-alignment-001-expected.html	2020-05-30 01:19:25 UTC (rev 262332)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-sizing-alignment-001-expected.html	2020-05-30 02:10:07 UTC (rev 262333)
@@ -2,6 +2,11 @@
 
 CSS Reftest Reference: Grid Item Sizing
 +
+  button {
+margin: 0; /* Prevent WebKit from adding some margin */
+  }
+
 
 Test passes if it has the same output than the reference.
 


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-sizing-alignment-001.html (262332 => 262333)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-sizing-alignment-001.html	2020-05-30 01:19:25 UTC (rev 262332)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-sizing-alignment-001.html	2020-05-30 02:10:07 UTC (rev 262333)
@@ -11,6 +11,9 @@
 grid-auto-rows: 200px;
 grid-template-columns: repeat(3, 200px);
   }
+  button {
+margin: 0; /* Prevent WebKit from adding some margin */
+  }
 
 
 Test passes if it has the same output than the reference.


Modified: trunk/LayoutTests/platform/ios/TestExpectations (262332 => 262333)

--- trunk/LayoutTests/platform/ios/TestExpectations	2020-05-30 01:19:25 UTC (rev 262332)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2020-05-30 02:10:07 UTC (rev 2

[webkit-changes] [262262] trunk

2020-05-28 Thread obrufau
Title: [262262] trunk








Revision 262262
Author obru...@igalia.com
Date 2020-05-28 15:03:34 -0700 (Thu, 28 May 2020)


Log Message
[css-grid] Fix referencing grid line names with auto repeat()
https://bugs.webkit.org/show_bug.cgi?id=209572

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Import WPT tests.

* web-platform-tests/css/css-grid/placement/grid-placement-using-named-grid-lines-008-expected.xht: Added.
* web-platform-tests/css/css-grid/placement/grid-placement-using-named-grid-lines-008.html: Added.
* web-platform-tests/css/css-grid/placement/grid-placement-using-named-grid-lines-009-expected.xht: Added.
* web-platform-tests/css/css-grid/placement/grid-placement-using-named-grid-lines-009.html: Added.
* web-platform-tests/css/css-grid/placement/w3c-import.log:

Source/WebCore:

This patch fixes multiple problems when referencing named grid lines with the presence of
the auto repeat() syntax:

  - If the 1st track was defined with auto repeat(), then the code used to assume that the
referenced line appeared after the repeated tracks. But it may actually precede them.

  - If the referenced line appeared both inside and outside the auto repeat(), then it
could resolve to the outside raw index, without expanding the auto repeat().

  - The logic for placing a placement property set to both an integer and an identifier
was wrong with auto repeat().
This patch fixes it by using the same proper logic that was already implemented in
OrderedNamedLinesCollectorInGridLayout::collectLineNamesForIndex

  - The indices of both implicit grid lines defined with grid-template-areas and explicit
ones defined with grid-template-rows/columns used to be stored together in
NamedGridColumnLines and NamedGridRowLines. This was problematic because the former
indices already refer to the final explicit grid so they don't have to be increased when
expanding an auto repeat(), but the latter ones should.
Therefore, this patch stores the indices in separate fields and uses the correct logic
for each one. This also fixes 'grid-template-areas: inherit'.

This patch is a port of these Chromium patches:
  - https://crrev.com/744426
  - https://crrev.com/745925
  - https://crrev.com/747631
  - https://crrev.com/747669
  - https://crrev.com/771984

Tests: imported/w3c/web-platform-tests/css/css-grid/placement/grid-placement-using-named-grid-lines-002.html
   imported/w3c/web-platform-tests/css/css-grid/placement/grid-placement-using-named-grid-lines-004.html
   imported/w3c/web-platform-tests/css/css-grid/placement/grid-placement-using-named-grid-lines-005.html
   imported/w3c/web-platform-tests/css/css-grid/placement/grid-placement-using-named-grid-lines-008.html
   imported/w3c/web-platform-tests/css/css-grid/placement/grid-placement-using-named-grid-lines-009.html

* rendering/style/GridPositionsResolver.cpp:
(WebCore::NamedLineCollection::NamedLineCollection):
(WebCore::NamedLineCollection::hasExplicitNamedLines const):
(WebCore::NamedLineCollection::hasNamedLines const):
(WebCore::NamedLineCollection::contains const):
(WebCore::NamedLineCollection::firstExplicitPosition const):
(WebCore::NamedLineCollection::firstPosition const):
* rendering/style/GridPositionsResolver.h:
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::implicitNamedGridColumnLines const):
(WebCore::RenderStyle::implicitNamedGridRowLines const):
(WebCore::RenderStyle::setImplicitNamedGridColumnLines):
(WebCore::RenderStyle::setImplicitNamedGridRowLines):
* rendering/style/StyleGridData.cpp:
(WebCore::StyleGridData::StyleGridData):
* rendering/style/StyleGridData.h:
(WebCore::StyleGridData::operator== const):
* style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyInitialGridTemplateAreas):
(WebCore::Style::BuilderCustom::applyInheritGridTemplateAreas):
(WebCore::Style::BuilderCustom::applyValueGridTemplateAreas):

Modified Paths

trunk/LayoutTests/TestExpectations
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/placement/w3c-import.log
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/style/GridPositionsResolver.cpp
trunk/Source/WebCore/rendering/style/GridPositionsResolver.h
trunk/Source/WebCore/rendering/style/RenderStyle.h
trunk/Source/WebCore/rendering/style/StyleGridData.cpp
trunk/Source/WebCore/rendering/style/StyleGridData.h
trunk/Source/WebCore/style/StyleBuilderCustom.h


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/placement/grid-placement-using-named-grid-lines-008-expected.xht
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/placement/grid-placement-using-named-grid-lines-008.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/placement/grid-placement-using-named-grid-lines-009-expected.xht
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/placement/grid-placement-using-named-grid-lines-009.html




Diff

Modified: trunk/L

[webkit-changes] [262130] trunk

2020-05-25 Thread obrufau
Title: [262130] trunk








Revision 262130
Author obru...@igalia.com
Date 2020-05-25 13:39:45 -0700 (Mon, 25 May 2020)


Log Message
[css-grid] Prevent grid-template-rows from serializing adjacent 
https://bugs.webkit.org/show_bug.cgi?id=212345

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Update test expectations.

* web-platform-tests/css/css-grid/parsing/grid-shorthand-expected.txt:
* web-platform-tests/css/css-grid/parsing/grid-shorthand-valid-expected.txt:
* web-platform-tests/css/css-grid/parsing/grid-template-shorthand-expected.txt:
* web-platform-tests/css/css-grid/parsing/grid-template-shorthand-valid-expected.txt:

Source/WebCore:

The parser for the grid-template shorthand has this code:

// Persists between loop iterations so we can use the same value for
// consecutive  values
RefPtr lineNames;

However, this wasn't working because of a lineNames.releaseNonNull() at
the end of the loop. So each iteration started with a null lineNames, and
consecutive  values were not merged together.

Tests: fast/css-grid-layout/grid-template-shorthand-get-set.html
   imported/w3c/web-platform-tests/css/css-grid/parsing/grid-shorthand.html
   imported/w3c/web-platform-tests/css/css-grid/parsing/grid-shorthand-valid.html
   imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-shorthand.html
   imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-shorthand-valid.html

* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::consumeGridTemplateRowsAndAreasAndColumns):

LayoutTests:

Update test expectations.

* fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt:
* fast/css-grid-layout/grid-template-shorthand-get-set.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt
trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set.html
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-shorthand-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-shorthand-valid-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-shorthand-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-shorthand-valid-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (262129 => 262130)

--- trunk/LayoutTests/ChangeLog	2020-05-25 19:25:51 UTC (rev 262129)
+++ trunk/LayoutTests/ChangeLog	2020-05-25 20:39:45 UTC (rev 262130)
@@ -1,3 +1,15 @@
+2020-05-25  Oriol Brufau  
+
+[css-grid] Prevent grid-template-rows from serializing adjacent 
+https://bugs.webkit.org/show_bug.cgi?id=212345
+
+Reviewed by Manuel Rego Casasnovas.
+
+Update test expectations.
+
+* fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt:
+* fast/css-grid-layout/grid-template-shorthand-get-set.html:
+
 2020-05-25  Zalan Bujtas  
 
 [Subpixel layout] Bad scrolling on mercurynews.com article


Modified: trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt (262129 => 262130)

--- trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt	2020-05-25 19:25:51 UTC (rev 262129)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt	2020-05-25 20:39:45 UTC (rev 262130)
@@ -177,7 +177,7 @@
 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "100px"
 PASS element.style.gridTemplateColumns is "100px"
 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "[foo1 bar1] 50px [foo2 bar2 foo3 bar3] 50px [foo4 bar4]"
-PASS element.style.gridTemplateRows is "[foo1 bar1] 50px [foo2 bar2] [foo3 bar3] 50px [foo4 bar4]"
+PASS element.style.gridTemplateRows is "[foo1 bar1] 50px [foo2 bar2 foo3 bar3] 50px [foo4 bar4]"
 PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "\"a\" \"b\""
 PASS element.style.gridTemplateAreas is "\"a\" \"b\""
 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "0px"


Modified: trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set.html (262129 => 262130)

--- trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set.html	2020-05-25 19:25:51 UTC (rev 262129)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set.html	2020-05-25 20:39:45 UTC (rev 262130)
@@ -267,7 +267,7 @@
 debug("Test getting and setting grid-template shorthand through JS");
 testGridDefinitionsSetJSValues("66px / 18px", "18px", "66px", "none");
 testGridDefinitionsSetJSValues("[head] 'a' 15px [tail] / 10px", "10px", "[head] 15px [tail]", "\"a\"");
-testGridDefinitionsSetJSValues("[foo1 bar1] 'a' 50px [foo2 

[webkit-changes] [262061] trunk

2020-05-22 Thread obrufau
Title: [262061] trunk








Revision 262061
Author obru...@igalia.com
Date 2020-05-22 09:45:36 -0700 (Fri, 22 May 2020)


Log Message
Don't put out-of-flow boxes in anonymous flex/grid items
https://bugs.webkit.org/show_bug.cgi?id=205386

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

A single anonymous flex/grid item should just contain a contiguous
sequence of text runs.

This patch is based on https://crrev.com/533825 from Chromium.

Tests: imported/w3c/web-platform-tests/css/css-flexbox/anonymous-flex-item-004.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/anonymous-grid-item-001.html

* rendering/updating/RenderTreeBuilderBlock.cpp:
(WebCore::RenderTreeBuilder::Block::attachIgnoringContinuation):

LayoutTests:

Expect tests to pass.

* TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (262060 => 262061)

--- trunk/LayoutTests/ChangeLog	2020-05-22 16:42:58 UTC (rev 262060)
+++ trunk/LayoutTests/ChangeLog	2020-05-22 16:45:36 UTC (rev 262061)
@@ -1,3 +1,14 @@
+2020-05-22  Oriol Brufau  
+
+Don't put out-of-flow boxes in anonymous flex/grid items
+https://bugs.webkit.org/show_bug.cgi?id=205386
+
+Reviewed by Manuel Rego Casasnovas.
+
+Expect tests to pass.
+
+* TestExpectations:
+
 2020-05-22  Myles C. Maxfield  
 
 [Cocoa] fast/text/font-collection.html is failing


Modified: trunk/LayoutTests/TestExpectations (262060 => 262061)

--- trunk/LayoutTests/TestExpectations	2020-05-22 16:42:58 UTC (rev 262060)
+++ trunk/LayoutTests/TestExpectations	2020-05-22 16:45:36 UTC (rev 262061)
@@ -1059,7 +1059,6 @@
 imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-013.html [ Pass Failure ]
 imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-015.html [ Pass Failure ]
 webkit.org/b/191367 imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-ignores-first-letter-002.html [ ImageOnlyFailure ]
-webkit.org/b/191460 imported/w3c/web-platform-tests/css/css-grid/grid-items/anonymous-grid-item-001.html [ Skip ]
 webkit.org/b/191461 imported/w3c/web-platform-tests/css/css-grid/grid-items/percentage-size-subitems-001.html [ ImageOnlyFailure ]
 webkit.org/b/191462 imported/w3c/web-platform-tests/css/css-grid/grid-items/percentage-size-replaced-subitems-001.html [ ImageOnlyFailure ]
 webkit.org/b/191463 imported/w3c/web-platform-tests/css/css-grid/grid-items/explicitly-sized-grid-item-as-table.html [ ImageOnlyFailure ]
@@ -4239,7 +4238,6 @@
 webkit.org/b/210093 imported/w3c/web-platform-tests/css/css-flexbox/select-element-zero-height-001.html [ ImageOnlyFailure ]
 webkit.org/b/210093 imported/w3c/web-platform-tests/css/css-flexbox/select-element-zero-height-002.html [ ImageOnlyFailure ]
 webkit.org/b/210102 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-auto-min-width.html [ ImageOnlyFailure ]
-webkit.org/b/210144 imported/w3c/web-platform-tests/css/css-flexbox/anonymous-flex-item-004.html [ ImageOnlyFailure ]
 webkit.org/b/210144 imported/w3c/web-platform-tests/css/css-flexbox/anonymous-flex-item-005.html [ ImageOnlyFailure ]
 webkit.org/b/210465 imported/w3c/web-platform-tests/css/css-flexbox/flex-wrap-002.html [ ImageOnlyFailure ]
 webkit.org/b/210475 imported/w3c/web-platform-tests/css/css-flexbox/image-items-flake-001.html [ ImageOnlyFailure ]


Modified: trunk/Source/WebCore/ChangeLog (262060 => 262061)

--- trunk/Source/WebCore/ChangeLog	2020-05-22 16:42:58 UTC (rev 262060)
+++ trunk/Source/WebCore/ChangeLog	2020-05-22 16:45:36 UTC (rev 262061)
@@ -1,3 +1,21 @@
+2020-05-22  Oriol Brufau  
+
+Don't put out-of-flow boxes in anonymous flex/grid items
+https://bugs.webkit.org/show_bug.cgi?id=205386
+
+Reviewed by Manuel Rego Casasnovas.
+
+A single anonymous flex/grid item should just contain a contiguous
+sequence of text runs.
+
+This patch is based on https://crrev.com/533825 from Chromium.
+
+Tests: imported/w3c/web-platform-tests/css/css-flexbox/anonymous-flex-item-004.html
+   imported/w3c/web-platform-tests/css/css-grid/grid-items/anonymous-grid-item-001.html
+
+* rendering/updating/RenderTreeBuilderBlock.cpp:
+(WebCore::RenderTreeBuilder::Block::attachIgnoringContinuation):
+
 2020-05-22  Tim Horton  
 
 iOS: Pressing tab in the Mail subject field moves focus to the body, but pressing shift tab doesn't move it back


Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp (262060 => 262061)

--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp	2020-05-22 16:42:58 UTC (rev 262060)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp	2020-05-22 16:45:36 UTC (rev 262061)
@@ -222,7 +222,7 @@
   

[webkit-changes] [262033] trunk

2020-05-21 Thread obrufau
Title: [262033] trunk








Revision 262033
Author obru...@igalia.com
Date 2020-05-21 15:59:01 -0700 (Thu, 21 May 2020)


Log Message
[css-grid] Don't create renderers for whitespace nodes
https://bugs.webkit.org/show_bug.cgi?id=212220

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Import WPT test.

* web-platform-tests/css/css-grid/grid-items/w3c-import.log:
* web-platform-tests/css/css-grid/grid-items/whitespace-in-grid-item-001-expected.html: Added.
* web-platform-tests/css/css-grid/grid-items/whitespace-in-grid-item-001.html: Added.

Source/WebCore:

Even with 'white-space: pre' we shouldn't create RenderTexts
for whitespace-only nodes in grid layout, according to
https://drafts.csswg.org/css-grid/#grid-items

This patch is based on https://codereview.chromium.org/16888008

Tests: fast/text/simple-line-layout-with-zero-sized-font.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/whitespace-in-grid-item-001.html

* rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::textRendererIsNeeded):

LayoutTests:

Update test expectation.

* fast/text/simple-line-layout-with-zero-sized-font-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/text/simple-line-layout-with-zero-sized-font-expected.txt
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/w3c-import.log
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/whitespace-in-grid-item-001-expected.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/whitespace-in-grid-item-001.html




Diff

Modified: trunk/LayoutTests/ChangeLog (262032 => 262033)

--- trunk/LayoutTests/ChangeLog	2020-05-21 22:30:01 UTC (rev 262032)
+++ trunk/LayoutTests/ChangeLog	2020-05-21 22:59:01 UTC (rev 262033)
@@ -1,3 +1,14 @@
+2020-05-21  Oriol Brufau  
+
+[css-grid] Don't create renderers for whitespace nodes
+https://bugs.webkit.org/show_bug.cgi?id=212220
+
+Reviewed by Manuel Rego Casasnovas.
+
+Update test expectation.
+
+* fast/text/simple-line-layout-with-zero-sized-font-expected.txt:
+
 2020-05-21  Diego Pino Garcia  
 
 [GTK] Gardening, update expectations after r262016


Modified: trunk/LayoutTests/fast/text/simple-line-layout-with-zero-sized-font-expected.txt (262032 => 262033)

--- trunk/LayoutTests/fast/text/simple-line-layout-with-zero-sized-font-expected.txt	2020-05-21 22:30:01 UTC (rev 262032)
+++ trunk/LayoutTests/fast/text/simple-line-layout-with-zero-sized-font-expected.txt	2020-05-21 22:59:01 UTC (rev 262033)
@@ -1,2 +1,2 @@
 PASS if no assert in debug.
-	
+


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (262032 => 262033)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-05-21 22:30:01 UTC (rev 262032)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-05-21 22:59:01 UTC (rev 262033)
@@ -1,3 +1,16 @@
+2020-05-21  Oriol Brufau  
+
+[css-grid] Don't create renderers for whitespace nodes
+https://bugs.webkit.org/show_bug.cgi?id=212220
+
+Reviewed by Manuel Rego Casasnovas.
+
+Import WPT test.
+
+* web-platform-tests/css/css-grid/grid-items/w3c-import.log:
+* web-platform-tests/css/css-grid/grid-items/whitespace-in-grid-item-001-expected.html: Added.
+* web-platform-tests/css/css-grid/grid-items/whitespace-in-grid-item-001.html: Added.
+
 2020-05-20  Oriol Brufau  
 
 Computed min-width/height for auto depends on box


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/w3c-import.log (262032 => 262033)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/w3c-import.log	2020-05-21 22:30:01 UTC (rev 262032)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/w3c-import.log	2020-05-21 22:59:01 UTC (rev 262033)
@@ -259,3 +259,5 @@
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/ref-filled-green-100px-square-image.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/table-with-infinite-max-intrinsic-width-expected.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/table-with-infinite-max-intrinsic-width.html
+/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/whitespace-in-grid-item-001-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/whitespace-in-grid-item-001.html


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/whitespace-in-grid-item-001-expected.html (0 => 262033)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/whitespace-in-grid-item-001-expected.html	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/whitespace-in-grid-item-001

[webkit-changes] [261974] trunk

2020-05-20 Thread obrufau
Title: [261974] trunk








Revision 261974
Author obru...@igalia.com
Date 2020-05-20 17:12:45 -0700 (Wed, 20 May 2020)


Log Message
Computed min-width/height for auto depends on box
https://bugs.webkit.org/show_bug.cgi?id=209651

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Update test expectations.

* web-platform-tests/css/css-flexbox/getcomputedstyle/flexbox_computedstyle_min-auto-size-expected.txt:
* web-platform-tests/css/css-grid/grid-items/grid-item-min-auto-size-001-expected.txt:

Source/WebCore:

Resolved value of min-width and min-height for auto min sizing of flex
and grid items may be 'auto'. We based this on the computed style of the
shadow including parent. Instead we should rely on whether the element
will actually be a rendered flex/grid item.

The difference matters e.g. when the parent has 'display: contents' and
thus is not a flex nor grid container, but the element can still be a
flex or grid item, depending on the grand-parent.

This patch is based on https://crrev.com/540901 from Chromium.

Tests: imported/w3c/web-platform-tests/css/css-flexbox/getcomputedstyle/flexbox_computedstyle_min-auto-size.html
   imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-min-auto-size-001.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::isFlexOrGridItem):
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/getcomputedstyle/flexbox_computedstyle_min-auto-size-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-min-auto-size-001-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (261973 => 261974)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-05-21 00:02:31 UTC (rev 261973)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-05-21 00:12:45 UTC (rev 261974)
@@ -1,5 +1,17 @@
 2020-05-20  Oriol Brufau  
 
+Computed min-width/height for auto depends on box
+https://bugs.webkit.org/show_bug.cgi?id=209651
+
+Reviewed by Manuel Rego Casasnovas.
+
+Update test expectations.
+
+* web-platform-tests/css/css-flexbox/getcomputedstyle/flexbox_computedstyle_min-auto-size-expected.txt:
+* web-platform-tests/css/css-grid/grid-items/grid-item-min-auto-size-001-expected.txt:
+
+2020-05-20  Oriol Brufau  
+
 [css-grid] Fix auto repeat with multiple tracks and gutters
 https://bugs.webkit.org/show_bug.cgi?id=182922
 


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/getcomputedstyle/flexbox_computedstyle_min-auto-size-expected.txt (261973 => 261974)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/getcomputedstyle/flexbox_computedstyle_min-auto-size-expected.txt	2020-05-21 00:02:31 UTC (rev 261973)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/getcomputedstyle/flexbox_computedstyle_min-auto-size-expected.txt	2020-05-21 00:12:45 UTC (rev 261974)
@@ -1,6 +1,6 @@
 
 PASS Computed min-width/min-height of specified auto for flex item. 
-FAIL Computed min-width/min-height of specified auto inside display:none which would otherwise have been a flex item. assert_equals: expected "0px" but got "auto"
-FAIL Computed min-width/min-height of specified auto for flex item inside display:contents. assert_equals: expected "auto" but got "0px"
-FAIL Computed min-width/min-height of specified auto with display:none which would otherwise have been a flex item. assert_equals: expected "0px" but got "auto"
+PASS Computed min-width/min-height of specified auto inside display:none which would otherwise have been a flex item. 
+PASS Computed min-width/min-height of specified auto for flex item inside display:contents. 
+PASS Computed min-width/min-height of specified auto with display:none which would otherwise have been a flex item. 
 


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-min-auto-size-001-expected.txt (261973 => 261974)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-min-auto-size-001-expected.txt	2020-05-21 00:02:31 UTC (rev 261973)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-min-auto-size-001-expected.txt	2020-05-21 00:12:45 UTC (rev 261974)
@@ -1,6 +1,6 @@
 
 PASS Computed min-width/min-height of specified auto for grid item. 
-FAIL Computed min-width/min-height of specified auto inside display:none which would otherwise have been a grid item. assert_equals: expected "0px" but got "auto"
-FAIL Computed min-width/min-height of specified auto for grid item inside display:contents. assert_equals: expected "auto" but got "0px"
-FAIL Computed min-width/min-height of specified auto with display:none which would otherwise have been a grid 

[webkit-changes] [261949] trunk

2020-05-20 Thread obrufau
Title: [261949] trunk








Revision 261949
Author obru...@igalia.com
Date 2020-05-20 13:24:52 -0700 (Wed, 20 May 2020)


Log Message
[css-grid] Fix auto repeat with multiple tracks and gutters
https://bugs.webkit.org/show_bug.cgi?id=182922

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Import WPT test.

* web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-multiple-values-001-expected.html: Added.
* web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-multiple-values-001.html: Added.
* web-platform-tests/css/css-grid/grid-definition/w3c-import.log:

Source/WebCore:

The code that computes the number of auto repeat tracks wrongly assumes
that the second argument of the repeat() notation is a single track
function. That was true in the beginning, however specs were later on
modified to allow a . We support a  as a second
argument since long ago but the code that computes the number of
auto-repeat tracks was never updated.

This patch modifies two places that relate to the gaps between the
auto-repeat tracks, which ensures the proper total length.

This is a port of https://crrev.com/620278 from Chromium.

Tests: fast/css-grid-layout/grid-auto-repeat-huge-grid.html
   imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-multiple-values-001.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeAutoRepeatTracksCount const):

LayoutTests:

Update test expectations.

* fast/css-grid-layout/grid-auto-repeat-huge-grid.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/css-grid-layout/grid-auto-repeat-huge-grid.html
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/w3c-import.log
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderGrid.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-multiple-values-001-expected.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-multiple-values-001.html




Diff

Modified: trunk/LayoutTests/ChangeLog (261948 => 261949)

--- trunk/LayoutTests/ChangeLog	2020-05-20 20:23:38 UTC (rev 261948)
+++ trunk/LayoutTests/ChangeLog	2020-05-20 20:24:52 UTC (rev 261949)
@@ -1,3 +1,14 @@
+2020-05-20  Oriol Brufau  
+
+[css-grid] Fix auto repeat with multiple tracks and gutters
+https://bugs.webkit.org/show_bug.cgi?id=182922
+
+Reviewed by Manuel Rego Casasnovas.
+
+Update test expectations.
+
+* fast/css-grid-layout/grid-auto-repeat-huge-grid.html:
+
 2020-05-20  Chris Dumez  
 
 Disable support for BeforeLoadEvent


Modified: trunk/LayoutTests/fast/css-grid-layout/grid-auto-repeat-huge-grid.html (261948 => 261949)

--- trunk/LayoutTests/fast/css-grid-layout/grid-auto-repeat-huge-grid.html	2020-05-20 20:23:38 UTC (rev 261948)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-auto-repeat-huge-grid.html	2020-05-20 20:24:52 UTC (rev 261949)
@@ -180,8 +180,8 @@
 autoFillGridElementCols.style.gridGap = "100px";
 autoFitGridElementCols.style.gridGap = "100px";
 
-getTracksCheckingLength(autoFillGridElementCols, "grid-template-columns", 130, ["wideGrid", "lotsOfAutoRepeatWithAutoFillCols"]);
-getTracksCheckingLength(autoFitGridElementCols, "grid-template-columns", 82, ["wideGrid", "lotsOfAutoRepeatWithAutoFitCols"]);
+getTracksCheckingLength(autoFillGridElementCols, "grid-template-columns", 30, ["wideGrid", "lotsOfAutoRepeatWithAutoFillCols"]);
+getTracksCheckingLength(autoFitGridElementCols, "grid-template-columns", 34, ["wideGrid", "lotsOfAutoRepeatWithAutoFitCols"]);
 
 autoFillGridElementCols.style.gridGap = "0px";
 autoFitGridElementCols.style.gridGap = "0px";
@@ -202,8 +202,8 @@
 autoFillGridElementRows.style.gridGap = "100px";
 autoFitGridElementRows.style.gridGap = "100px";
 
-getTracksCheckingLength(autoFillGridElementRows, "grid-template-rows", 130, ["tallGrid", "lotsOfAutoRepeatWithAutoFillRows"]);
-getTracksCheckingLength(autoFitGridElementRows, "grid-template-rows", 82, ["tallGrid", "lotsOfAutoRepeatWithAutoFitRows"]);
+getTracksCheckingLength(autoFillGridElementRows, "grid-template-rows", 30, ["tallGrid", "lotsOfAutoRepeatWithAutoFillRows"]);
+getTracksCheckingLength(autoFitGridElementRows, "grid-template-rows", 34, ["tallGrid", "lotsOfAutoRepeatWithAutoFitRows"]);
 
 autoFillGridElementRows.style.gridGap = "0px";
 autoFitGridElementRows.style.gridGap = "0px";


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (261948 => 261949)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-05-20 20:23:38 UTC (rev 261948)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-05-20 20:24:52 UTC (rev 261949)
@@ -1,5 +1,18 @@
 2020-05-20  Oriol Brufau  
 
+[css-grid] Fix auto repeat with multiple tracks and gutters
+https://bugs.webkit.org/show_bug.cgi?id=182922
+
+

[webkit-changes] [261907] trunk

2020-05-20 Thread obrufau
Title: [261907] trunk








Revision 261907
Author obru...@igalia.com
Date 2020-05-20 00:11:26 -0700 (Wed, 20 May 2020)


Log Message
Fix computeMarginLogicalSizeForChild to check auto margins in the right axis
https://bugs.webkit.org/show_bug.cgi?id=212113

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Import last version of this WPT test.

* web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001-expected.txt:
* web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001.html:

Source/WebCore:

GridLayoutFunctions::computeMarginLogicalSizeForChild checks for 'auto'
margins before retrieving the margin size, since these should be treated
as 0. However, for orthogonal grid items, it used to check the wrong axis.
So if an item had 'margin-top: auto' and 'margin-left: 5px', when asking
for the horizontal margin we could get 0px instead of 5px due to the
auto margin in the vertical axis.

Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001.html

* rendering/GridLayoutFunctions.cpp:
(WebCore::GridLayoutFunctions::computeMarginLogicalSizeForChild):
(WebCore::GridLayoutFunctions::marginLogicalSizeForChild):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/GridLayoutFunctions.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (261906 => 261907)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-05-20 05:44:29 UTC (rev 261906)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-05-20 07:11:26 UTC (rev 261907)
@@ -1,3 +1,15 @@
+2020-05-20  Oriol Brufau  
+
+Fix computeMarginLogicalSizeForChild to check auto margins in the right axis
+https://bugs.webkit.org/show_bug.cgi?id=212113
+
+Reviewed by Manuel Rego Casasnovas.
+
+Import last version of this WPT test.
+
+* web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001-expected.txt:
+* web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001.html:
+
 2020-05-19  Oriol Brufau  
 
 Fix marginLogicalSizeForChild to check auto margins in the right axis


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001-expected.txt (261906 => 261907)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001-expected.txt	2020-05-20 05:44:29 UTC (rev 261906)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001-expected.txt	2020-05-20 07:11:26 UTC (rev 261907)
@@ -43,6 +43,8 @@
 PASS .grid 42 
 PASS .grid 43 
 PASS .grid 44 
+PASS .grid 45 
+PASS .grid 46 
 Direction LTR
 
 Item width: 60px;
@@ -49,6 +51,7 @@
 Item min-width: 60px;
 Item width: 60px; & margin-left: 5px;
 Item min-width: 60px; & margin-left: 5px;
+Item min-width: 60px; & margin-left: 5px; & margin-top: auto
 Item width: 60px; & margin-right: 10px;
 Item min-width: 60px; & margin-right: 10px;
 Item width: 60px; & margin-left: 5px; & margin-right: 10px;
@@ -73,6 +76,7 @@
 Item min-width: 60px;
 Item width: 60px; & margin-left: 5px;
 Item min-width: 60px; & margin-left: 5px;
+Item min-width: 60px; & margin-left: 5px; & margin-top: auto
 Item width: 60px; & margin-right: 10px;
 Item min-width: 60px; & margin-right: 10px;
 Item width: 60px; & margin-left: 5px; & margin-right: 10px;


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001.html (261906 => 261907)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001.html	2020-05-20 05:44:29 UTC (rev 261906)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001.html	2020-05-20 07:11:26 UTC (rev 261907)
@@ -20,6 +20,7 @@
 
 .marginLeft5 { margin-left: 5px; }
 .marginRight10 { margin-right: 10px; }
+.marginTopAuto { margin-top: auto }
 
 .paddingLeft6 { padding-left: 6px; }
 .paddingRight3 { padding-right: 3px; }
@@ -66,6 +67,13 @@
   
 
 
+Item min-width: 60px; & margin-left: 5px; & margin-top: auto
+
+
+  
+  
+
+
 Item width: 60px; & margin-right: 10px;
 
 
@@ -222,6 +230,13 @@
   
 
 
+Item min-width: 60px; & margin-left: 5px; & margin-top: auto
+
+
+  
+  
+
+
 Item width: 60px; & margin-right: 10px;
 
 


Modified: trunk/Source/WebCore/ChangeLog (261906 => 261907)

--- trunk/Source/WebCore/ChangeLog	2020-05-20 05:44:29 UTC (rev 261906)
+++ trunk/Source/WebCore/ChangeLog	2020-05-20 07:11:26 UTC (rev 261907)
@@ -1,3 +1,23 @@
+2020-05-20  Ori

[webkit-changes] [261894] trunk

2020-05-19 Thread obrufau
Title: [261894] trunk








Revision 261894
Author obru...@igalia.com
Date 2020-05-19 16:50:25 -0700 (Tue, 19 May 2020)


Log Message
Fix marginLogicalSizeForChild to check auto margins in the right axis
https://bugs.webkit.org/show_bug.cgi?id=212055

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Import new WPT test.

* web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001-expected.txt: Added.
* web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001.html: Added.
* web-platform-tests/css/css-grid/grid-items/w3c-import.log:

Source/WebCore:

GridLayoutFunctions::marginLogicalSizeForChild checks for 'auto' margins
before retrieving the margin size, since these should be treated as 0.
However, for orthogonal grid items, it used to check the wrong axis.
So if an item had 'margin-top: auto' and 'margin-left: 5px', when asking
for the horizontal margin we could get 0px instead of 5px due to the
auto margin in the vertical axis.

Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001.html

* rendering/GridLayoutFunctions.cpp:
(WebCore::GridLayoutFunctions::marginLogicalSizeForChild):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/w3c-import.log
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/GridLayoutFunctions.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001.html




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (261893 => 261894)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-05-19 23:35:58 UTC (rev 261893)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-05-19 23:50:25 UTC (rev 261894)
@@ -1,3 +1,16 @@
+2020-05-19  Oriol Brufau  
+
+Fix marginLogicalSizeForChild to check auto margins in the right axis
+https://bugs.webkit.org/show_bug.cgi?id=212055
+
+Reviewed by Manuel Rego Casasnovas.
+
+Import new WPT test.
+
+* web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001-expected.txt: Added.
+* web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001.html: Added.
+* web-platform-tests/css/css-grid/grid-items/w3c-import.log:
+
 2020-05-14  Sergio Villar Senin  
 
 [WebXR] Implement requestSession()


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001-expected.txt (0 => 261894)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001-expected.txt	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001-expected.txt	2020-05-19 23:50:25 UTC (rev 261894)
@@ -0,0 +1,98 @@
+
+PASS .grid 1 
+PASS .grid 2 
+PASS .grid 3 
+PASS .grid 4 
+PASS .grid 5 
+PASS .grid 6 
+PASS .grid 7 
+PASS .grid 8 
+PASS .grid 9 
+PASS .grid 10 
+PASS .grid 11 
+PASS .grid 12 
+PASS .grid 13 
+PASS .grid 14 
+PASS .grid 15 
+PASS .grid 16 
+PASS .grid 17 
+PASS .grid 18 
+PASS .grid 19 
+PASS .grid 20 
+PASS .grid 21 
+PASS .grid 22 
+PASS .grid 23 
+PASS .grid 24 
+PASS .grid 25 
+PASS .grid 26 
+PASS .grid 27 
+PASS .grid 28 
+PASS .grid 29 
+PASS .grid 30 
+PASS .grid 31 
+PASS .grid 32 
+PASS .grid 33 
+PASS .grid 34 
+PASS .grid 35 
+PASS .grid 36 
+PASS .grid 37 
+PASS .grid 38 
+PASS .grid 39 
+PASS .grid 40 
+PASS .grid 41 
+PASS .grid 42 
+PASS .grid 43 
+PASS .grid 44 
+PASS .grid 45 
+PASS .grid 46 
+Direction LTR
+
+Item height: 60px;
+ Item min-height: 60px;
+ Item height: 60px; & margin-left: 5px;
+ Item min-height: 60px; & margin-left: 5px;
+ Item min-height: 60px; & margin-top: 5px; & margin-left: auto
+ Item height: 60px; & margin-right: 10px;
+ Item min-height: 60px; & margin-right: 10px;
+ Item height: 60px; & margin-left: 5px; & margin-right: 10px;
+ Item min-height: 60px; & margin-left: 5px; & margin-right: 10px;
+ Item height: 60px; & padding-left: 6px;
+ Item min-height: 60px; & padding-left: 6px;
+ Item height: 60px; & padding-right: 3px;
+ Item min-height: 60px; & padding-right: 3px;
+ Item height: 60px; & padding-left: 6px; & padding-right: 3px;
+ Item min-height: 60px; & padding-left: 6px; & padding-right: 3px;
+ Item height: 60px; & border-left-width: 2px;
+ Item min-height: 60px; & border-left-width: 2px;
+ Item height: 60px; & border-right-width: 4px;
+ Item min-height: 60px; & border-right-width: 4px;
+ Item height: 60px; & border-left-width: 2px; & border-right-width: 4px;
+ Item min-height: 60px; & border-left-width: 2px; & border-right-width: 4px;
+ Item height: 60px; & margin-left: 5px; & margin-right: 10px; & padding-le

[webkit-changes] [261767] trunk

2020-05-15 Thread obrufau
Title: [261767] trunk








Revision 261767
Author obru...@igalia.com
Date 2020-05-15 16:26:01 -0700 (Fri, 15 May 2020)


Log Message
[css-grid] Treat percentages as auto for the minimum contribution
https://bugs.webkit.org/show_bug.cgi?id=195967

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Import WPT test.

* web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages-expected.txt: Added.
* web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages.html: Added.
* web-platform-tests/css/css-grid/grid-definition/w3c-import.log:

Source/WebCore:

The minimum contribution of a grid item is the outer size resulting from
the minimum size if the computed preferred size behaves as auto, or the
min-content contribution otherwise.

If the preferred size is a percentage, it should be resolved with
respect to the grid area, which depends on the minimum contribution
of the item. Thus the percentage is cyclic and behaves as auto.

Before this change, WebKit only checked whether the preferred size is
auto, not whether it behaves as auto. In fact this was according to
an older version of the spec, but it was changed in
https://github.com/w3c/csswg-drafts/issues/2367

Test: imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages.html

Some cases in the test still fail due to bug 209461.

* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/w3c-import.log
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages.html




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (261766 => 261767)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-05-15 22:39:41 UTC (rev 261766)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-05-15 23:26:01 UTC (rev 261767)
@@ -1,3 +1,16 @@
+2020-05-15  Oriol Brufau  
+
+[css-grid] Treat percentages as auto for the minimum contribution
+https://bugs.webkit.org/show_bug.cgi?id=195967
+
+Reviewed by Manuel Rego Casasnovas.
+
+Import WPT test.
+
+* web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages-expected.txt: Added.
+* web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages.html: Added.
+* web-platform-tests/css/css-grid/grid-definition/w3c-import.log:
+
 2020-05-15  Alex Christensen  
 
 Make host parser fail on ^


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages-expected.txt (0 => 261767)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages-expected.txt	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages-expected.txt	2020-05-15 23:26:01 UTC (rev 261767)
@@ -0,0 +1,18 @@
+
+PASS auto - columns 
+PASS auto - rows 
+PASS min - columns 
+FAIL min - rows assert_equals: grid-template-rows expected "50px" but got "150px"
+PASS max - columns 
+PASS max - rows 
+PASS size - columns 
+PASS size - rows 
+PASS min max - columns 
+FAIL min max - rows assert_equals: grid-template-rows expected "50px" but got "150px"
+PASS min size - columns 
+FAIL min size - rows assert_equals: grid-template-rows expected "50px" but got "200px"
+PASS max size - columns 
+PASS max size - rows 
+PASS min max size - columns 
+FAIL min max size - rows assert_equals: grid-template-rows expected "50px" but got "150px"
+


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages.html (0 => 261767)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages.html	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages.html	2020-05-15 23:26:01 UTC (rev 261767)
@@ -0,0 +1,87 @@
+
+
+CSS Grid Layout Test: minimum contribution with percentages
+
+
+
+#grid {
+  display: grid;
+  height: 50px;
+  width: 50px;
+  grid: auto / auto;
+}
+#item {
+  background: cyan;
+}
+#content {
+  height: 100px;
+  width: 100px;
+}
+.min {
+  min-height: calc(100% + 50px);
+  min-width: calc(100% + 50px);
+}
+.max {
+  max-height: calc(100% - 50px);
+  max-width: calc(100% - 50px);
+}
+.size {
+  hei

[webkit-changes] [256826] trunk/Source/WebCore

2020-02-18 Thread obrufau
Title: [256826] trunk/Source/WebCore








Revision 256826
Author obru...@igalia.com
Date 2020-02-18 06:47:47 -0800 (Tue, 18 Feb 2020)


Log Message
[css-grid] Improve performance of track sizing algorithm for spanning items
https://bugs.webkit.org/show_bug.cgi?id=207852

Reviewed by Javier Fernandez.

Calculating the used sizing function for a track is not a very expensive
operation, but it's not trivial either, and the track sizing algorithm
needs to access sizing functions all over the place. This ends up having
a performance cost, especially for spanning items.

Intrinsic contributions from items that span a single track are handled
in a simpler way than when the span is greater than 1. In the former
case, SizeTrackToFitNonSpanningItem only calculates the track sizing
function of each track once per each item in that track. But in the
latter case we not only calculate the track sizing function of multiple
tracks per item, we also repeat this 5 times in order to handle the
various TrackSizeComputationPhase.

Therefore, to increase performance, this patch caches the used track
sizing functions in the tracks themselves.

This is a port of these Chromium patches:
- https://chromium-review.googlesource.com/c/chromium/src/+/1901292
- https://chromium-review.googlesource.com/c/chromium/src/+/1919140
- https://chromium-review.googlesource.com/c/chromium/src/+/1940107

Chromium has a auto-grid-lots-of-spanning-data perf test. In WebKit, its
performance improves by 40% with this patch.

* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrack::setCachedTrackSize):
(WebCore::GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem):
(WebCore::GridTrackSizingAlgorithm::spanningItemCrossesFlexibleSizedTracks const):
(WebCore::GridTrackSizingAlgorithm::increaseSizesToAccommodateSpanningItems):
(WebCore::GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild const):
(WebCore::GridTrackSizingAlgorithm::isIntrinsicSizedGridArea const):
(WebCore::GridTrackSizingAlgorithm::calculateGridTrackSize const):
(WebCore::GridTrackSizingAlgorithm::computeFlexFactorUnitSize const):
(WebCore::GridTrackSizingAlgorithm::computeFlexSizedTracksGrowth const):
(WebCore::GridTrackSizingAlgorithm::findFrUnitSize const):
(WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):
(WebCore::normalizedFlexFraction):
(WebCore::IndefiniteSizeStrategy::findUsedFlexFraction const):
(WebCore::GridTrackSizingAlgorithm::initializeTrackSizes):
(WebCore::GridTrackSizingAlgorithm::tracksAreWiderThanMinTrackBreadth const):
* rendering/GridTrackSizingAlgorithm.h:
(WebCore::GridTrack::cachedTrackSize const):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (256825 => 256826)

--- trunk/Source/WebCore/ChangeLog	2020-02-18 14:15:41 UTC (rev 256825)
+++ trunk/Source/WebCore/ChangeLog	2020-02-18 14:47:47 UTC (rev 256826)
@@ -1,3 +1,53 @@
+2020-02-18  Oriol Brufau  
+
+[css-grid] Improve performance of track sizing algorithm for spanning items
+https://bugs.webkit.org/show_bug.cgi?id=207852
+
+Reviewed by Javier Fernandez.
+
+Calculating the used sizing function for a track is not a very expensive
+operation, but it's not trivial either, and the track sizing algorithm
+needs to access sizing functions all over the place. This ends up having
+a performance cost, especially for spanning items.
+
+Intrinsic contributions from items that span a single track are handled
+in a simpler way than when the span is greater than 1. In the former
+case, SizeTrackToFitNonSpanningItem only calculates the track sizing
+function of each track once per each item in that track. But in the
+latter case we not only calculate the track sizing function of multiple
+tracks per item, we also repeat this 5 times in order to handle the
+various TrackSizeComputationPhase.
+
+Therefore, to increase performance, this patch caches the used track
+sizing functions in the tracks themselves.
+
+This is a port of these Chromium patches:
+- https://chromium-review.googlesource.com/c/chromium/src/+/1901292
+- https://chromium-review.googlesource.com/c/chromium/src/+/1919140
+- https://chromium-review.googlesource.com/c/chromium/src/+/1940107
+
+Chromium has a auto-grid-lots-of-spanning-data perf test. In WebKit, its
+performance improves by 40% with this patch.
+
+* rendering/GridTrackSizingAlgorithm.cpp:
+(WebCore::GridTrack::setCachedTrackSize):
+(WebCore::GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem):
+(WebCore::GridTrackSizingAlgorithm::spanningItemCrossesFlexibleSizedTracks const):
+(WebCore::GridTrackSizingAlgorithm::increaseSizesToAccommodateSpanningItems):
+(WebCore::GridTrac

[webkit-changes] [252151] trunk/Source/WebCore

2019-11-06 Thread obrufau
Title: [252151] trunk/Source/WebCore








Revision 252151
Author obru...@igalia.com
Date 2019-11-06 14:38:56 -0800 (Wed, 06 Nov 2019)


Log Message
Keep None value at the end of the ListStyleType enum
https://bugs.webkit.org/show_bug.cgi?id=203883

Reviewed by Manuel Rego Casasnovas.

Bug 203837 added a String value at the end of the ListStyleType enum.
This patch moves it before None, in order to keep None at the end.

* rendering/style/RenderStyleConstants.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/style/RenderStyleConstants.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (252150 => 252151)

--- trunk/Source/WebCore/ChangeLog	2019-11-06 22:21:33 UTC (rev 252150)
+++ trunk/Source/WebCore/ChangeLog	2019-11-06 22:38:56 UTC (rev 252151)
@@ -1,3 +1,15 @@
+2019-11-06  Oriol Brufau  
+
+Keep None value at the end of the ListStyleType enum
+https://bugs.webkit.org/show_bug.cgi?id=203883
+
+Reviewed by Manuel Rego Casasnovas.
+
+Bug 203837 added a String value at the end of the ListStyleType enum.
+This patch moves it before None, in order to keep None at the end.
+
+* rendering/style/RenderStyleConstants.h:
+
 2019-11-06  Zalan Bujtas  
 
 [LFC][MarginCollapsing] Add Line::isConsideredEmpty


Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (252150 => 252151)

--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2019-11-06 22:21:33 UTC (rev 252150)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2019-11-06 22:38:56 UTC (rev 252151)
@@ -631,8 +631,8 @@
 Katakana,
 HiraganaIroha,
 KatakanaIroha,
-None,
-String
+String,
+None
 };
 
 enum class QuoteType : uint8_t {






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [252076] trunk

2019-11-05 Thread obrufau
Title: [252076] trunk








Revision 252076
Author obru...@igalia.com
Date 2019-11-05 13:41:48 -0800 (Tue, 05 Nov 2019)


Log Message
[css-lists] Implement list-style-type: 
https://bugs.webkit.org/show_bug.cgi?id=167729

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Some tests pass now.

* web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt:
* web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt:

Source/WebCore:

This patch extends the syntax of the list-style-type property to accept
arbitrary string values in order to customize the marker contents.

When a string is specified for list-style-type, the patch sets it to a
special ListStyleType::String, and the string value is stored in an
extra field.

Tests: imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001a.html
   imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001b.html
   imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-002.html
   imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-003.html
   imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-004.html
   imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-005a.html
   imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-005b.html
   imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-006.html
   imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-007.html
   imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed.html
   imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid.html

Some tests fail because mixed-bidi is not supported in markers
(https://bugs.webkit.org/show_bug.cgi?id=202849).

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSProperties.json:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isPartialKeywordPropertyID):
* css/parser/CSSParserFastPaths.h:
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseSingleValue):
* rendering/RenderListMarker.cpp:
(WebCore::effectiveListMarkerType):
(WebCore::listMarkerSuffix):
(WebCore::listMarkerText):
(WebCore::RenderListMarker::styleDidChange):
(WebCore::RenderListMarker::paint):
(WebCore::RenderListMarker::updateContent):
(WebCore::RenderListMarker::computePreferredLogicalWidths):
(WebCore::RenderListMarker::updateMargins):
(WebCore::RenderListMarker::suffix const):
(WebCore::RenderListMarker::getRelativeMarkerRect):
* rendering/style/CounterContent.h:
(WebCore::CounterContent::CounterContent):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::listStyleStringValue const):
(WebCore::RenderStyle::setListStyleStringValue):
(WebCore::RenderStyle::initialListStyleStringValue):
* rendering/style/RenderStyleConstants.cpp:
(WebCore::operator<<):
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator== const):
* rendering/style/StyleRareInheritedData.h:
* style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyInheritListStyleType):
(WebCore::Style::BuilderCustom::applyInitialListStyleType):
(WebCore::Style::BuilderCustom::applyValueListStyleType):

LayoutTests:

Most tests pass now, but some still fail because mixed-bidi is not
supported in markers (https://bugs.webkit.org/show_bug.cgi?id=202849).

iOS and Mac have some extra failures due to subpixel differences for the
marker position.

* TestExpectations:
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt
trunk/LayoutTests/platform/ios/TestExpectations
trunk/LayoutTests/platform/mac/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
trunk/Source/WebCore/css/CSSProperties.json
trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp
trunk/Source/WebCore/css/parser/CSSParserFastPaths.h
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
trunk/Source/WebCore/rendering/RenderListMarker.cpp
trunk/Source/WebCore/rendering/style/CounterContent.h
trunk/Source/WebCore/rendering/style/RenderStyle.h
trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp
trunk/Source/WebCore/rendering/style/RenderStyleConstants.h
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp
trunk/Source/WebCore/rendering/style/StyleRareIn

[webkit-changes] [252009] trunk/LayoutTests/imported/w3c

2019-11-04 Thread obrufau
Title: [252009] trunk/LayoutTests/imported/w3c








Revision 252009
Author obru...@igalia.com
Date 2019-11-04 12:59:56 -0800 (Mon, 04 Nov 2019)


Log Message
[css-lists] Import parsing tests for list-style-type: 
https://bugs.webkit.org/show_bug.cgi?id=203807

Reviewed by Manuel Rego Casasnovas.

Import WPT tests.

* resources/import-expectations.json:
* web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt: Added.
* web-platform-tests/css/css-lists/parsing/list-style-type-computed.html: Added.
* web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt: Added.
* web-platform-tests/css/css-lists/parsing/list-style-type-valid.html: Added.
* web-platform-tests/css/css-lists/parsing/w3c-import.log: Added.

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/resources/import-expectations.json


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/w3c-import.log




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (252008 => 252009)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2019-11-04 20:58:52 UTC (rev 252008)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2019-11-04 20:59:56 UTC (rev 252009)
@@ -1,5 +1,21 @@
 2019-11-04  Oriol Brufau  
 
+[css-lists] Import parsing tests for list-style-type: 
+https://bugs.webkit.org/show_bug.cgi?id=203807
+
+Reviewed by Manuel Rego Casasnovas.
+
+Import WPT tests.
+
+* resources/import-expectations.json:
+* web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt: Added.
+* web-platform-tests/css/css-lists/parsing/list-style-type-computed.html: Added.
+* web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt: Added.
+* web-platform-tests/css/css-lists/parsing/list-style-type-valid.html: Added.
+* web-platform-tests/css/css-lists/parsing/w3c-import.log: Added.
+
+2019-11-04  Oriol Brufau  
+
 [css-lists] Import tests for list-style-type: 
 https://bugs.webkit.org/show_bug.cgi?id=203759
 


Modified: trunk/LayoutTests/imported/w3c/resources/import-expectations.json (252008 => 252009)

--- trunk/LayoutTests/imported/w3c/resources/import-expectations.json	2019-11-04 20:58:52 UTC (rev 252008)
+++ trunk/LayoutTests/imported/w3c/resources/import-expectations.json	2019-11-04 20:59:56 UTC (rev 252009)
@@ -85,6 +85,7 @@
 "web-platform-tests/css/css-grid/parsing/": "import", 
 "web-platform-tests/css/css-images": "import", 
 "web-platform-tests/css/css-lists": "import", 
+"web-platform-tests/css/css-lists/parsing": "import", 
 "web-platform-tests/css/css-logical": "import", 
 "web-platform-tests/css/css-multicol": "import", 
 "web-platform-tests/css/css-overflow": "import", 


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt (0 => 252009)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt	2019-11-04 20:59:56 UTC (rev 252009)
@@ -0,0 +1,27 @@
+
+PASS Property list-style-type value 'none' computes to 'none' 
+PASS Property list-style-type value 'disc' computes to 'disc' 
+PASS Property list-style-type value 'circle' computes to 'circle' 
+PASS Property list-style-type value 'square' computes to 'square' 
+PASS Property list-style-type value 'decimal' computes to 'decimal' 
+PASS Property list-style-type value 'decimal-leading-zero' computes to 'decimal-leading-zero' 
+PASS Property list-style-type value 'lower-roman' computes to 'lower-roman' 
+PASS Property list-style-type value 'upper-roman' computes to 'upper-roman' 
+PASS Property list-style-type value 'lower-greek' computes to 'lower-greek' 
+PASS Property list-style-type value 'lower-latin' computes to 'lower-latin' 
+PASS Property list-style-type value 'upper-latin' computes to 'upper-latin' 
+PASS Property list-style-type value 'armenian' computes to 'armenian' 
+PASS Property list-style-type value 'georgian' computes to 'georgian' 
+PASS Property list-style-type value 'lower-alpha' computes to 'lower-alpha' 
+PASS Property list-style-type value 'upper-alpha' computes to 'upper-alpha' 
+FAIL Property list-style-type value '"marker string"' computes to '"marker string"' assert_true: '"marker 

[webkit-changes] [251984] trunk/LayoutTests

2019-11-04 Thread obrufau
Title: [251984] trunk/LayoutTests








Revision 251984
Author obru...@igalia.com
Date 2019-11-04 04:12:14 -0800 (Mon, 04 Nov 2019)


Log Message
[css-lists] Import tests for list-style-type: 
https://bugs.webkit.org/show_bug.cgi?id=203759

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Import WPT tests.

* resources/import-expectations.json:
* web-platform-tests/css/css-lists/list-style-type-string-001a-expected.html: Added.
* web-platform-tests/css/css-lists/list-style-type-string-001a.html: Added.
* web-platform-tests/css/css-lists/list-style-type-string-001b-expected.html: Added.
* web-platform-tests/css/css-lists/list-style-type-string-001b.html: Added.
* web-platform-tests/css/css-lists/list-style-type-string-002-expected.html: Added.
* web-platform-tests/css/css-lists/list-style-type-string-002.html: Added.
* web-platform-tests/css/css-lists/list-style-type-string-003-expected.html: Added.
* web-platform-tests/css/css-lists/list-style-type-string-003.html: Added.
* web-platform-tests/css/css-lists/list-style-type-string-004-expected.html: Added.
* web-platform-tests/css/css-lists/list-style-type-string-004.html: Added.
* web-platform-tests/css/css-lists/list-style-type-string-005a-expected.html: Added.
* web-platform-tests/css/css-lists/list-style-type-string-005a.html: Added.
* web-platform-tests/css/css-lists/list-style-type-string-005b-expected.html: Added.
* web-platform-tests/css/css-lists/list-style-type-string-005b.html: Added.
* web-platform-tests/css/css-lists/list-style-type-string-006-expected.html: Added.
* web-platform-tests/css/css-lists/list-style-type-string-006.html: Added.
* web-platform-tests/css/css-lists/list-style-type-string-007-expected.html: Added.
* web-platform-tests/css/css-lists/list-style-type-string-007.html: Added.
* web-platform-tests/css/css-lists/w3c-import.log:

LayoutTests:

Most tests fail because the feature hasn't been implemented yet
(https://bugs.webkit.org/show_bug.cgi?id=167729).

* TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/resources/import-expectations.json
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/w3c-import.log


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001a-expected.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001a.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001b-expected.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001b.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-002-expected.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-002.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-003-expected.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-003.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-004-expected.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-004.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-005a-expected.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-005a.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-005b-expected.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-005b.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-006-expected.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-006.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-007-expected.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-007.html




Diff

Modified: trunk/LayoutTests/ChangeLog (251983 => 251984)

--- trunk/LayoutTests/ChangeLog	2019-11-04 11:36:05 UTC (rev 251983)
+++ trunk/LayoutTests/ChangeLog	2019-11-04 12:12:14 UTC (rev 251984)
@@ -1,3 +1,15 @@
+2019-11-04  Oriol Brufau  
+
+[css-lists] Import tests for list-style-type: 
+https://bugs.webkit.org/show_bug.cgi?id=203759
+
+Reviewed by Manuel Rego Casasnovas.
+
+Most tests fail because the feature hasn't been implemented yet
+(https://bugs.webkit.org/show_bug.cgi?id=167729).
+
+* TestExpectations:
+
 2019-11-04  youenn fablet  
 
 Add a test verifying video plays well when switching from MediaStreams to regular videos


Modified: trunk/LayoutTests/TestExpectations (251983 => 251984)

--- trunk/LayoutTests/TestExpectations	2019-11-04 11:36:05 UTC (rev 251983)
+++ trunk/LayoutTests/TestExpectations	2019-11

[webkit-changes] [251965] trunk

2019-11-02 Thread obrufau
Title: [251965] trunk








Revision 251965
Author obru...@igalia.com
Date 2019-11-02 11:48:15 -0700 (Sat, 02 Nov 2019)


Log Message
[css-grid] Fix line name positions after auto repeat with no line names
https://bugs.webkit.org/show_bug.cgi?id=203670

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Import WPT tests.
There are some test failures because integer repeat() is still expanded
at computed-value time (https://webkit.org/b/202259).

* web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-expected.txt:
* web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-nogrid-expected.txt:
* web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-nogrid.html:
* web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-withcontent-expected.txt: Added.
* web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-withcontent.html: Added.
* web-platform-tests/css/css-grid/parsing/grid-template-columns-computed.html:
* web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-expected.txt:
* web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-nogrid-expected.txt:
* web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-nogrid.html:
* web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-withcontent-expected.txt: Added.
* web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-withcontent.html: Added.
* web-platform-tests/css/css-grid/parsing/grid-template-rows-computed.html:
* web-platform-tests/css/css-grid/parsing/w3c-import.log:

Source/WebCore:

When serializing grid-template-rows/columns of a grid container, we need
to handle auto repeat() specially in order to insert the line names at
the correct places.

Before this patch, this was skipped for indices before the insertion
point of the auto repeat, and in case the auto repeat had no line name.
The latter logic was wrong, if there is an auto repeat we still need the
special code after the insertion point, even if it has no line names.
The proper condition to check is whether there is no auto repeat.

The patch also avoids a 2nd call to gridAutoRepeatRows/Columns since we
already have the value in a variable.

Tests: imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed.html
   imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-nogrid.html
   imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-withcontent.html
   imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed.html
   imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-nogrid.html
   imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-withcontent.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::OrderedNamedLinesCollectorInGridLayout::OrderedNamedLinesCollectorInGridLayout):
(WebCore::OrderedNamedLinesCollectorInGridLayout::collectLineNamesForIndex const):
(WebCore::valueForGridTrackList):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-nogrid-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-nogrid.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-nogrid-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-nogrid.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/w3c-import.log
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-withcontent-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-withcontent.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-withcontent-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-withcontent.html




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (251964 => 251965)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2019-11-02 16:54:41 UTC (rev 251964)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2019-11-02 18:48:15 UTC (rev 251965)
@@ -1,3 +1,28 

[webkit-changes] [250715] trunk

2019-10-04 Thread obrufau
Title: [250715] trunk








Revision 250715
Author obru...@igalia.com
Date 2019-10-04 03:06:20 -0700 (Fri, 04 Oct 2019)


Log Message
[css-grid] Preserve auto repeat() in getComputedStyle() for non-grids
https://bugs.webkit.org/show_bug.cgi?id=202258

Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

Import WPT tests.
There are some test failures because integer repeat() is still expanded
at computed-value time (https://webkit.org/b/202259).

* resources/import-expectations.json:
* web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-expected.txt: Added.
* web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-nogrid-expected.txt: Added.
* web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-nogrid.html: Added.
* web-platform-tests/css/css-grid/parsing/grid-template-columns-computed.html: Added.
* web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-expected.txt: Added.
* web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-nogrid-expected.txt: Added.
* web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-nogrid.html: Added.
* web-platform-tests/css/css-grid/parsing/grid-template-rows-computed.html: Added.
* web-platform-tests/css/css-grid/parsing/w3c-import.log:

Source/WebCore:

Tests: imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-nogrid.html
   imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed.html
   imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-nogrid.html
   imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed.html

Usually, the resolved value of grid-template-rows/columns is the used
value, expanding the repeat() notation. But for elements with a non-grid
display, the resolved value is just the computed value, with repeat(),
since the used value doesn't exist.
Before this patch, the repeat() was dropped, and line names after it
appeared at the wrong position or were also dropped. There was also an
assert failure in debug. This patch fixes the serialization for auto
repeat(). Integer repeat() is still expanded at computed-value time, so
it's not preserved in getComputedStyle().

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::OrderedNamedLinesCollector::OrderedNamedLinesCollector):
(WebCore::OrderedNamedLinesCollectorInsideRepeat::OrderedNamedLinesCollectorInsideRepeat):
(WebCore::OrderedNamedLinesCollectorInGridLayout::OrderedNamedLinesCollectorInGridLayout):
(WebCore::OrderedNamedLinesCollector::collectLineNamesForIndex const):
(WebCore::OrderedNamedLinesCollectorInsideRepeat::collectLineNamesForIndex const):
(WebCore::OrderedNamedLinesCollectorInGridLayout::collectLineNamesForIndex const):
(WebCore::populateGridTrackList):
(WebCore::valueForGridTrackList):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/resources/import-expectations.json
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/w3c-import.log
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-nogrid-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-nogrid.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-nogrid-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-nogrid.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed.html




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (250714 => 250715)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2019-10-04 09:51:33 UTC (rev 250714)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2019-10-04 10:06:20 UTC (rev 250715)
@@ -1,3 +1,25 @@
+2019-10-04  Oriol Brufau  
+
+[css-grid] Preserve auto repeat() in getComputedStyle() for non-grids
+https://bugs.webkit.org/show_bug.cgi?id=202258
+
+Reviewed by Javier Fernandez.
+
+Import WPT tests.
+There are some test failures because integer repeat() is still expanded
+at computed-value time (https://webkit.org/b/202259).
+
+* resources/import-expectations.json:
+* web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-expected.txt: Added.
+* web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-nogrid-expected.txt: Added.
+* w

[webkit-changes] [245798] trunk

2019-05-27 Thread obrufau
Title: [245798] trunk








Revision 245798
Author obru...@igalia.com
Date 2019-05-27 14:27:15 -0700 (Mon, 27 May 2019)


Log Message
[css-grid] Preserve repeat() notation when serializing declared values
https://bugs.webkit.org/show_bug.cgi?id=197840

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Import WPT test.

* web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002-expected.txt: Added.
* web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html: Added.
* web-platform-tests/css/css-grid/grid-definition/w3c-import.log:

Source/WebCore:

Tests: fast/css-grid-layout/grid-element-auto-repeat-get-set.html
   fast/css-grid-layout/grid-repeat-calc.html
   fast/css-grid-layout/named-grid-line-get-set.html
   imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html

Before this change, a repeat() notation with an integral number of
repetitions was expanded at parse time. This was observable when reading
declared values using JS APIs.

This patch makes the parser preserve that notation, like it was already
happening when the number of repetitions was automatic and not integral.

The resolved value in getComputedStyle() will still be expanded, though,
as required by the spec.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSGridIntegerRepeatValue.cpp: Added.
(WebCore::CSSGridIntegerRepeatValue::customCSSText const):
(WebCore::CSSGridIntegerRepeatValue::equals const):
* css/CSSGridIntegerRepeatValue.h: Added.
* css/CSSValue.cpp:
(WebCore::CSSValue::equals const):
(WebCore::CSSValue::cssText const):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isGridIntegerRepeatValue const):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::createGridTrackList):
(WebCore::StyleBuilderConverter::convertGridTrackSizeList):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeGridTrackRepeatFunction):

Tools:

Adapt CSSPropertyParserTest to CSSGridIntegerRepeatValue.

* TestWebKitAPI/Tests/WebCore/CSSParser.cpp:
(TestWebKitAPI::computeNumberOfTracks):

LayoutTests:

Update test expectations.

* fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt:
* fast/css-grid-layout/grid-element-auto-repeat-get-set.html:
* fast/css-grid-layout/grid-repeat-calc-expected.txt:
* fast/css-grid-layout/grid-repeat-calc.html:
* fast/css-grid-layout/named-grid-line-get-set-expected.txt:
* fast/css-grid-layout/named-grid-line-get-set.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt
trunk/LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set.html
trunk/LayoutTests/fast/css-grid-layout/grid-repeat-calc-expected.txt
trunk/LayoutTests/fast/css-grid-layout/grid-repeat-calc.html
trunk/LayoutTests/fast/css-grid-layout/named-grid-line-get-set-expected.txt
trunk/LayoutTests/fast/css-grid-layout/named-grid-line-get-set.html
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/w3c-import.log
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Headers.cmake
trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/css/CSSValue.cpp
trunk/Source/WebCore/css/CSSValue.h
trunk/Source/WebCore/css/StyleBuilderConverter.h
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebCore/CSSParser.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html
trunk/Source/WebCore/css/CSSGridIntegerRepeatValue.cpp
trunk/Source/WebCore/css/CSSGridIntegerRepeatValue.h




Diff

Modified: trunk/LayoutTests/ChangeLog (245797 => 245798)

--- trunk/LayoutTests/ChangeLog	2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/LayoutTests/ChangeLog	2019-05-27 21:27:15 UTC (rev 245798)
@@ -1,3 +1,19 @@
+2019-05-27  Oriol Brufau  
+
+[css-grid] Preserve repeat() notation when serializing declared values
+https://bugs.webkit.org/show_bug.cgi?id=197840
+
+Reviewed by Manuel Rego Casasnovas.
+
+Update test expectations.
+
+* fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt:
+* fast/css-grid-layout/grid-element-auto-repeat-get-set.html:
+* fast/css-grid-layout/grid-repeat-calc-expected.txt:
+* fast/css-grid-layout/grid-repeat-calc.html:
+* fast/css-grid-layout/named-grid-line-get-set-expected.txt:
+* fast/css-grid-layout/named-grid-line-get-set.html:
+
 2019-05-27  Carlos Garcia Campos  
 
 Touch support is reported even when the device doesn't have a touch screen


Modified: trunk/LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt (245797 => 245798)

--- trunk/Layou