[webkit-changes] [295711] trunk

2022-06-21 Thread zsun
Title: [295711] trunk








Revision 295711
Author z...@igalia.com
Date 2022-06-21 18:55:30 -0700 (Tue, 21 Jun 2022)


Log Message
Schedule/fire an event when selection changes for select() and setRangeText().
https://bugs.webkit.org/show_bug.cgi?id=241366

Reviewed by Darin Adler.

As per step 6 at [1], if either extent or direction of the text control to be modified,
we need to queue an element task on the user interaction task source given the element
to fire an select event with the bubbles attribute initialized to true. We addressed
some cases in Bug 238142. This is to fix the missing cases.

This patch also introduces WPT test select-event.html back to WebKit. For some reason, it
was removed in a previous resync patch.

[1] https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#set-the-selection-range

* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/select-event-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/select-event.html: Added.
* LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/select-event-expected.txt
* Source/WebCore/html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::select):
(WebCore::HTMLTextFormControlElement::setRangeText):

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

Modified Paths

trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/select-event-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/select-event.html
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/select-event-expected.txt




Diff

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/select-event-expected.txt (0 => 295711)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/select-event-expected.txt	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/select-event-expected.txt	2022-06-22 01:55:30 UTC (rev 295711)
@@ -0,0 +1,272 @@
+
+PASS textarea: select()
+PASS textarea: select() a second time (must not fire select)
+PASS textarea: select() disconnected node
+PASS textarea: select() event queue
+FAIL textarea: select() twice in disconnected node (must fire select only once) assert_equals: expected 0 but got 6
+PASS textarea: selectionStart
+PASS textarea: selectionStart a second time (must not fire select)
+PASS textarea: selectionStart disconnected node
+PASS textarea: selectionStart event queue
+FAIL textarea: selectionStart twice in disconnected node (must fire select only once) assert_equals: expected 0 but got 6
+PASS textarea: selectionEnd
+PASS textarea: selectionEnd a second time (must not fire select)
+PASS textarea: selectionEnd disconnected node
+PASS textarea: selectionEnd event queue
+FAIL textarea: selectionEnd twice in disconnected node (must fire select only once) assert_equals: expected 0 but got 6
+PASS textarea: selectionDirection
+FAIL textarea: selectionDirection a second time (must not fire select) assert_unreached: the select event must not fire the second time Reached unreachable code
+PASS textarea: selectionDirection disconnected node
+PASS textarea: selectionDirection event queue
+FAIL textarea: selectionDirection twice in disconnected node (must fire select only once) assert_equals: expected 0 but got 6
+PASS textarea: setSelectionRange()
+PASS textarea: setSelectionRange() a second time (must not fire select)
+PASS textarea: setSelectionRange() disconnected node
+PASS textarea: setSelectionRange() event queue
+FAIL textarea: setSelectionRange() twice in disconnected node (must fire select only once) assert_equals: expected 0 but got 6
+PASS textarea: setRangeText()
+PASS textarea: setRangeText() a second time (must not fire select)
+PASS textarea: setRangeText() disconnected node
+PASS textarea: setRangeText() event queue
+FAIL textarea: setRangeText() twice in disconnected node (must fire select only once) assert_equals: expected 0 but got 15
+PASS textarea: selectionStart out of range
+PASS textarea: selectionStart out of range a second time (must not fire select)
+FAIL textarea: selectionStart out of range disconnected node assert_true: event didn't fire expected true got false
+FAIL textarea: selectionStart out of range event queue assert_true: event didn't fire expected true got false
+FAIL textarea: selectionStart out of range twice in disconnected node (must fire select only once) assert_equals: expected 0 but got 6
+PASS textarea: selectionEnd out of range
+PASS textarea: selectionEnd out of range a second time 

[webkit-changes] [294633] trunk/Source/WebCore/css/html.css

2022-05-23 Thread zsun
Title: [294633] trunk/Source/WebCore/css/html.css








Revision 294633
Author z...@igalia.com
Date 2022-05-23 04:33:54 -0700 (Mon, 23 May 2022)


Log Message
Remove unnecessary appearance: auto; declarations in html.css.
https://bugs.webkit.org/show_bug.cgi?id=240764

`input` and `select` already have an `appearance: auto` rule.

Reviewed by Tim Nguyen.

* Source/WebCore/css/html.css:
(#endif):
(input[type="search"]::-webkit-search-cancel-button):
(input[type="search"]::-webkit-search-decoration):
(#if defined(ENABLE_DATE_AND_TIME_INPUT_TYPES) && ENABLE_DATE_AND_TIME_INPUT_TYPES):
(input:is([type="button"], [type="submit"], [type="reset"])):
(input[type="file"]::file-selector-button):
(input[type="checkbox"]):
(#if !(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)):
(select:is([size=""], [size="0"], [size="1"])):

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

Modified Paths

trunk/Source/WebCore/css/html.css




Diff

Modified: trunk/Source/WebCore/css/html.css (294632 => 294633)

--- trunk/Source/WebCore/css/html.css	2022-05-23 11:21:02 UTC (rev 294632)
+++ trunk/Source/WebCore/css/html.css	2022-05-23 11:33:54 UTC (rev 294633)
@@ -436,7 +436,6 @@
 #endif
 
 input[type="search"] {
-appearance: auto;
 box-sizing: border-box;
 #if defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY
 border: 1px solid -webkit-control-background;
@@ -450,22 +449,8 @@
 content: none !important;
 }
 
-input[type="search"]::-webkit-search-cancel-button {
-appearance: auto;
-display: block;
-flex: none;
-align-self: flex-start;
-margin: auto 0;
-}
-
-input[type="search"]::-webkit-search-decoration {
-appearance: auto;
-display: block;
-flex: none;
-align-self: flex-start;
-margin: auto 0;
-}
-
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration,
 input[type="search"]::-webkit-search-results-decoration {
 appearance: auto;
 display: block;
@@ -486,7 +471,6 @@
 
 #if defined(ENABLE_DATE_AND_TIME_INPUT_TYPES) && ENABLE_DATE_AND_TIME_INPUT_TYPES
 input:is([type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"]) {
-appearance: auto;
 align-items: center;
 display: inline-flex;
 overflow: hidden;
@@ -817,12 +801,10 @@
 }
 
 input:is([type="button"], [type="submit"], [type="reset"]) {
-appearance: auto;
 white-space: pre;
 }
 
 input[type="file"]::file-selector-button {
-appearance: auto;
 white-space: nowrap;
 margin: 0;
 font-size: inherit;
@@ -868,7 +850,6 @@
 #endif
 
 input[type="range"] {
-appearance: auto;
 padding: initial;
 border: initial;
 margin: 2px;
@@ -960,7 +941,6 @@
 }
 
 input[type="checkbox"] {
-appearance: auto;
 #if !(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
 box-sizing: border-box;
 #else
@@ -1009,7 +989,6 @@
 
 #if !(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
 input[type="radio"] {
-appearance: auto;
 box-sizing: border-box;
 }
 #endif
@@ -1078,7 +1057,6 @@
 
 #if !(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
 select:is([size], [multiple]), select[size][multiple] {
-appearance: auto;
 align-items: flex-start;
 border: 1px inset gray;
 border-radius: initial;
@@ -1086,7 +1064,6 @@
 }
 
 select:is([size=""], [size="0"], [size="1"]) {
-appearance: auto;
 align-items: center;
 border: 1px solid;
 border-radius: 5px;






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


[webkit-changes] [294476] trunk

2022-05-19 Thread zsun
Title: [294476] trunk








Revision 294476
Author z...@igalia.com
Date 2022-05-19 04:42:02 -0700 (Thu, 19 May 2022)


Log Message
Fix input type email visible value update.

This is an import of Chromium CL at
https://chromium-review.googlesource.com/c/chromium/src/+/3299014
For email type, when the visible value is different from the sanitized value, we need to update it.

https://bugs.webkit.org/show_bug.cgi?id=235522

Reviewed by Chris Dumez.

* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/email-set-value-expected.txt:
* Source/WebCore/html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::setValue):

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

Modified Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/email-set-value-expected.txt
trunk/Source/WebCore/html/TextFieldInputType.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/email-set-value-expected.txt (294475 => 294476)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/email-set-value-expected.txt	2022-05-19 11:37:11 UTC (rev 294475)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/email-set-value-expected.txt	2022-05-19 11:42:02 UTC (rev 294476)
@@ -1,4 +1,4 @@
 
 
-FAIL setValue(sanitizedValue) is reflected in visible text field content assert_equals: visible value is sanitized after setValue(sanitized) expected "foo@bar" but got " foo@bar   "
+PASS setValue(sanitizedValue) is reflected in visible text field content
 


Modified: trunk/Source/WebCore/html/TextFieldInputType.cpp (294475 => 294476)

--- trunk/Source/WebCore/html/TextFieldInputType.cpp	2022-05-19 11:37:11 UTC (rev 294475)
+++ trunk/Source/WebCore/html/TextFieldInputType.cpp	2022-05-19 11:42:02 UTC (rev 294476)
@@ -140,11 +140,14 @@
 // TextFieldInputType dispatches events different way from InputType.
 InputType::setValue(sanitizedValue, valueChanged, DispatchNoEvent, selection);
 
+// Visible value needs update if it differs from sanitized value, if it was set with setValue().
+// event_behavior == DispatchNoEvent usually means this call is not a user edit.
+bool needsTextUpdate = valueChanged || (eventBehavior == TextFieldEventBehavior::DispatchNoEvent && sanitizedValue != element()->innerTextValue());
+if (needsTextUpdate)
+updateInnerTextValue();
 if (!valueChanged)
 return;
 
-updateInnerTextValue();
-
 if (selection == TextControlSetValueSelection::SetSelectionToEnd) {
 auto max = visibleValue().length();
 if (input->focused())






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


[webkit-changes] [294475] trunk

2022-05-19 Thread zsun
Title: [294475] trunk








Revision 294475
Author z...@igalia.com
Date 2022-05-19 04:37:11 -0700 (Thu, 19 May 2022)


Log Message
Make sure :active is removed on keyup for radios.

When the radio input is checked, we need to make sure that the active flag is
set to false on keyup in order to to prevent the radio from being stuck in the
active state.

This is an import of Chromium CL at
https://chromium-review.googlesource.com/c/chromium/src/+/2466297

https://bugs.webkit.org/show_bug.cgi?id=235530

Reviewed by Chris Dumez.

* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/radio-double-activate-pseudo-expected.txt:
* Source/WebCore/html/RadioInputType.cpp:
(WebCore::RadioInputType::handleKeyupEvent):

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

Modified Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/radio-double-activate-pseudo-expected.txt
trunk/Source/WebCore/html/RadioInputType.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/radio-double-activate-pseudo-expected.txt (294474 => 294475)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/radio-double-activate-pseudo-expected.txt	2022-05-19 10:54:05 UTC (rev 294474)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/radio-double-activate-pseudo-expected.txt	2022-05-19 11:37:11 UTC (rev 294475)
@@ -1,4 +1,4 @@
 
 
-FAIL  shouldn't have the :active pseudo element after pressing the spacebar twice. assert_equals: If the radio doesn't have the :active pseudo selector, nothing else should either. expected null but got Element node 
+PASS  shouldn't have the :active pseudo element after pressing the spacebar twice.
 


Modified: trunk/Source/WebCore/html/RadioInputType.cpp (294474 => 294475)

--- trunk/Source/WebCore/html/RadioInputType.cpp	2022-05-19 10:54:05 UTC (rev 294474)
+++ trunk/Source/WebCore/html/RadioInputType.cpp	2022-05-19 11:37:11 UTC (rev 294475)
@@ -166,8 +166,12 @@
 ASSERT(element());
 // If an unselected radio is tabbed into (because the entire group has nothing
 // checked, or because of some explicit .focus() call), then allow space to check it.
-if (element()->checked())
+if (element()->checked()) {
+// If we are going to skip DispatchSimulatedClick, then at least call setActive(false)
+// to prevent the radio from being stuck in the active state.
+element()->setActive(false);
 return;
+}
 dispatchSimulatedClickIfActive(event);
 }
 






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


[webkit-changes] [294316] trunk/LayoutTests

2022-05-17 Thread zsun
Title: [294316] trunk/LayoutTests








Revision 294316
Author z...@igalia.com
Date 2022-05-17 02:08:43 -0700 (Tue, 17 May 2022)


Log Message
tidy up some test expectations files after resync html/semantics/forms tests
https://bugs.webkit.org/show_bug.cgi?id=240451

Reviewed by Tim Nguyen.

LayoutTests/imported/w3c:

* web-platform-tests/html/semantics/forms/constraints/form-validation-checkValidity-expected.txt:
* web-platform-tests/html/semantics/forms/constraints/form-validation-reportValidity-expected.txt:
* web-platform-tests/html/semantics/forms/constraints/form-validation-validity-badInput-expected.txt:
* web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeOverflow-expected.txt:
* web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow-expected.txt:
* web-platform-tests/html/semantics/forms/constraints/form-validation-validity-stepMismatch-expected.txt:
* web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valid-expected.txt:
* web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valueMissing-expected.txt:
* web-platform-tests/html/semantics/forms/constraints/form-validation-willValidate-expected.txt:

LayoutTests:

This is to tidy up some test expectation files are WPT upstream resync at bug 240301.

* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-checkValidity-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-reportValidity-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-badInput-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeOverflow-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-stepMismatch-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valid-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valueMissing-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-willValidate-expected.txt: Removed.
* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-checkValidity-expected.txt: Removed.
* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-reportValidity-expected.txt: Removed.
* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-badInput-expected.txt: Removed.
* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeOverflow-expected.txt: Removed.
* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow-expected.txt: Removed.
* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-stepMismatch-expected.txt: Removed.
* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valid-expected.txt: Removed.
* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valueMissing-expected.txt: Removed.
* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-willValidate-expected.txt: Removed.
* platform/ios/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-reportValidity-expected.txt: Removed.
* platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-badInput-expected.txt: Removed.
* platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-checkValidity-expected.txt: Removed.
* platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-reportValidity-expected.txt: Removed.
* platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-badInput-expected.txt: Removed.
* platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeOverflow-expected.txt: Removed.
* platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow-expected.txt: Removed.
* platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-stepMismatch-expected.txt: Removed.
* 

[webkit-changes] [294249] trunk

2022-05-16 Thread zsun
Title: [294249] trunk








Revision 294249
Author z...@igalia.com
Date 2022-05-16 12:00:08 -0700 (Mon, 16 May 2022)


Log Message
[css-ui] alias appearance  keywords to 'auto' for textfield
https://bugs.webkit.org/show_bug.cgi?id=238551

Reviewed by Tim Nguyen.

Source/WebCore:

This is to add support of aliasing appearance to 'auto' for textfield.
It has improved the following wpt tests
imported/w3c/web-platform-tests/css/css-ui/appearance-textfield-001.html
and
imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-textfield-001.html.

The test failures though, are not fully fixed. The issue left is that the search cancel button
for input type="search" still present while it is expected to disappear (Bug 238751).

* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustAppearanceForElement const):

LayoutTests:

Rename test name as the test result now matches the expected.
* fast/forms/color/color-input-uses-color-well-appearance-expected.html: Renamed from LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected-mismatch.html.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderTheme.cpp


Added Paths

trunk/LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected.html


Removed Paths

trunk/LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected-mismatch.html




Diff

Modified: trunk/LayoutTests/ChangeLog (294248 => 294249)

--- trunk/LayoutTests/ChangeLog	2022-05-16 18:54:01 UTC (rev 294248)
+++ trunk/LayoutTests/ChangeLog	2022-05-16 19:00:08 UTC (rev 294249)
@@ -1,3 +1,13 @@
+2022-05-16  Ziran Sun  
+
+[css-ui] alias appearance  keywords to 'auto' for textfield
+https://bugs.webkit.org/show_bug.cgi?id=238551
+
+Reviewed by Tim Nguyen.
+
+Rename test name as the test result now matches the expected.
+* fast/forms/color/color-input-uses-color-well-appearance-expected.html: Renamed from LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected-mismatch.html.
+
 2022-05-16  Karl Rackler  
 
 [Gardening]: REGRESSION (r264117): [ Mac iOS ] imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/blob.https.html


Deleted: trunk/LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected-mismatch.html (294248 => 294249)

--- trunk/LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected-mismatch.html	2022-05-16 18:54:01 UTC (rev 294248)
+++ trunk/LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected-mismatch.html	2022-05-16 19:00:08 UTC (rev 294249)
@@ -1 +0,0 @@
-


Copied: trunk/LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected.html (from rev 294248, trunk/LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected-mismatch.html) (0 => 294249)

--- trunk/LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected.html	(rev 0)
+++ trunk/LayoutTests/fast/forms/color/color-input-uses-color-well-appearance-expected.html	2022-05-16 19:00:08 UTC (rev 294249)
@@ -0,0 +1 @@
+


Modified: trunk/Source/WebCore/ChangeLog (294248 => 294249)

--- trunk/Source/WebCore/ChangeLog	2022-05-16 18:54:01 UTC (rev 294248)
+++ trunk/Source/WebCore/ChangeLog	2022-05-16 19:00:08 UTC (rev 294249)
@@ -1,3 +1,22 @@
+2022-05-16  Ziran Sun  
+
+[css-ui] alias appearance  keywords to 'auto' for textfield
+https://bugs.webkit.org/show_bug.cgi?id=238551
+
+Reviewed by Tim Nguyen.
+
+This is to add support of aliasing appearance to 'auto' for textfield.
+It has improved the following wpt tests
+imported/w3c/web-platform-tests/css/css-ui/appearance-textfield-001.html
+and
+imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-textfield-001.html.
+
+The test failures though, are not fully fixed. The issue left is that the search cancel button
+for input type="search" still present while it is expected to disappear (Bug 238751).
+
+* rendering/RenderTheme.cpp:
+(WebCore::RenderTheme::adjustAppearanceForElement const):
+
 2022-05-16  Loïc Le Page  
 
 REGRESSION(r294104): [GStreamer][VideoCapture] Webcam raw streams may hang up the video capture pipeline


Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (294248 => 294249)

--- trunk/Source/WebCore/rendering/RenderTheme.cpp	2022-05-16 18:54:01 UTC (rev 294248)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp	2022-05-16 19:00:08 UTC (rev 294249)
@@ -117,6 +117,13 @@
 return autoAppearance;
 }
 
+if (part == TextFieldPart) {
+if (is(*element) && downcast(*element).isSearchField())
+return part;
+style.setEffectiveAppearance(autoAppearance);
+return autoAppearance;
+}
+
 return part;
 }
 






___
webkit-changes mailing list

[webkit-changes] [294163] trunk

2022-05-13 Thread zsun
Title: [294163] trunk








Revision 294163
Author z...@igalia.com
Date 2022-05-13 10:25:12 -0700 (Fri, 13 May 2022)


Log Message
input.showPicker() should throw when input is readonly/disabled
https://bugs.webkit.org/show_bug.cgi?id=240302

Reviewed by Tim Nguyen.

LayoutTests/imported/w3c:

* web-platform-tests/html/semantics/forms/the-input-element/show-picker-disabled-readonly-expected.txt: Added.
* web-platform-tests/html/semantics/forms/the-input-element/show-picker-disabled-readonly.html: Added.

Source/WebCore:

When input is readonly or disabled, input.showPicker() should throw InvalidStateError.

Test: imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/show-picker-disabled-readonly.html

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::showPicker):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/show-picker-disabled-readonly-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLInputElement.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (294162 => 294163)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-05-13 17:21:06 UTC (rev 294162)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-05-13 17:25:12 UTC (rev 294163)
@@ -1,3 +1,13 @@
+2022-05-13  Ziran Sun  
+
+input.showPicker() should throw when input is readonly/disabled
+https://bugs.webkit.org/show_bug.cgi?id=240302
+
+Reviewed by Tim Nguyen.
+
+* web-platform-tests/html/semantics/forms/the-input-element/show-picker-disabled-readonly-expected.txt: Added.
+* web-platform-tests/html/semantics/forms/the-input-element/show-picker-disabled-readonly.html: Added.
+
 2022-05-13  Tim Nguyen  
 
 Clean up some html/semantics/forms/ test expectations


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/show-picker-disabled-readonly-expected.txt (294162 => 294163)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/show-picker-disabled-readonly-expected.txt	2022-05-13 17:21:06 UTC (rev 294162)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/show-picker-disabled-readonly-expected.txt	2022-05-13 17:25:12 UTC (rev 294163)
@@ -1,46 +1,46 @@
 
-FAIL input[type=button] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
-FAIL input[type=checkbox] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
-FAIL input[type=color] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
-FAIL input[type=date] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
-FAIL input[type=datetime-local] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
-FAIL input[type=email] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
-FAIL input[type=file] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
-FAIL input[type=hidden] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
-FAIL input[type=image] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
-FAIL input[type=month] showPicker() throws when disabled 

[webkit-changes] [293976] trunk

2022-05-09 Thread zsun
Title: [293976] trunk








Revision 293976
Author z...@igalia.com
Date 2022-05-09 08:48:32 -0700 (Mon, 09 May 2022)


Log Message
Make input placeholder line-height declaration !important
https://bugs.webkit.org/show_bug.cgi?id=240225

Reviewed by Tim Nguyen.

Source/WebCore:

This is the same the changes made in chromium at
https://chromium-review.googlesource.com/c/chromium/src/+/3594234
and Firefox change at
https://phabricator.services.mozilla.com/D116907

* css/html.css:
(input::placeholder):

LayoutTests:

Unskip the test that passes.
* TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/html.css




Diff

Modified: trunk/LayoutTests/ChangeLog (293975 => 293976)

--- trunk/LayoutTests/ChangeLog	2022-05-09 15:17:26 UTC (rev 293975)
+++ trunk/LayoutTests/ChangeLog	2022-05-09 15:48:32 UTC (rev 293976)
@@ -1,3 +1,13 @@
+2022-05-09  Ziran Sun  
+
+Make input placeholder line-height declaration !important
+https://bugs.webkit.org/show_bug.cgi?id=240225
+
+Reviewed by Tim Nguyen.
+
+Unskip the test that passes. 
+* TestExpectations:
+
 2022-05-09  Antoine Quint  
 
 REGRESSION (r291817): NativeImage passed to RemoteResourceCacheProxy::recordNativeImageUse may be null


Modified: trunk/LayoutTests/TestExpectations (293975 => 293976)

--- trunk/LayoutTests/TestExpectations	2022-05-09 15:17:26 UTC (rev 293975)
+++ trunk/LayoutTests/TestExpectations	2022-05-09 15:48:32 UTC (rev 293976)
@@ -662,7 +662,6 @@
 imported/w3c/web-platform-tests/html/editing/editing-0/spelling-and-grammar-checking/spelling-markers-008.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/html/editing/editing-0/spelling-and-grammar-checking/spelling-markers-010.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/html/rendering/bindings/the-select-element-0/option-label.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/input-placeholder-line-height.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-alpha.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-roman.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-alpha.html [ ImageOnlyFailure ]


Modified: trunk/Source/WebCore/ChangeLog (293975 => 293976)

--- trunk/Source/WebCore/ChangeLog	2022-05-09 15:17:26 UTC (rev 293975)
+++ trunk/Source/WebCore/ChangeLog	2022-05-09 15:48:32 UTC (rev 293976)
@@ -1,3 +1,18 @@
+2022-05-09  Ziran Sun  
+
+Make input placeholder line-height declaration !important
+https://bugs.webkit.org/show_bug.cgi?id=240225
+
+Reviewed by Tim Nguyen.
+
+This is the same the changes made in chromium at
+https://chromium-review.googlesource.com/c/chromium/src/+/3594234
+and Firefox change at
+https://phabricator.services.mozilla.com/D116907
+
+* css/html.css:
+(input::placeholder):
+
 2022-05-09  Antoine Quint  
 
 REGRESSION (r291817): NativeImage passed to RemoteResourceCacheProxy::recordNativeImageUse may be null


Modified: trunk/Source/WebCore/css/html.css (293975 => 293976)

--- trunk/Source/WebCore/css/html.css	2022-05-09 15:17:26 UTC (rev 293975)
+++ trunk/Source/WebCore/css/html.css	2022-05-09 15:48:32 UTC (rev 293976)
@@ -768,7 +768,7 @@
 white-space: pre;
 word-wrap: normal;
 overflow: hidden;
-line-height: initial;
+line-height: initial !important;
 }
 
 input:is([type="hidden"], [type="image"], [type="file"]) {






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


[webkit-changes] [293830] trunk

2022-05-05 Thread zsun
Title: [293830] trunk








Revision 293830
Author z...@igalia.com
Date 2022-05-05 07:45:07 -0700 (Thu, 05 May 2022)


Log Message
 should have box-sizing: border-box in UA stylesheet
https://bugs.webkit.org/show_bug.cgi?id=197878

Reviewed by Tim Nguyen.

LayoutTests/imported/w3c:

* web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt:

Source/WebCore:

As discussed at [1], We should have box-sizing: border-box for , the same
as buttons. WebKit currently has content-box. This patch is to change it to box-box.

Since  is disabled with WebKitLegacy [2], this fix doesn't apply to it. Hence,
for mac-wk1 platform, the test expectation for html/rendering/non-replaced-elements/form-controls/resets.html
stays as it is.

[1] https://github.com/whatwg/html/issues/4281
[2] https://webkit-search.igalia.com/webkit/source/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml#425-437

* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::colorInputStyleSheet const):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::colorInputStyleSheet const):

LayoutTests:

* platform/glib/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt
trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderTheme.cpp
trunk/Source/WebCore/rendering/RenderThemeIOS.mm


Added Paths

trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (293829 => 293830)

--- trunk/LayoutTests/ChangeLog	2022-05-05 13:42:39 UTC (rev 293829)
+++ trunk/LayoutTests/ChangeLog	2022-05-05 14:45:07 UTC (rev 293830)
@@ -1,3 +1,13 @@
+2022-05-05  Ziran Sun  
+
+ should have box-sizing: border-box in UA stylesheet
+https://bugs.webkit.org/show_bug.cgi?id=197878
+
+Reviewed by Tim Nguyen.
+
+* platform/glib/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt:
+* platform/mac-wk1/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt.
+
 2022-05-04  Devin Rousso  
 
 [Apple Pay] REGRESSION(r291588): `appearance: -apple-pay-button` doesn't work with `border-width: 0`


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (293829 => 293830)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-05-05 13:42:39 UTC (rev 293829)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-05-05 14:45:07 UTC (rev 293830)
@@ -1,3 +1,12 @@
+2022-05-05  Ziran Sun  
+
+ should have box-sizing: border-box in UA stylesheet
+https://bugs.webkit.org/show_bug.cgi?id=197878
+
+Reviewed by Tim Nguyen.
+
+* web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt:
+
 2022-05-04  Ziran Sun  
 
 [InputElement] Selection after type change needs to follow HTML specification


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt (293829 => 293830)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt	2022-05-05 13:42:39 UTC (rev 293829)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt	2022-05-05 14:45:07 UTC (rev 293830)
@@ -134,7 +134,7 @@
 PASS  - text-shadow
 PASS  - text-align
 PASS  - display
-FAIL  - box-sizing assert_equals: expected "border-box" but got "content-box"
+PASS  - box-sizing
 PASS  - letter-spacing
 PASS  - word-spacing
 PASS  - line-height


Modified: trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt (293829 => 293830)

--- trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt	2022-05-05 13:42:39 UTC (rev 293829)
+++ 

[webkit-changes] [293773] trunk

2022-05-04 Thread zsun
Title: [293773] trunk








Revision 293773
Author z...@igalia.com
Date 2022-05-04 07:48:29 -0700 (Wed, 04 May 2022)


Log Message
[InputElement] Selection after type change needs to follow HTML specification
https://bugs.webkit.org/show_bug.cgi?id=237361

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt:

Source/WebCore:

As per spec at https://html.spec.whatwg.org/multipage/input.html#input-type-change,
following step 7-9, if the previous type doesn't support Selection API and the new type
does, selectionStart and selectionEnd should be 0, selectionDirection should be set to "none".

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::runPostTypeUpdateTasks):
(WebCore::HTMLInputElement::initializeInputType):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):

LayoutTests:

* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt.
* platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
* platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt
trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt
trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLInputElement.cpp
trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp


Added Paths

trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (293772 => 293773)

--- trunk/LayoutTests/ChangeLog	2022-05-04 14:23:18 UTC (rev 293772)
+++ trunk/LayoutTests/ChangeLog	2022-05-04 14:48:29 UTC (rev 293773)
@@ -1,3 +1,16 @@
+2022-05-04  Ziran Sun  
+
+[InputElement] Selection after type change needs to follow HTML specification
+https://bugs.webkit.org/show_bug.cgi?id=237361
+
+Reviewed by Chris Dumez.
+
+* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
+* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
+* platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt.
+* platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
+* platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
+
 2022-04-30  Philippe Normand  
 
 [GStreamer] Mediastream mock audio interruption fixes after r290985


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (293772 => 293773)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-05-04 14:23:18 UTC (rev 293772)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-05-04 14:48:29 UTC (rev 293773)
@@ -1,3 +1,12 @@
+2022-05-04  Ziran Sun  
+
+[InputElement] Selection after type change needs to follow HTML specification
+https://bugs.webkit.org/show_bug.cgi?id=237361
+
+Reviewed by Chris Dumez.
+
+* web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt:
+
 2022-05-03  Youenn Fablet  
 
 ServiceWorkerRegistration update should fail if called from an installing service worker context


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt (293772 

[webkit-changes] [293673] trunk

2022-05-02 Thread zsun
Title: [293673] trunk








Revision 293673
Author z...@igalia.com
Date 2022-05-02 12:12:06 -0700 (Mon, 02 May 2022)


Log Message
[selection] Set correct selection range for TEXTAREA when updating default value
https://bugs.webkit.org/show_bug.cgi?id=237525

Reviewed by  Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt:

Source/WebCore:

Updating defaultValue should keep selectionStart/End. We need clamp them if the new value is shorter than the
selectionStart/End. This change is to be in line with [1] & [2].

[1] https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element:dom-textarea-defaultvalue-2
[2] https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#textFieldSelection:concept-textarea/input-relevant-value

Part of this change is an import of Chromium CL at
https://github.com/chromium/chromium/commit/bb27a500d07f8b3c567e84857a40c3ce42fa454a

* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::childrenChanged):
(WebCore::HTMLTextAreaElement::setValueCommon):
* html/HTMLTextFormControlElement.h:

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLTextAreaElement.cpp
trunk/Source/WebCore/html/HTMLTextFormControlElement.h




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (293672 => 293673)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-05-02 19:01:44 UTC (rev 293672)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-05-02 19:12:06 UTC (rev 293673)
@@ -1,3 +1,12 @@
+2022-05-02  Ziran Sun  
+
+[selection] Set correct selection range for TEXTAREA when updating default value
+https://bugs.webkit.org/show_bug.cgi?id=237525
+
+Reviewed by  Chris Dumez.
+
+* web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt:
+
 2022-05-02  Oriol Brufau  
 
 [cssom] Enumerate all logical longhands in the computed style


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt (293672 => 293673)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt	2022-05-02 19:01:44 UTC (rev 293672)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt	2022-05-02 19:12:06 UTC (rev 293673)
@@ -5,7 +5,7 @@
 PASS Adding children to a textarea should NOT move selection{Start,End} to the end
 PASS Removing children from a textarea should NOT update selection{Start,End}
 PASS Setting the same value (with different newlines) in a textarea should NOT update selection{Start,End}
-FAIL Removing child nodes in non-dirty textarea should make selection{Start,End} 0 assert_equals: selectionStart after node removal expected 0 but got 3
+PASS Removing child nodes in non-dirty textarea should make selection{Start,End} 0
 PASS Setting value to a shorter string than defaultValue should correct the cursor position
 PASS Shortening value by turning the input type into 'url' should correct selection{Start,End}
 FAIL Shortening value by turning the input type into 'color' and back to 'text' should correct selection{Start,End} assert_equals: expected 0 but got 9


Modified: trunk/Source/WebCore/ChangeLog (293672 => 293673)

--- trunk/Source/WebCore/ChangeLog	2022-05-02 19:01:44 UTC (rev 293672)
+++ trunk/Source/WebCore/ChangeLog	2022-05-02 19:12:06 UTC (rev 293673)
@@ -1,3 +1,24 @@
+2022-05-02  Ziran Sun  
+
+[selection] Set correct selection range for TEXTAREA when updating default value
+https://bugs.webkit.org/show_bug.cgi?id=237525
+
+Reviewed by  Chris Dumez.
+
+Updating defaultValue should keep selectionStart/End. We need clamp them if the new value is shorter than the
+selectionStart/End. This change is to be in line with [1] & [2].
+
+[1] https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element:dom-textarea-defaultvalue-2
+[2] https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#textFieldSelection:concept-textarea/input-relevant-value
+
+Part of this change is an import of Chromium CL at
+https://github.com/chromium/chromium/commit/bb27a500d07f8b3c567e84857a40c3ce42fa454a
+
+* html/HTMLTextAreaElement.cpp:
+(WebCore::HTMLTextAreaElement::childrenChanged):
+(WebCore::HTMLTextAreaElement::setValueCommon):
+* html/HTMLTextFormControlElement.h:
+
 2022-05-02  Fujii Hironori  
 
 HTML Parser: Wrong column number in CR-LF line ending style (DOS EOL style) HTML files


Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.cpp (293672 

[webkit-changes] [293511] trunk

2022-04-27 Thread zsun
Title: [293511] trunk








Revision 293511
Author z...@igalia.com
Date 2022-04-27 09:30:31 -0700 (Wed, 27 Apr 2022)


Log Message
[css-ui] Remove some unimplemented -webkit-appearance keywords
https://bugs.webkit.org/show_bug.cgi?id=238930

Reviewed by Aditya Keerthi.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:

Source/WebCore:

Remove the following unimplmented --webkit-appearance keyworkds:
button-bevel
media-controls-background
media-controls-fullscreen-background
media-current-time-display
media-enter-fullscreen-button
media-exit-fullscreen-button
media-mute-button
media-overlay-play-button
media-return-to-realtime-button
media-rewind-button
media-seek-back-button
media-seek-forward-button
media-time-remaining-display
media-toggle-closed-captions-button
media-volume-slider-container
menulist-textfield
menulist-text

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSProperties.json:
* css/CSSValueKeywords.in:
* platform/ThemeTypes.cpp:
(WebCore::operator<<):
* platform/ThemeTypes.h:
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::paint):
* rendering/RenderTheme.h:
(WebCore::RenderTheme::paintMediaPlayButton):
(WebCore::RenderTheme::paintMediaMuteButton):
(WebCore::RenderTheme::paintMediaSliderThumb):
(WebCore::RenderTheme::paintMediaVolumeSliderThumb):
(WebCore::RenderTheme::paintMediaFullscreenButton): Deleted.
(WebCore::RenderTheme::paintMediaOverlayPlayButton): Deleted.
(WebCore::RenderTheme::paintMediaSeekBackButton): Deleted.
(WebCore::RenderTheme::paintMediaSeekForwardButton): Deleted.
(WebCore::RenderTheme::paintMediaVolumeSliderContainer): Deleted.
(WebCore::RenderTheme::paintMediaRewindButton): Deleted.
(WebCore::RenderTheme::paintMediaReturnToRealtimeButton): Deleted.
(WebCore::RenderTheme::paintMediaToggleClosedCaptionsButton): Deleted.
(WebCore::RenderTheme::paintMediaControlsBackground): Deleted.
(WebCore::RenderTheme::paintMediaCurrentTime): Deleted.
(WebCore::RenderTheme::paintMediaTimeRemaining): Deleted.

Source/WebInspectorUI:

We might need to update the changes on UserInterface/External/CodeMirror/css.js since
PR https://github.com/codemirror/CodeMirror/pull/6912 has been merged in CodeMirror.

* UserInterface/External/CSSDocumentation/CSSDocumentation-overrides.json:
* UserInterface/External/CSSDocumentation/CSSDocumentation.js:

LayoutTests:

* imported/blink/editing/execCommand/outdent-collapse-table-crash.html:
* platform/gtk/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
* platform/ios-wk2/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/imported/blink/editing/execCommand/outdent-collapse-table-crash.html
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt
trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
trunk/Source/WebCore/css/CSSProperties.json
trunk/Source/WebCore/css/CSSValueKeywords.in
trunk/Source/WebCore/platform/ThemeTypes.cpp
trunk/Source/WebCore/platform/ThemeTypes.h
trunk/Source/WebCore/rendering/RenderTheme.cpp
trunk/Source/WebCore/rendering/RenderTheme.h
trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/External/CSSDocumentation/CSSDocumentation-overrides.json
trunk/Source/WebInspectorUI/UserInterface/External/CSSDocumentation/CSSDocumentation.js




Diff

Modified: trunk/LayoutTests/ChangeLog (293510 => 293511)

--- trunk/LayoutTests/ChangeLog	2022-04-27 15:49:39 UTC (rev 293510)
+++ trunk/LayoutTests/ChangeLog	2022-04-27 16:30:31 UTC (rev 293511)
@@ -1,3 +1,14 @@
+2022-04-27  Ziran Sun  
+
+[css-ui] Remove some unimplemented -webkit-appearance keywords
+https://bugs.webkit.org/show_bug.cgi?id=238930
+
+Reviewed by Aditya Keerthi.
+
+* imported/blink/editing/execCommand/outdent-collapse-table-crash.html:
+* platform/gtk/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
+* platform/ios-wk2/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
+
 2022-04-27  Youenn Fablet  
 
 Add testRunner API to clear memory cache


Modified: trunk/LayoutTests/imported/blink/editing/execCommand/outdent-collapse-table-crash.html (293510 => 293511)

--- trunk/LayoutTests/imported/blink/editing/execCommand/outdent-collapse-table-crash.html	2022-04-27 15:49:39 UTC (rev 293510)
+++ trunk/LayoutTests/imported/blink/editing/execCommand/outdent-collapse-table-crash.html	2022-04-27 16:30:31 UTC (rev 293511)
@@ -3,7 +3,6 @@
 
 

[webkit-changes] [293444] trunk

2022-04-26 Thread zsun
Title: [293444] trunk








Revision 293444
Author z...@igalia.com
Date 2022-04-26 12:31:41 -0700 (Tue, 26 Apr 2022)


Log Message
Constructed FormData object should not contain an entry for the submit button that was used to submit the form
https://bugs.webkit.org/show_bug.cgi?id=239070

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update test expectation as the sub-test is now passing.
* web-platform-tests/html/semantics/forms/form-submission-0/constructing-form-data-set-expected.txt:

Source/WebCore:

When the activedSubmit flag is set for a submit button, its value is appended to a FormData. In the case of form
submission called in submit event handler, we include submit button when build FormData. The submit button should
not be included though. This patch correct it by calling set the activatedSubmit flag just before or after building
FormData.

Part of the patch is an import of Chromium CL at
https://codereview.chromium.org/2340213002

* html/DOMFormData.cpp:
(WebCore::DOMFormData::create):
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::defaultEventHandler):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::submit):
(WebCore::HTMLFormElement::constructEntryList):
* html/HTMLFormElement.h:
* html/SubmitInputType.cpp:
(WebCore::SubmitInputType::handleDOMActivateEvent):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/constructing-form-data-set-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/DOMFormData.cpp
trunk/Source/WebCore/html/HTMLButtonElement.cpp
trunk/Source/WebCore/html/HTMLFormElement.cpp
trunk/Source/WebCore/html/HTMLFormElement.h
trunk/Source/WebCore/html/SubmitInputType.cpp
trunk/Source/WebCore/loader/FormSubmission.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (293443 => 293444)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-04-26 19:25:35 UTC (rev 293443)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-04-26 19:31:41 UTC (rev 293444)
@@ -1,3 +1,13 @@
+2022-04-26  Ziran Sun  
+
+Constructed FormData object should not contain an entry for the submit button that was used to submit the form
+https://bugs.webkit.org/show_bug.cgi?id=239070
+
+Reviewed by Chris Dumez.
+
+Update test expectation as the sub-test is now passing.
+* web-platform-tests/html/semantics/forms/form-submission-0/constructing-form-data-set-expected.txt:
+
 2022-04-26  Youenn Fablet  
 
 Service Worker loads should not expose some ResourceTiming information


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/constructing-form-data-set-expected.txt (293443 => 293444)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/constructing-form-data-set-expected.txt	2022-04-26 19:25:35 UTC (rev 293443)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/constructing-form-data-set-expected.txt	2022-04-26 19:31:41 UTC (rev 293444)
@@ -21,5 +21,5 @@
 PASS "formData" IDL attribute should have entries for form-associated elements in the first event handler, and the second handler can read entries set by the first handler.
 PASS Entries added to "formData" IDL attribute should be submitted.
 PASS Entries added to the "formdata" IDL attribute shouldn't be newline normalized in the resulting FormData
-FAIL The constructed FormData object should not contain an entry for the submit button that was used to submit the form. assert_false: expected false got true
+PASS The constructed FormData object should not contain an entry for the submit button that was used to submit the form.
 


Modified: trunk/Source/WebCore/ChangeLog (293443 => 293444)

--- trunk/Source/WebCore/ChangeLog	2022-04-26 19:25:35 UTC (rev 293443)
+++ trunk/Source/WebCore/ChangeLog	2022-04-26 19:31:41 UTC (rev 293444)
@@ -1,3 +1,31 @@
+2022-04-26  Ziran Sun  
+
+Constructed FormData object should not contain an entry for the submit button that was used to submit the form
+https://bugs.webkit.org/show_bug.cgi?id=239070
+
+Reviewed by Chris Dumez.
+
+When the activedSubmit flag is set for a submit button, its value is appended to a FormData. In the case of form
+submission called in submit event handler, we include submit button when build FormData. The submit button should
+not be included though. This patch correct it by calling set the activatedSubmit flag just before or after building
+FormData.
+
+Part of the patch is an import of Chromium CL at
+https://codereview.chromium.org/2340213002
+
+* html/DOMFormData.cpp:
+(WebCore::DOMFormData::create):
+* html/HTMLButtonElement.cpp:
+(WebCore::HTMLButtonElement::defaultEventHandler):
+* 

[webkit-changes] [293322] trunk

2022-04-25 Thread zsun
Title: [293322] trunk








Revision 293322
Author z...@igalia.com
Date 2022-04-25 06:06:15 -0700 (Mon, 25 Apr 2022)


Log Message
UA stylesheet should include table { text-indent: initial } to conform with HTML standard
https://bugs.webkit.org/show_bug.cgi?id=201297

Reviewed by Tim Nguyen.

LayoutTests/imported/w3c:

* web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt:
* web-platform-tests/html/rendering/non-replaced-elements/tables/table-ua-stylesheet-expected.txt:

Source/WebCore:

As per [1], text-indent for table should be initial.
[1] https://html.spec.whatwg.org/multipage/rendering.html#tables-2

* css/html.css:
(table):

LayoutTests:

* platform/glib/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/tables/table-ua-stylesheet-expected.txt
trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/html.css




Diff

Modified: trunk/LayoutTests/ChangeLog (293321 => 293322)

--- trunk/LayoutTests/ChangeLog	2022-04-25 12:56:13 UTC (rev 293321)
+++ trunk/LayoutTests/ChangeLog	2022-04-25 13:06:15 UTC (rev 293322)
@@ -1,3 +1,12 @@
+2022-04-25  Ziran Sun  
+
+UA stylesheet should include table { text-indent: initial } to conform with HTML standard
+https://bugs.webkit.org/show_bug.cgi?id=201297
+
+Reviewed by Tim Nguyen.
+
+* platform/glib/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt:
+
 2022-04-25  Kimmo Kinnunen  
 
 REGRESSION (249585@main): TestWebKitAPI.IPCTestingAPI.CanReceiveIPCSemaphore is timing out


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (293321 => 293322)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-04-25 12:56:13 UTC (rev 293321)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-04-25 13:06:15 UTC (rev 293322)
@@ -1,3 +1,13 @@
+2022-04-25  Ziran Sun  
+
+UA stylesheet should include table { text-indent: initial } to conform with HTML standard
+https://bugs.webkit.org/show_bug.cgi?id=201297
+
+Reviewed by Tim Nguyen.
+
+* web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt:
+* web-platform-tests/html/rendering/non-replaced-elements/tables/table-ua-stylesheet-expected.txt:
+
 2022-04-24  Youenn Fablet  
 
 TextTrackLoader should use SameOrigin mode by default


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt (293321 => 293322)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt	2022-04-25 12:56:13 UTC (rev 293321)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt	2022-04-25 13:06:15 UTC (rev 293322)
@@ -270,7 +270,7 @@
 PASS  - word-spacing
 PASS  - line-height
 PASS  - text-transform
-FAIL  - text-indent assert_equals: expected "0px" but got "5px"
+PASS  - text-indent
 PASS  - text-shadow
 PASS  - text-align
 PASS  - display
@@ -279,7 +279,7 @@
 PASS  (in ) - word-spacing
 PASS  (in ) - line-height
 PASS  (in ) - text-transform
-FAIL  (in ) - text-indent assert_equals: expected "0px" but got "5px"
+PASS  (in ) - text-indent
 PASS  (in ) - text-shadow
 PASS  (in ) - text-align
 PASS  (in ) - display
@@ -288,7 +288,7 @@
 PASS  (in ) - word-spacing
 PASS  (in ) - line-height
 PASS  (in ) - text-transform
-FAIL  (in ) - text-indent assert_equals: expected "0px" but got "5px"
+PASS  (in ) - text-indent
 PASS  (in ) - text-shadow
 PASS  (in ) - text-align
 PASS  (in ) - display
@@ -297,7 +297,7 @@
 PASS  (in ) - word-spacing
 PASS  (in ) - line-height
 PASS  (in ) - text-transform
-FAIL  (in ) - text-indent assert_equals: expected "0px" but got "5px"
+PASS  (in ) - text-indent
 PASS  (in ) - text-shadow
 PASS  (in ) - text-align
 PASS  (in ) - display


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/tables/table-ua-stylesheet-expected.txt (293321 => 293322)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/tables/table-ua-stylesheet-expected.txt	2022-04-25 12:56:13 UTC (rev 293321)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/tables/table-ua-stylesheet-expected.txt	2022-04-25 13:06:15 UTC (rev 293322)
@@ -3,5 +3,5 @@
 FAIL Computed 'box-sizing' on table should match html spec assert_equals: expected "border-box" but got 

[webkit-changes] [292376] trunk

2022-04-04 Thread zsun
Title: [292376] trunk








Revision 292376
Author z...@igalia.com
Date 2022-04-04 22:38:59 -0700 (Mon, 04 Apr 2022)


Log Message
[Forms] change the default appearance of button, checkbox etc. to 'auto'
https://bugs.webkit.org/show_bug.cgi?id=236012

Reviewed by Tim Nguyen.

LayoutTests/imported/w3c:

* web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt:

Source/WebCore:

Change the default appearance of a few element to 'auto'.
This shouldn't change rendering behavior, but changes

LayoutTests:

* platform/ios-wk2/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt: Removed.
* platform/mac-wk1/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt: Removed.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/html.css
trunk/Source/WebCore/rendering/RenderTheme.cpp
trunk/Source/WebCore/rendering/RenderThemeIOS.mm


Removed Paths

trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/




Diff

Modified: trunk/LayoutTests/ChangeLog (292375 => 292376)

--- trunk/LayoutTests/ChangeLog	2022-04-05 05:36:45 UTC (rev 292375)
+++ trunk/LayoutTests/ChangeLog	2022-04-05 05:38:59 UTC (rev 292376)
@@ -1,3 +1,13 @@
+2022-04-04  Ziran Sun  
+
+[Forms] change the default appearance of button, checkbox etc. to 'auto'
+https://bugs.webkit.org/show_bug.cgi?id=236012
+
+Reviewed by Tim Nguyen.
+
+* platform/ios-wk2/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt: Removed.
+* platform/mac-wk1/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt: Removed.
+
 2022-04-04  Matteo Flores  
 
 REGRESSION(r291770-r291762): [ iOS ] css3/background/background-repeat-round-auto1.html is a flaky image failure


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (292375 => 292376)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-04-05 05:36:45 UTC (rev 292375)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-04-05 05:38:59 UTC (rev 292376)
@@ -1,3 +1,12 @@
+2022-04-04  Ziran Sun  
+
+[Forms] change the default appearance of button, checkbox etc. to 'auto'
+https://bugs.webkit.org/show_bug.cgi?id=236012
+
+Reviewed by Tim Nguyen.
+
+* web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt:
+
 2022-04-04  J Pascoe  
 
 [ iOS 15 ] imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.worker.html is flaky timing out


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt (292375 => 292376)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt	2022-04-05 05:36:45 UTC (rev 292375)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt	2022-04-05 05:38:59 UTC (rev 292376)
@@ -1,33 +1,33 @@
 
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "searchfield"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "textfield"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "slider-horizontal"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "color-well"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "checkbox"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "radio"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "push-button"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got "push-button"
-FAIL  assert_equals: -webkit-appearance expected "auto" but got 

[webkit-changes] [292268] trunk

2022-04-02 Thread zsun
Title: [292268] trunk








Revision 292268
Author z...@igalia.com
Date 2022-04-02 11:38:23 -0700 (Sat, 02 Apr 2022)


Log Message
[css-ui] Only apply 'overflow:visible' to elements that support menulist appearance
https://bugs.webkit.org/show_bug.cgi?id=238501

Reviewed by Tim Nguyen.

Source/WebCore:

This CL adds support to alias appearance  keywords to 'auto' for menulist.
When an element supports '-webkit-appearance: menulist' or 'appearance: menulist' appearance,
we will apply 'overflow: visible'. The existing code, though, apply 'overflow: visible' before
the 'menulist' appearance is workable. This patch corrects it.

It is an import of chromium CL at
https://chromium.googlesource.com/chromium/src.git/+/1635202d8979f4d42b96021d8386278261e52768

* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustAppearanceForElement const):
(WebCore::RenderTheme::adjustMenuListStyle const):
* rendering/RenderThemeAdwaita.cpp:
(WebCore::RenderThemeAdwaita::adjustMenuListStyle const):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::adjustMenuListStyle const):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::adjustMenuListStyle const):
* style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjust const):

LayoutTests:

Unskip the tests that are now passing.
* TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderTheme.cpp
trunk/Source/WebCore/rendering/RenderThemeAdwaita.cpp
trunk/Source/WebCore/rendering/RenderThemeMac.mm
trunk/Source/WebCore/rendering/RenderThemeWin.cpp
trunk/Source/WebCore/style/StyleAdjuster.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (292267 => 292268)

--- trunk/LayoutTests/ChangeLog	2022-04-02 16:36:36 UTC (rev 292267)
+++ trunk/LayoutTests/ChangeLog	2022-04-02 18:38:23 UTC (rev 292268)
@@ -1,3 +1,13 @@
+2022-04-02  Ziran Sun  
+
+[css-ui] Only apply 'overflow:visible' to elements that support menulist appearance
+https://bugs.webkit.org/show_bug.cgi?id=238501
+
+Reviewed by Tim Nguyen.
+
+Unskip the tests that are now passing. 
+* TestExpectations:
+
 2022-04-02  Youenn Fablet  
 
 Remove notifications from notification list when notification gets closed


Modified: trunk/LayoutTests/TestExpectations (292267 => 292268)

--- trunk/LayoutTests/TestExpectations	2022-04-02 16:36:36 UTC (rev 292267)
+++ trunk/LayoutTests/TestExpectations	2022-04-02 18:38:23 UTC (rev 292268)
@@ -4325,7 +4325,6 @@
 webkit.org/b/234762 imported/w3c/web-platform-tests/css/css-writing-modes/wm-propagation-body-dynamic-change-003.html [ ImageOnlyFailure ]
 
 # New failures after updating WPT import of css/css-text on 2020-07
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-menulist-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-menulist-button-002.tentative.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-textfield-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/outline-021.html [ ImageOnlyFailure ]
@@ -4333,7 +4332,6 @@
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/outline-026.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/outline-offset-table-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/text-overflow-ruby.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-menulist-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-menulist-button-002.tentative.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-textfield-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/resize-child-will-change-transform.html [ ImageOnlyFailure ]


Modified: trunk/Source/WebCore/ChangeLog (292267 => 292268)

--- trunk/Source/WebCore/ChangeLog	2022-04-02 16:36:36 UTC (rev 292267)
+++ trunk/Source/WebCore/ChangeLog	2022-04-02 18:38:23 UTC (rev 292268)
@@ -1,3 +1,30 @@
+2022-04-02  Ziran Sun  
+
+[css-ui] Only apply 'overflow:visible' to elements that support menulist appearance
+https://bugs.webkit.org/show_bug.cgi?id=238501
+
+Reviewed by Tim Nguyen.
+
+This CL adds support to alias appearance  keywords to 'auto' for menulist.
+When an element supports '-webkit-appearance: menulist' or 'appearance: menulist' appearance,
+we will apply 'overflow: visible'. The existing code, though, apply 'overflow: visible' before
+the 'menulist' appearance is workable. This patch corrects it.
+
+It is an import of chromium CL at
+

[webkit-changes] [291990] trunk

2022-03-28 Thread zsun
Title: [291990] trunk








Revision 291990
Author z...@igalia.com
Date 2022-03-28 14:11:37 -0700 (Mon, 28 Mar 2022)


Log Message
[selection] Fire Select event when selection extent or direction changes
https://bugs.webkit.org/show_bug.cgi?id=238142

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update test expectations as more sub-tests are now passing.
* web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt:
* web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText-expected.txt:
* web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange-expected.txt:

Source/WebCore:

As per step 6 at [1], if either extent or direction of the text control to be modified,
we need to queue an element task on the user interaction task source given the element
to fire an select event with the bubbles attribute initialized to true.

[1] https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#set-the-selection-range

* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setSelectionRange):
(WebCore::HTMLTextFormControlElement::cacheSelection):
(WebCore::HTMLTextFormControlElement::restoreCachedSelection):
(WebCore::HTMLTextFormControlElement::scheduleSelectEvent):
* html/HTMLTextFormControlElement.h:
(WebCore::HTMLTextFormControlElement::cacheSelection): Deleted.

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp
trunk/Source/WebCore/html/HTMLTextFormControlElement.h




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (291989 => 291990)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-28 21:02:59 UTC (rev 291989)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-28 21:11:37 UTC (rev 291990)
@@ -1,3 +1,15 @@
+2022-03-28  Ziran Sun  
+
+[selection] Fire Select event when selection extent or direction changes
+https://bugs.webkit.org/show_bug.cgi?id=238142
+
+Reviewed by Chris Dumez.
+
+Update test expectations as more sub-tests are now passing.
+* web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt:
+* web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText-expected.txt:
+* web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange-expected.txt:
+
 2022-03-27  Matt Woodrow  
 
 Preserve repeat() notation for grid-templates


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt (291989 => 291990)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt	2022-03-28 21:02:59 UTC (rev 291989)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt	2022-03-28 21:11:37 UTC (rev 291990)
@@ -1,6 +1,4 @@
 
-Harness Error (TIMEOUT), message = null
-
 PASS Sanity check for testValue length; if this fails, variou absolute offsets in the test below need to be adjusted to be less than testValue.length
 PASS Initial .value set on input-appended should set selectionStart to end of value
 PASS Initial .value set on input-not-appended should set selectionStart to end of value
@@ -19,25 +17,25 @@
 PASS Initial .value set on textarea-appended-prefocused should set selectionEnd to end of value
 PASS Initial .value set on textarea-not-appended-prefocused should set selectionEnd to end of value
 PASS onselect should fire when selectionStart is changed
-NOTRUN onselect should fire when selectionStart is changed on input-appended
-NOTRUN onselect should fire when selectionStart is changed on input-not-appended
-NOTRUN onselect should fire when selectionStart is changed on input-appended-prefocused
-NOTRUN onselect should fire when selectionStart is changed on input-not-appended-prefocused
-NOTRUN onselect should fire when selectionStart is changed on textarea-appended
-NOTRUN onselect should fire when selectionStart is changed on textarea-not-appended
-NOTRUN onselect should fire when selectionStart is changed on textarea-appended-prefocused
-NOTRUN onselect should fire when selectionStart is changed on textarea-not-appended-prefocused
-NOTRUN onselect should fire when selectionStart is changed on
+PASS onselect should fire when selectionStart is changed on input-appended
+PASS onselect should fire when 

[webkit-changes] [291962] trunk

2022-03-28 Thread zsun
Title: [291962] trunk








Revision 291962
Author z...@igalia.com
Date 2022-03-28 05:08:56 -0700 (Mon, 28 Mar 2022)


Log Message
[Forms] Alias appearance  keywords to 'auto' for button
https://bugs.webkit.org/show_bug.cgi?id=238252

Reviewed by Darin Adler.

Source/WebCore:

We need to alias appearance  keywords to 'auto'. This is to
handle some button related cases including button, push-button and square-button.
Also the slider-horizontal case has been addressed. We still have menulist and
textfield cases left to look into.

* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustAppearanceForElement const):

LayoutTests:

Unskip the tests that are now passing.
-webkit-appearance: square-button doesnt work for ::-webkit-file-upload-button any more.
Replace it with -webkit-appearance: none in fast/forms/file/file-style-inheritance.html.
This is also in line with the change in Chromium.
* TestExpectations:
* fast/forms/file/file-style-inheritance.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/fast/forms/file/file-style-inheritance.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderTheme.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (291961 => 291962)

--- trunk/LayoutTests/ChangeLog	2022-03-28 08:27:30 UTC (rev 291961)
+++ trunk/LayoutTests/ChangeLog	2022-03-28 12:08:56 UTC (rev 291962)
@@ -1,3 +1,17 @@
+2022-03-28  Ziran Sun  
+
+[Forms] Alias appearance  keywords to 'auto' for button
+https://bugs.webkit.org/show_bug.cgi?id=238252
+
+Reviewed by Darin Adler.
+
+Unskip the tests that are now passing.
+-webkit-appearance: square-button doesnt work for ::-webkit-file-upload-button any more.
+Replace it with -webkit-appearance: none in fast/forms/file/file-style-inheritance.html.
+This is also in line with the change in Chromium.
+* TestExpectations:
+* fast/forms/file/file-style-inheritance.html:
+
 2022-03-28  Cameron McCormack  
 
 Remove pending UA shadow tree state when an input element is removed from the document


Modified: trunk/LayoutTests/TestExpectations (291961 => 291962)

--- trunk/LayoutTests/TestExpectations	2022-03-28 08:27:30 UTC (rev 291961)
+++ trunk/LayoutTests/TestExpectations	2022-03-28 12:08:56 UTC (rev 291962)
@@ -4312,12 +4312,8 @@
 webkit.org/b/234762 imported/w3c/web-platform-tests/css/css-writing-modes/wm-propagation-body-dynamic-change-003.html [ ImageOnlyFailure ]
 
 # New failures after updating WPT import of css/css-text on 2020-07
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-button-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-menulist-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-menulist-button-002.tentative.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-push-button-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-slider-horizontal-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-square-button-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-textfield-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/outline-021.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/outline-025.html [ ImageOnlyFailure ]
@@ -4324,12 +4320,8 @@
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/outline-026.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/outline-offset-table-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/text-overflow-ruby.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-button-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-menulist-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-menulist-button-002.tentative.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-push-button-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-slider-horizontal-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-square-button-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-textfield-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/resize-child-will-change-transform.html [ ImageOnlyFailure ]
 webkit.org/b/214299 

[webkit-changes] [291609] trunk

2022-03-22 Thread zsun
Title: [291609] trunk








Revision 291609
Author z...@igalia.com
Date 2022-03-22 02:43:25 -0700 (Tue, 22 Mar 2022)


Log Message
[selection] Change form's selection attribute to unsigned long
https://bugs.webkit.org/show_bug.cgi?id=237951

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update test expectations as more sub-tests are now passing.
* web-platform-tests/html/semantics/forms/textfieldselection/selection-expected.txt:
* web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt:
* web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange-expected.txt:

Source/WebCore:

We should change the type of attribute "selectionStart" and "selectionEnd"
from long to unsigned long. Also "start" and "end" parameters in function
selectionRange() need to be changed correspondingly.

This change is in line with Chromium CL at
https://github.com/chromium/chromium/commit/b6ff6db1c5683b5e564a72b0941ad504b410d1af

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setDefaultSelectionAfterFocus):
(WebCore::HTMLInputElement::selectionStartForBindings const):
(WebCore::HTMLInputElement::setSelectionStartForBindings):
(WebCore::HTMLInputElement::selectionEndForBindings const):
(WebCore::HTMLInputElement::setSelectionEndForBindings):
(WebCore::HTMLInputElement::setSelectionRangeForBindings):
* html/HTMLInputElement.h:
* html/HTMLInputElement.idl:
* html/HTMLTextAreaElement.idl:
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):
(WebCore::HTMLTextFormControlElement::setSelectionStart):
(WebCore::HTMLTextFormControlElement::setSelectionEnd):
(WebCore::HTMLTextFormControlElement::select):
(WebCore::HTMLTextFormControlElement::setSelectionRange):
(WebCore::HTMLTextFormControlElement::selectionStart const):
(WebCore::HTMLTextFormControlElement::computeSelectionStart const):
(WebCore::HTMLTextFormControlElement::selectionEnd const):
(WebCore::HTMLTextFormControlElement::computeSelectionEnd const):
* html/HTMLTextFormControlElement.h:
(WebCore::HTMLTextFormControlElement::cacheSelection):
(WebCore::HTMLTextFormControlElement::hasCachedSelection const):

LayoutTests:

Update test accordingly. This is inline with Chromium.

Note that for selection-start-end-readonly.html, two sub-tests
are now failing. This is the right behaviour since the test assumes
types for selectionStart and selectionEnd as "int". We could modify the
test and make the type as unsigned. Interestingly the test script's
format is strange and it seems having "return" for each line. Simply updating
some lines on the test scripts causes errors when applying the patch. We have
decided to address this test in a separate patch (maybe remove the file and added
a new one with proper format).

* fast/forms/input-appearance-selection.html:
* fast/forms/selection-functions-expected.txt:
* fast/forms/selection-start-end-readonly-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/forms/input-appearance-selection.html
trunk/LayoutTests/fast/forms/selection-functions-expected.txt
trunk/LayoutTests/fast/forms/selection-start-end-readonly-expected.txt
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLInputElement.cpp
trunk/Source/WebCore/html/HTMLInputElement.h
trunk/Source/WebCore/html/HTMLInputElement.idl
trunk/Source/WebCore/html/HTMLTextAreaElement.idl
trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp
trunk/Source/WebCore/html/HTMLTextFormControlElement.h
trunk/Source/WebCore/html/TextFieldInputType.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (291608 => 291609)

--- trunk/LayoutTests/ChangeLog	2022-03-22 08:51:33 UTC (rev 291608)
+++ trunk/LayoutTests/ChangeLog	2022-03-22 09:43:25 UTC (rev 291609)
@@ -1,3 +1,25 @@
+2022-03-22  Ziran Sun  
+
+[selection] Change form's selection attribute to unsigned long
+https://bugs.webkit.org/show_bug.cgi?id=237951
+
+Reviewed by Chris Dumez.
+
+Update test accordingly. This is inline with Chromium.
+
+Note that for selection-start-end-readonly.html, two sub-tests
+are now failing. This is the right behaviour since the test assumes
+types for selectionStart and selectionEnd as "int". We could modify the
+test and make the type as unsigned. Interestingly the test script's
+format is strange and it seems having "return" for each line. Simply updating
+some lines on 

[webkit-changes] [291555] trunk

2022-03-21 Thread zsun
Title: [291555] trunk








Revision 291555
Author z...@igalia.com
Date 2022-03-21 02:27:07 -0700 (Mon, 21 Mar 2022)


Log Message
[selection] HTMLTextFormControlElement::subtreeHasChanged() shouldn't be called in setRangeText
https://bugs.webkit.org/show_bug.cgi?id=237720

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update test expectations as more sub-tests are now passing.
* web-platform-tests/html/semantics/forms/textfieldselection/selection-value-interactions-expected.txt:
* web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText-expected.txt:

Source/WebCore:

We shouldn't call HTMLTextFormControlElement::subtreeHasChanged() in HTMLTextFormControlElement::setRangeText.
It has been removed in patch for bug 237641. This patch is to further remove unnecessary code.

This change refers and imports some of the changes in chromium CL at
https://codereview.chromium.org/1577243002

* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setRangeText):

LayoutTests:

Update test expectation as the test is now passing.
* fast/forms/setrangetext-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/forms/setrangetext-expected.txt
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-value-interactions-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (291554 => 291555)

--- trunk/LayoutTests/ChangeLog	2022-03-21 08:45:10 UTC (rev 291554)
+++ trunk/LayoutTests/ChangeLog	2022-03-21 09:27:07 UTC (rev 291555)
@@ -1,3 +1,13 @@
+2022-03-21  Ziran Sun  
+
+[selection] HTMLTextFormControlElement::subtreeHasChanged() shouldn't be called in setRangeText
+https://bugs.webkit.org/show_bug.cgi?id=237720
+
+Reviewed by Chris Dumez.
+
+Update test expectation as the test is now passing.
+* fast/forms/setrangetext-expected.txt:
+
 2022-03-21  Carlos Garcia Campos  
 
 REGRESSION(r286955): Rendering Links during search: highlighting fails


Modified: trunk/LayoutTests/fast/forms/setrangetext-expected.txt (291554 => 291555)

--- trunk/LayoutTests/fast/forms/setrangetext-expected.txt	2022-03-21 08:45:10 UTC (rev 291554)
+++ trunk/LayoutTests/fast/forms/setrangetext-expected.txt	2022-03-21 09:27:07 UTC (rev 291555)
@@ -597,7 +597,7 @@
 Check that setRangeText() on disconnected elements doesn't crash and has proper values.
 element.value = '0123456789'
 element.setRangeText('ABC', 0, 0, 'select')
-FAIL element.value should be ABC0123456789. Was 0123456789.
+PASS element.value is "ABC0123456789"
 
 Running tests on input with attributes: {"type":"button"}
 


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (291554 => 291555)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-21 08:45:10 UTC (rev 291554)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-21 09:27:07 UTC (rev 291555)
@@ -1,3 +1,14 @@
+2022-03-21  Ziran Sun  
+
+[selection] HTMLTextFormControlElement::subtreeHasChanged() shouldn't be called in setRangeText
+https://bugs.webkit.org/show_bug.cgi?id=237720
+
+Reviewed by Chris Dumez.
+
+Update test expectations as more sub-tests are now passing.
+* web-platform-tests/html/semantics/forms/textfieldselection/selection-value-interactions-expected.txt:
+* web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText-expected.txt:
+
 2022-03-20  Oriol Brufau  
 
 Fix CSS cascade regarding logical properties


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-value-interactions-expected.txt (291554 => 291555)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-value-interactions-expected.txt	2022-03-21 08:45:10 UTC (rev 291554)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-value-interactions-expected.txt	2022-03-21 09:27:07 UTC (rev 291555)
@@ -1,6 +1,6 @@
 
-FAIL value dirty flag behavior after setRangeText on textarea not in body assert_equals: Calling setRangeText should set the value dirty flag expected "somexyzing" but got "set range text"
-FAIL value dirty flag behavior after setRangeText on input not in body assert_equals: Calling setRangeText should set the value dirty flag expected "somexyzing" but got "set range text"
+PASS value dirty flag behavior after setRangeText on textarea not in body
+PASS value dirty flag behavior after setRangeText on input not in body
 PASS value dirty flag behavior after setRangeText on textarea in body
 PASS value dirty flag behavior after setRangeText on input in body
 

[webkit-changes] [291396] trunk

2022-03-17 Thread zsun
Title: [291396] trunk








Revision 291396
Author z...@igalia.com
Date 2022-03-17 02:19:29 -0700 (Thu, 17 Mar 2022)


Log Message
[Selection] Fixes selection range settings for TEXTAREA
https://bugs.webkit.org/show_bug.cgi?id=237641

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Updating test expectations as some sub-tests are now passing.
* web-platform-tests/html/semantics/forms/textfieldselection/defaultSelection-expected.txt:
* web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt:
* web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt:
* web-platform-tests/html/semantics/forms/textfieldselection/selection-value-interactions-expected.txt:
* web-platform-tests/html/semantics/forms/textfieldselection/textarea-selection-while-parsing-expected.txt:

Source/WebCore:

This CL is to fix the settings of SelectionStart/SelectionEnd for TEXTAREA for non-focused Element. It sets the
caret to the end of the text value except for initializing in most cases. For the case of updating defaultValue
for a non-dirty TEXTAREA, we should following the clamping steps as per spec and it will be addressed in a
follow-up patch.

This CL refers and imports part of the changes in chromium CL at
https://codereview.chromium.org/392573002

TextArea only calls setSelectionRange() for focused element. While for non-focused element, we need to update the caret
except for initializing. Since we are not change text selection for text area in this case, we only cache the selections.
It would be ideal to have a unified function call for both focused and non-focused cases. However, the selectionRange()
function changes focus of the element and the approach we are having here is to avoid the impacts on a good number of
exisiting tests.

This CL also introduces a unified setValue() API in HTMLFormControlElement for HTMLTextAreaElement and HTMLInputElement.

* html/BaseButtonInputType.cpp:
(WebCore::BaseButtonInputType::setValue):
* html/BaseButtonInputType.h:
* html/BaseCheckableInputType.cpp:
(WebCore::BaseCheckableInputType::setValue):
* html/BaseCheckableInputType.h:
* html/BaseDateAndTimeInputType.cpp:
(WebCore::BaseDateAndTimeInputType::setValue):
(WebCore::BaseDateAndTimeInputType::didChangeValueFromControl):
* html/BaseDateAndTimeInputType.h:
* html/ColorInputType.cpp:
(WebCore::ColorInputType::setValue):
* html/ColorInputType.h:
* html/FileInputType.cpp:
(WebCore::FileInputType::setValue):
* html/FileInputType.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setValue):
* html/HTMLInputElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::childrenChanged):
(WebCore::HTMLTextAreaElement::reset):
(WebCore::HTMLTextAreaElement::setValue):
(WebCore::HTMLTextAreaElement::setNonDirtyValue):
(WebCore::HTMLTextAreaElement::setValueCommon):
(WebCore::HTMLTextAreaElement::copyNonAttributePropertiesFromElement):
* html/HTMLTextAreaElement.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setRangeText):
* html/HTMLTextFormControlElement.h:
* html/HiddenInputType.cpp:
(WebCore::HiddenInputType::setValue):
* html/HiddenInputType.h:
* html/InputType.cpp:
(WebCore::InputType::setValue):
* html/InputType.h:
* html/NumberInputType.cpp:
(WebCore::NumberInputType::setValue):
* html/NumberInputType.h:
* html/RangeInputType.cpp:
(WebCore::RangeInputType::setValue):
* html/RangeInputType.h:
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::setValue):
* html/TextFieldInputType.h:

LayoutTests:

Updated two tests that expect resetting value of textarea to change selection to 0.
These changes are in line with changes made in Chromium.
* editing/pasteboard/paste-into-textarea-with-new-line.html:
* fast/spatial-navigation/snav-textarea.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/editing/pasteboard/paste-into-textarea-with-new-line.html
trunk/LayoutTests/fast/spatial-navigation/snav-textarea.html
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/defaultSelection-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-value-interactions-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textarea-selection-while-parsing-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/BaseButtonInputType.cpp
trunk/Source/WebCore/html/BaseButtonInputType.h
trunk/Source/WebCore/html/BaseCheckableInputType.cpp
trunk/Source/WebCore/html/BaseCheckableInputType.h
trunk/Source/WebCore/html/BaseDateAndTimeInputType.cpp

[webkit-changes] [290635] trunk

2022-03-01 Thread zsun
Title: [290635] trunk








Revision 290635
Author z...@igalia.com
Date 2022-03-01 01:01:13 -0800 (Tue, 01 Mar 2022)


Log Message
[Selection] Selection Range should be clamped by the current value length
https://bugs.webkit.org/show_bug.cgi?id=237210

Reviewed by  Darin Adler.

LayoutTests/imported/w3c:

Update the test expectations as some sub-tests are now passing.
* web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt:

Source/WebCore:

As per https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#set-the-selection-range,
if start or end "is greater than the length of the relevant value of the text control, then set it to
the length of the relevant value of the text control".

This CL makes selection range clamp to the current value length.

* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setSelectionRange):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (290634 => 290635)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-01 08:55:07 UTC (rev 290634)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-01 09:01:13 UTC (rev 290635)
@@ -1,3 +1,13 @@
+2022-03-01  Ziran Sun  
+
+[Selection] Selection Range should be clamped by the current value length
+https://bugs.webkit.org/show_bug.cgi?id=237210
+
+Reviewed by  Darin Adler.
+
+Update the test expectations as some sub-tests are now passing.
+* web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt:
+
 2022-02-28  Antoine Quint  
 
 [web-animations] web-animations/interfaces/Animatable/getAnimations.html is a unique failure


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt (290634 => 290635)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt	2022-03-01 08:55:07 UTC (rev 290634)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt	2022-03-01 09:01:13 UTC (rev 290635)
@@ -42,8 +42,8 @@
 PASS Setting selectionEnd to a value smaller than selectionStart should decrease selectionStart
 FAIL selectionStart edge-case values assert_equals: selectionStart setter on input-appended should convert -1 to 2^32-1 expected 10 but got 0
 FAIL selectionEnd edge-case values assert_equals: selectionEnd setter on input-appended should convert -1 to 2^32-1 expected 10 but got 0
-FAIL selectionStart should be clamped by the current value length assert_equals: expected 10 but got 200
-FAIL selectionEnd should be clamped by the current value length assert_equals: expected 10 but got 300
-FAIL setSelectionRange should be clamped by the current value length assert_equals: expected 10 but got 200
+PASS selectionStart should be clamped by the current value length
+PASS selectionEnd should be clamped by the current value length
+PASS setSelectionRange should be clamped by the current value length
 PASS selectionStart and selectionEnd should remain the same when selectionDirection is changed
 


Modified: trunk/Source/WebCore/ChangeLog (290634 => 290635)

--- trunk/Source/WebCore/ChangeLog	2022-03-01 08:55:07 UTC (rev 290634)
+++ trunk/Source/WebCore/ChangeLog	2022-03-01 09:01:13 UTC (rev 290635)
@@ -1,3 +1,19 @@
+2022-03-01  Ziran Sun  
+
+[Selection] Selection Range should be clamped by the current value length
+https://bugs.webkit.org/show_bug.cgi?id=237210
+
+Reviewed by  Darin Adler.
+
+As per https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#set-the-selection-range,
+if start or end "is greater than the length of the relevant value of the text control, then set it to
+the length of the relevant value of the text control".
+
+This CL makes selection range clamp to the current value length.
+
+* html/HTMLTextFormControlElement.cpp:
+(WebCore::HTMLTextFormControlElement::setSelectionRange):
+
 2022-03-01  Matt Woodrow  
 
 Handle perpendicular containing blocks when computing available logical height.


Modified: trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp (290634 => 290635)

--- trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp	2022-03-01 08:55:07 UTC (rev 290634)
+++ trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp	2022-03-01 09:01:13 UTC (rev 290635)
@@ -306,8 +306,9 @@
 if (!isTextField())
 return;
 
-end = std::max(end, 0);
-start = std::min(std::max(start, 0), end);
+// Clamps to the current value length.
+end = std::clamp(end, 0, 

[webkit-changes] [290124] trunk

2022-02-18 Thread zsun
Title: [290124] trunk








Revision 290124
Author z...@igalia.com
Date 2022-02-18 07:39:39 -0800 (Fri, 18 Feb 2022)


Log Message
[InputElement] Return empty string for an invalid floating-point number that ends with "."
https://bugs.webkit.org/show_bug.cgi?id=236700

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/html/semantics/forms/the-input-element/number-expected.txt:

Source/WebCore:

As per specs https://html.spec.whatwg.org/multipage/input.html#number-state-(type%3Dnumber),
"If the value of the element is not a valid floating-point number, then set it to the empty
string instead".

* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseToDoubleForNumberType):

LayoutTests:

* fast/forms/number/number-stepup-stepdown-expected.txt:
* fast/forms/number/number-stepup-stepdown-from-renderer-expected.txt:
* fast/forms/number/number-stepup-stepdown-from-renderer.html:
* fast/forms/number/number-stepup-stepdown.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/forms/number/number-stepup-stepdown-expected.txt
trunk/LayoutTests/fast/forms/number/number-stepup-stepdown-from-renderer-expected.txt
trunk/LayoutTests/fast/forms/number/number-stepup-stepdown-from-renderer.html
trunk/LayoutTests/fast/forms/number/number-stepup-stepdown.html
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/number-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/parser/HTMLParserIdioms.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (290123 => 290124)

--- trunk/LayoutTests/ChangeLog	2022-02-18 15:38:23 UTC (rev 290123)
+++ trunk/LayoutTests/ChangeLog	2022-02-18 15:39:39 UTC (rev 290124)
@@ -1,3 +1,15 @@
+2022-02-18  Ziran Sun  
+
+[InputElement] Return empty string for an invalid floating-point number that ends with "."
+https://bugs.webkit.org/show_bug.cgi?id=236700
+
+Reviewed by Chris Dumez.
+
+* fast/forms/number/number-stepup-stepdown-expected.txt:
+* fast/forms/number/number-stepup-stepdown-from-renderer-expected.txt:
+* fast/forms/number/number-stepup-stepdown-from-renderer.html:
+* fast/forms/number/number-stepup-stepdown.html:
+
 2022-02-18  Antoine Quint  
 
 [frame-rate] allow setting frameRate as an option passed to Element.animate()


Modified: trunk/LayoutTests/fast/forms/number/number-stepup-stepdown-expected.txt (290123 => 290124)

--- trunk/LayoutTests/fast/forms/number/number-stepup-stepdown-expected.txt	2022-02-18 15:38:23 UTC (rev 290123)
+++ trunk/LayoutTests/fast/forms/number/number-stepup-stepdown-expected.txt	2022-02-18 15:39:39 UTC (rev 290124)
@@ -56,23 +56,23 @@
 
 PASS stepUp(".1", 1, null) is "1.1"
 PASS stepUp(".2", 1, null) is "1.2"
-PASS stepUp("1.", 1, null) is "2"
-PASS stepUp("2.", 1, null) is "3"
+PASS stepUp("1.", 1, null) is "1"
+PASS stepUp("2.", 1, null) is "1"
 
 PASS stepUp("-.1", 1, null) is "0.9"
 PASS stepUp("-.2", 1, null) is "0.8"
-PASS stepUp("-1.", 1, null) is "0"
-PASS stepUp("-2.", 1, null) is "-1"
+PASS stepUp("-1.", 1, null) is "1"
+PASS stepUp("-2.", 1, null) is "1"
 
 PASS stepDown(".1", 1, null) is "-0.9"
 PASS stepDown(".2", 1, null) is "-0.8"
-PASS stepDown("1.", 1, null) is "0"
-PASS stepDown("2.", 1, null) is "1"
+PASS stepDown("1.", 1, null) is "-1"
+PASS stepDown("2.", 1, null) is "-1"
 
 PASS stepDown("-.1", 1, null) is "-1.1"
 PASS stepDown("-.2", 1, null) is "-1.2"
-PASS stepDown("-1.", 1, null) is "-2"
-PASS stepDown("-2.", 1, null) is "-3"
+PASS stepDown("-1.", 1, null) is "-1"
+PASS stepDown("-2.", 1, null) is "-1"
 
 PASS stepUp("0.1", .1, null) is "0.2"
 PASS stepUp("0.2", .1, null) is "0.3"
@@ -104,23 +104,23 @@
 
 PASS stepUp(".1", .1, null) is "0.2"
 PASS stepUp(".2", .1, null) is "0.3"
-PASS stepUp("1.", .1, null) is "1.1"
-PASS stepUp("2.", .1, null) is "2.1"
+PASS stepUp("1.", .1, null) is "0.1"
+PASS stepUp("2.", .1, null) is "0.1"
 
 PASS stepUp("-.1", .1, null) is "0"
 PASS stepUp("-.2", .1, null) is "-0.1"
-PASS stepUp("-1.", .1, null) is "-0.9"
-PASS stepUp("-2.", .1, null) is "-1.9"
+PASS stepUp("-1.", .1, null) is "0.1"
+PASS stepUp("-2.", .1, null) is "0.1"
 
 PASS stepDown(".1", .1, null) is "0"
 PASS stepDown(".2", .1, null) is "0.1"
-PASS stepDown("1.", .1, null) is "0.9"
-PASS stepDown("2.", .1, null) is "1.9"
+PASS stepDown("1.", .1, null) is "-0.1"
+PASS stepDown("2.", .1, null) is "-0.1"
 
 PASS stepDown("-.1", .1, null) is "-0.2"
 PASS stepDown("-.2", .1, null) is "-0.3"
-PASS stepDown("-1.", .1, null) is "-1.1"
-PASS stepDown("-2.", .1, null) is "-2.1"
+PASS stepDown("-1.", .1, null) is "-0.1"
+PASS stepDown("-2.", .1, null) is "-0.1"
 
 Extra arguments
 PASS input.value = "0"; input.min = null; input.step = null; input.stepUp(1, 2); input.value is "1"


Modified: trunk/LayoutTests/fast/forms/number/number-stepup-stepdown-from-renderer-expected.txt (290123 => 290124)

--- 

[webkit-changes] [289902] trunk

2022-02-16 Thread zsun
Title: [289902] trunk








Revision 289902
Author z...@igalia.com
Date 2022-02-16 10:04:21 -0800 (Wed, 16 Feb 2022)


Log Message
[InputElement] Remove extra form data made by image submit button when "value" attribute is present.
https://bugs.webkit.org/show_bug.cgi?id=236703

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/html/semantics/forms/the-input-element/image-click-form-data-expected.txt:

Source/WebCore:

As per spec at
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#constructing-form-data-set,
and discussions at
https://groups.google.com/a/chromium.org/g/blink-dev/c/hp1_-1tgvDs
The condstructed "form data set" should not include the value of the image button in this case.

This change is an import from chromium CL at
https://chromium-review.googlesource.com/c/chromium/src/+/1086953/

* html/ImageInputType.cpp:
(WebCore::ImageInputType::appendFormData const):

LayoutTests:

Update test expectation as the test is now passing.
* fast/forms/input-image-submit.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/forms/input-image-submit.html
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/image-click-form-data-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/ImageInputType.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (289901 => 289902)

--- trunk/LayoutTests/ChangeLog	2022-02-16 17:54:57 UTC (rev 289901)
+++ trunk/LayoutTests/ChangeLog	2022-02-16 18:04:21 UTC (rev 289902)
@@ -1,3 +1,13 @@
+2022-02-16  Ziran Sun  
+
+[InputElement] Remove extra form data made by image submit button when "value" attribute is present.
+https://bugs.webkit.org/show_bug.cgi?id=236703
+
+Reviewed by Chris Dumez.
+
+Update test expectation as the test is now passing.
+* fast/forms/input-image-submit.html:
+
 2022-02-16  Truitt Savell  
 
 Rebase http/tests/model/model-document.html after the changes in r289733


Modified: trunk/LayoutTests/fast/forms/input-image-submit.html (289901 => 289902)

--- trunk/LayoutTests/fast/forms/input-image-submit.html	2022-02-16 17:54:57 UTC (rev 289901)
+++ trunk/LayoutTests/fast/forms/input-image-submit.html	2022-02-16 18:04:21 UTC (rev 289902)
@@ -64,8 +64,8 @@
 state.value = 'normal';
 image.dispatchEvent(clickEvent);
 } else if (query.indexOf('state=normal') != -1) {
-// Should have image.x=7=11=value.
-if (query.indexOf('image.x=7=11=value') == -1) {
+// Should have image.x=7=11.
+if (query.indexOf('image.x=7=11') == -1) {
 failAndDone('Normal submission failed: ' + query);
 return;
 }
@@ -74,7 +74,7 @@
 state.value = 'click-method';
 image.click();
 } else if (query.indexOf('state=click-method') != -1) {
-if (query.indexOf('image.x=0=0=value') == -1) {
+if (query.indexOf('image.x=0=0') == -1) {
 failAndDone('Click method failed: ' + query);
 return;
 }
@@ -89,7 +89,7 @@
 return;
 }
 } else if (query.indexOf('state=keyboard') != -1) {
-if (query.indexOf('image.x=0=0=value') == -1) {
+if (query.indexOf('image.x=0=0') == -1) {
 failAndDone('Activating with keyboard failed: ' + query);
 return;
 }
@@ -111,7 +111,7 @@
 image.dispatchEvent(enterEvent);
 } else if (query.indexOf('state=to-image-on-submit') != -1) {
 // Should have image.x and image.y, but their values are 0.
-if (query.indexOf('image.x=0=0=value') == -1) {
+if (query.indexOf('image.x=0=0') == -1) {
 failAndDone('Changing to image on submit failed: ' + query);
 return;
 }
@@ -122,7 +122,7 @@
 image.dispatchEvent(clickEvent);
 } else if (query.indexOf('state=to-image-on-click') != -1) {
 // Same as the normal submission.
-if (query.indexOf('image.x=7=11=value') == -1) {
+if (query.indexOf('image.x=7=11') == -1) {
 failAndDone('Changing to image on click failed: ' + query);
 return;
 }


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (289901 => 289902)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-16 17:54:57 UTC (rev 289901)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-16 18:04:21 UTC (rev 289902)
@@ -1,3 +1,12 @@
+2022-02-16  Ziran Sun  
+
+[InputElement] Remove extra form data made by image submit button when "value" attribute is present.
+https://bugs.webkit.org/show_bug.cgi?id=236703
+
+Reviewed by Chris Dumez.
+
+* web-platform-tests/html/semantics/forms/the-input-element/image-click-form-data-expected.txt:
+
 2022-02-16  Antti Koivisto  
 
 [CSS Container Queries] Size queries on unsupported axis should evaluate to unknown


Modified: 

[webkit-changes] [289812] trunk

2022-02-15 Thread zsun
Title: [289812] trunk








Revision 289812
Author z...@igalia.com
Date 2022-02-15 07:20:03 -0800 (Tue, 15 Feb 2022)


Log Message
[Forms] Make sure the element's dirty checkedness flag is set to true when setting checked
https://bugs.webkit.org/show_bug.cgi?id=236497

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update the test expectations as the tests are now passing.
* web-platform-tests/html/semantics/forms/the-input-element/cloning-steps-expected.txt:

Source/WebCore:

As per spec
https://html.spec.whatwg.org/multipage/input.html#the-input-element%3Aconcept-node-clone-ext,
"The checked IDL attribute allows scripts to manipulate the checkedness of an input element.
... on setting, it must set the element's checkedness to the new value and set the element's
dirty checkedness flag to true." This CL is to make sure this flag is set to true.

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setChecked):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/cloning-steps-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLInputElement.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (289811 => 289812)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-15 15:10:58 UTC (rev 289811)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-15 15:20:03 UTC (rev 289812)
@@ -1,3 +1,13 @@
+2022-02-15  Ziran Sun  
+
+[Forms] Make sure the element's dirty checkedness flag is set to true when setting checked
+https://bugs.webkit.org/show_bug.cgi?id=236497
+
+Reviewed by Chris Dumez.
+
+Update the test expectations as the tests are now passing.
+* web-platform-tests/html/semantics/forms/the-input-element/cloning-steps-expected.txt:
+
 2022-02-14  Antti Koivisto  
 
 [CSS Container Queries] Support range operators in size queries


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/cloning-steps-expected.txt (289811 => 289812)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/cloning-steps-expected.txt	2022-02-15 15:10:58 UTC (rev 289811)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/cloning-steps-expected.txt	2022-02-15 15:20:03 UTC (rev 289812)
@@ -2,47 +2,47 @@
 PASS input element's value should be cloned
 PASS input element's dirty value flag should be cloned, so setAttribute doesn't affect the cloned input's value
 PASS input[type=button] element's checkedness should be cloned
-FAIL input[type=button] element's dirty checkedness should be cloned, so setAttribute doesn't affect the cloned input's checkedness assert_equals: expected false but got true
+PASS input[type=button] element's dirty checkedness should be cloned, so setAttribute doesn't affect the cloned input's checkedness
 PASS input[type=checkbox] element's checkedness should be cloned
-FAIL input[type=checkbox] element's dirty checkedness should be cloned, so setAttribute doesn't affect the cloned input's checkedness assert_equals: expected false but got true
+PASS input[type=checkbox] element's dirty checkedness should be cloned, so setAttribute doesn't affect the cloned input's checkedness
 PASS input[type=color] element's checkedness should be cloned
-FAIL input[type=color] element's dirty checkedness should be cloned, so setAttribute doesn't affect the cloned input's checkedness assert_equals: expected false but got true
+PASS input[type=color] element's dirty checkedness should be cloned, so setAttribute doesn't affect the cloned input's checkedness
 PASS input[type=date] element's checkedness should be cloned
-FAIL input[type=date] element's dirty checkedness should be cloned, so setAttribute doesn't affect the cloned input's checkedness assert_equals: expected false but got true
+PASS input[type=date] element's dirty checkedness should be cloned, so setAttribute doesn't affect the cloned input's checkedness
 PASS input[type=datetime-local] element's checkedness should be cloned
-FAIL input[type=datetime-local] element's dirty checkedness should be cloned, so setAttribute doesn't affect the cloned input's checkedness assert_equals: expected false but got true
+PASS input[type=datetime-local] element's dirty checkedness should be cloned, so setAttribute doesn't affect the cloned input's checkedness
 PASS input[type=email] element's checkedness should be cloned
-FAIL input[type=email] element's dirty checkedness should be cloned, so setAttribute doesn't affect the cloned input's checkedness assert_equals: expected false but got true
+PASS input[type=email] element's dirty checkedness should be cloned, so setAttribute doesn't affect the cloned input's checkedness
 PASS input[type=file] element's checkedness should be cloned
-FAIL input[type=file] element's dirty checkedness should be cloned, so setAttribute doesn't affect 

[webkit-changes] [289465] trunk

2022-02-09 Thread zsun
Title: [289465] trunk








Revision 289465
Author z...@igalia.com
Date 2022-02-09 02:37:47 -0800 (Wed, 09 Feb 2022)


Log Message
[Forms] Improving applyStep() to be in line with specs
https://bugs.webkit.org/show_bug.cgi?id=236134

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/html/semantics/forms/the-input-element/range-expected.txt:

Source/WebCore:

This is to improve applyStep() func to follow specs at
https://html.spec.whatwg.org/multipage/input.html#dom-input-stepup

Since Chromium implementation follows the specs steps, this patch imports the
Chromium implmentation.

This is a further patch after https://bugs.webkit.org/show_bug.cgi?id=235509. It has corrected
some changes on test files in fast/form directory in the previous patch submitted for Bug
235509. With this CL a few more sub-tests are now passing.

* html/InputType.cpp:
(WebCore::InputType::applyStep):
* html/StepRange.cpp:
(WebCore::StepRange::stepSnappedMaximum const):
* html/StepRange.h:

LayoutTests:

Update test expectations.
* fast/forms/date/date-stepup-stepdown-expected.txt:
* fast/forms/date/date-stepup-stepdown.html:
* fast/forms/datetimelocal/datetimelocal-stepup-stepdown-expected.txt:
* fast/forms/datetimelocal/datetimelocal-stepup-stepdown.html:
* fast/forms/month/month-stepup-stepdown-expected.txt:
* fast/forms/month/month-stepup-stepdown.html:
* fast/forms/number/number-stepup-stepdown-expected.txt:
* fast/forms/number/number-stepup-stepdown.html:
* fast/forms/range/range-stepup-stepdown-expected.txt:
* fast/forms/range/range-stepup-stepdown.html:
* fast/forms/time/time-stepup-stepdown-expected.txt:
* fast/forms/time/time-stepup-stepdown.html:
* fast/forms/week/week-stepup-stepdown-expected.txt:
* fast/forms/week/week-stepup-stepdown.html:
* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt:
* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt:
* platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/forms/date/date-stepup-stepdown-expected.txt
trunk/LayoutTests/fast/forms/date/date-stepup-stepdown.html
trunk/LayoutTests/fast/forms/datetimelocal/datetimelocal-stepup-stepdown-expected.txt
trunk/LayoutTests/fast/forms/datetimelocal/datetimelocal-stepup-stepdown.html
trunk/LayoutTests/fast/forms/month/month-stepup-stepdown-expected.txt
trunk/LayoutTests/fast/forms/month/month-stepup-stepdown.html
trunk/LayoutTests/fast/forms/number/number-stepup-stepdown-expected.txt
trunk/LayoutTests/fast/forms/number/number-stepup-stepdown.html
trunk/LayoutTests/fast/forms/range/range-stepup-stepdown-expected.txt
trunk/LayoutTests/fast/forms/range/range-stepup-stepdown.html
trunk/LayoutTests/fast/forms/time/time-stepup-stepdown-expected.txt
trunk/LayoutTests/fast/forms/time/time-stepup-stepdown.html
trunk/LayoutTests/fast/forms/week/week-stepup-stepdown-expected.txt
trunk/LayoutTests/fast/forms/week/week-stepup-stepdown.html
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-expected.txt
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt
trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt
trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/InputType.cpp
trunk/Source/WebCore/html/StepRange.cpp
trunk/Source/WebCore/html/StepRange.h




Diff

Modified: trunk/LayoutTests/ChangeLog (289464 => 289465)

--- trunk/LayoutTests/ChangeLog	2022-02-09 09:52:42 UTC (rev 289464)
+++ trunk/LayoutTests/ChangeLog	2022-02-09 10:37:47 UTC (rev 289465)
@@ -1,3 +1,29 @@
+2022-02-09  Ziran Sun  
+
+[Forms] Improving applyStep() to be in line with specs
+https://bugs.webkit.org/show_bug.cgi?id=236134
+
+Reviewed by Chris Dumez.
+
+Update test expectations.
+* fast/forms/date/date-stepup-stepdown-expected.txt:
+* fast/forms/date/date-stepup-stepdown.html:
+* fast/forms/datetimelocal/datetimelocal-stepup-stepdown-expected.txt:
+* fast/forms/datetimelocal/datetimelocal-stepup-stepdown.html:
+* fast/forms/month/month-stepup-stepdown-expected.txt:
+* fast/forms/month/month-stepup-stepdown.html:
+* fast/forms/number/number-stepup-stepdown-expected.txt:
+* fast/forms/number/number-stepup-stepdown.html:
+* fast/forms/range/range-stepup-stepdown-expected.txt:
+* fast/forms/range/range-stepup-stepdown.html:
+* fast/forms/time/time-stepup-stepdown-expected.txt:
+* fast/forms/time/time-stepup-stepdown.html:
+* 

[webkit-changes] [289209] trunk

2022-02-07 Thread zsun
Title: [289209] trunk








Revision 289209
Author z...@igalia.com
Date 2022-02-07 05:51:03 -0800 (Mon, 07 Feb 2022)


Log Message
[Forms] Use min as default value when min > max for input type="range"
https://bugs.webkit.org/show_bug.cgi?id=236223

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update the sub test expectation that is now passing.
* web-platform-tests/html/semantics/forms/the-input-element/range-expected.txt:

Source/WebCore:

As per spec https://html.spec.whatwg.org/multipage/input.html#concept-input-value-default-range,
in the case of "the maximum is less than the minimum, in which case the default value is the minimum".

* html/RangeInputType.cpp:
(WebCore::ensureMaximum):
(WebCore::RangeInputType::createStepRange const):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/RangeInputType.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (289208 => 289209)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-07 13:49:21 UTC (rev 289208)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-07 13:51:03 UTC (rev 289209)
@@ -1,3 +1,13 @@
+2022-02-07  Ziran Sun  
+
+[Forms] Use min as default value when min > max for input type="range"
+https://bugs.webkit.org/show_bug.cgi?id=236223
+
+Reviewed by Darin Adler.
+
+Update the sub test expectation that is now passing.
+* web-platform-tests/html/semantics/forms/the-input-element/range-expected.txt:
+
 2022-02-06  Sam Weinig  
 
 Update serialization of rgb() functions with none components to latest spec


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-expected.txt (289208 => 289209)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-expected.txt	2022-02-07 13:49:21 UTC (rev 289208)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-expected.txt	2022-02-07 13:51:03 UTC (rev 289209)
@@ -14,7 +14,7 @@
 PASS default value of max attribute in input type=range
 PASS default value when min and max attributes are given (= min plus half the difference between min and max)
 PASS default value with step control when both min and max attributes are given
-FAIL default value when both min and max attributes are given, while min > max assert_equals: expected "2" but got "51"
+PASS default value when both min and max attributes are given, while min > max
 PASS The default step scale factor is 1, unless min attribute has non-integer value
 PASS Step scale factor behavior when min attribute has integer value but max attribute is non-integer
 FAIL The default scale factor is 1 even if step attribute is explicitly set to non-integer value, unless min attribute has non-integer value assert_equals: expected "1" but got "0.5"


Modified: trunk/Source/WebCore/ChangeLog (289208 => 289209)

--- trunk/Source/WebCore/ChangeLog	2022-02-07 13:49:21 UTC (rev 289208)
+++ trunk/Source/WebCore/ChangeLog	2022-02-07 13:51:03 UTC (rev 289209)
@@ -1,3 +1,17 @@
+2022-02-07  Ziran Sun  
+
+[Forms] Use min as default value when min > max for input type="range"
+https://bugs.webkit.org/show_bug.cgi?id=236223
+
+Reviewed by Darin Adler.
+
+As per spec https://html.spec.whatwg.org/multipage/input.html#concept-input-value-default-range,
+in the case of "the maximum is less than the minimum, in which case the default value is the minimum".
+
+* html/RangeInputType.cpp:
+(WebCore::ensureMaximum):
+(WebCore::RangeInputType::createStepRange const):
+
 2022-02-07  Joonghun Park  
 
 Remove unused CSSCalcExpressionNodeParser::parseValueTerm from CSSCalcExpressionNodeParser.h.


Modified: trunk/Source/WebCore/html/RangeInputType.cpp (289208 => 289209)

--- trunk/Source/WebCore/html/RangeInputType.cpp	2022-02-07 13:49:21 UTC (rev 289208)
+++ trunk/Source/WebCore/html/RangeInputType.cpp	2022-02-07 13:51:03 UTC (rev 289209)
@@ -75,9 +75,9 @@
 static const int rangeStepScaleFactor = 1;
 static const StepRange::StepDescription rangeStepDescription { rangeDefaultStep, rangeDefaultStepBase, rangeStepScaleFactor };
 
-static Decimal ensureMaximum(const Decimal& proposedValue, const Decimal& minimum, const Decimal& fallbackValue)
+static Decimal ensureMaximum(const Decimal& proposedValue, const Decimal& minimum)
 {
-return proposedValue >= minimum ? proposedValue : std::max(minimum, fallbackValue);
+return proposedValue >= minimum ? proposedValue : minimum;
 }
 
 RangeInputType::RangeInputType(HTMLInputElement& element)
@@ -118,7 +118,7 @@
 {
 ASSERT(element());
 const Decimal minimum = parseToNumber(element()->attributeWithoutSynchronization(minAttr), rangeDefaultMinimum);
-const Decimal maximum = 

[webkit-changes] [289201] trunk

2022-02-07 Thread zsun
Title: [289201] trunk








Revision 289201
Author z...@igalia.com
Date 2022-02-07 01:22:33 -0800 (Mon, 07 Feb 2022)


Log Message
[Forms] Alias appearance  keywords to 'auto'
https://bugs.webkit.org/show_bug.cgi?id=235944

Reviewed by Aditya Keerthi.

Source/WebCore:

This CL alias the  keywords 'auto'. We need to address the cases of MenuList, button,
square-button, push-button and slider-horizontal etc. separately.

Spec ref: https://drafts.csswg.org/css-ui-4/#typedef-appearance-compat-auto

* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustAppearanceWithElementType const):
(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::paint):
* rendering/RenderTheme.h:

LayoutTests:

Unskip tests in test expactation files that are now passing.
* TestExpectations:
* platform/gtk/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/platform/gtk/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderTheme.cpp
trunk/Source/WebCore/rendering/RenderTheme.h




Diff

Modified: trunk/LayoutTests/ChangeLog (289200 => 289201)

--- trunk/LayoutTests/ChangeLog	2022-02-07 05:45:40 UTC (rev 289200)
+++ trunk/LayoutTests/ChangeLog	2022-02-07 09:22:33 UTC (rev 289201)
@@ -1,3 +1,14 @@
+2022-02-07  Ziran Sun  
+
+[Forms] Alias appearance  keywords to 'auto'
+https://bugs.webkit.org/show_bug.cgi?id=235944
+
+Reviewed by Aditya Keerthi.
+
+Unskip tests in test expactation files that are now passing.  
+* TestExpectations:
+* platform/gtk/TestExpectations:
+
 2022-02-06  Jean-Yves Avenard  
 
 media/media-source/media-webm-vorbis-partial.html is failing


Modified: trunk/LayoutTests/TestExpectations (289200 => 289201)

--- trunk/LayoutTests/TestExpectations	2022-02-07 05:45:40 UTC (rev 289200)
+++ trunk/LayoutTests/TestExpectations	2022-02-07 09:22:33 UTC (rev 289201)
@@ -4305,19 +4305,11 @@
 
 # New failures after updating WPT import of css/css-text on 2020-07
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-button-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-checkbox-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-listbox-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-menulist-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-menulist-button-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-menulist-button-002.tentative.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-meter-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-progress-bar-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-push-button-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-radio-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-searchfield-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-slider-horizontal-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-square-button-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-textarea-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/appearance-textfield-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/outline-021.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/outline-024.html [ ImageOnlyFailure ]
@@ -4327,19 +4319,11 @@
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/outline-offset-table-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/text-overflow-ruby.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-button-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-checkbox-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-listbox-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-menulist-001.html [ ImageOnlyFailure ]
-webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-menulist-button-001.html [ ImageOnlyFailure ]
 webkit.org/b/214299 imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-menulist-button-002.tentative.html [ ImageOnlyFailure ]

[webkit-changes] [289075] trunk

2022-02-03 Thread zsun
Title: [289075] trunk








Revision 289075
Author z...@igalia.com
Date 2022-02-03 13:34:50 -0800 (Thu, 03 Feb 2022)


Log Message
[Forms] Value doesn't change for stepUp()/stepDown() with out of range values
https://bugs.webkit.org/show_bug.cgi?id=235509

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/html/semantics/forms/the-input-element/input-stepdown-expected.txt:
* web-platform-tests/html/semantics/forms/the-input-element/input-stepup-expected.txt:
* web-platform-tests/html/semantics/forms/the-input-element/range-expected.txt:

Source/WebCore:

For input type number, WebKit throws "invalid state" Error when the value is greater than
max when calling stepUp() or less than min when calling stepDown(). According to section 10
in https://html.spec.whatwg.org/multipage/input.html#dom-input-stepup,
we should do "return", which indicates that value doesn't change.

* html/InputType.cpp:
(WebCore::InputType::applyStep):

LayoutTests:

Update expectation files.

* fast/forms/date/date-stepup-stepdown-expected.txt:
* fast/forms/date/date-stepup-stepdown.html:
* fast/forms/datetimelocal/datetimelocal-stepup-stepdown-expected.txt:
* fast/forms/datetimelocal/datetimelocal-stepup-stepdown.html:
* fast/forms/month/month-stepup-stepdown-expected.txt:
* fast/forms/month/month-stepup-stepdown.html:
* fast/forms/number/number-stepup-stepdown-expected.txt:
* fast/forms/number/number-stepup-stepdown.html:
* fast/forms/range/range-stepup-stepdown-expected.txt:
* fast/forms/range/range-stepup-stepdown.html:
* fast/forms/time/time-stepup-stepdown-expected.txt:
* fast/forms/time/time-stepup-stepdown.html:
* fast/forms/week/week-stepup-stepdown-expected.txt:
* fast/forms/week/week-stepup-stepdown.html:
* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt:
* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepdown-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepdown-expected.txt.
* platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepup-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepup-expected.txt.
* platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/forms/date/date-stepup-stepdown-expected.txt
trunk/LayoutTests/fast/forms/date/date-stepup-stepdown.html
trunk/LayoutTests/fast/forms/datetimelocal/datetimelocal-stepup-stepdown-expected.txt
trunk/LayoutTests/fast/forms/datetimelocal/datetimelocal-stepup-stepdown.html
trunk/LayoutTests/fast/forms/month/month-stepup-stepdown-expected.txt
trunk/LayoutTests/fast/forms/month/month-stepup-stepdown.html
trunk/LayoutTests/fast/forms/number/number-stepup-stepdown-expected.txt
trunk/LayoutTests/fast/forms/number/number-stepup-stepdown.html
trunk/LayoutTests/fast/forms/range/range-stepup-stepdown-expected.txt
trunk/LayoutTests/fast/forms/range/range-stepup-stepdown.html
trunk/LayoutTests/fast/forms/time/time-stepup-stepdown-expected.txt
trunk/LayoutTests/fast/forms/time/time-stepup-stepdown.html
trunk/LayoutTests/fast/forms/week/week-stepup-stepdown-expected.txt
trunk/LayoutTests/fast/forms/week/week-stepup-stepdown.html
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepdown-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepup-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-expected.txt
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt
trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt
trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/InputType.cpp


Added Paths

trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepdown-expected.txt
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepup-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (289074 => 289075)

--- trunk/LayoutTests/ChangeLog	2022-02-03 21:32:43 UTC (rev 289074)
+++ trunk/LayoutTests/ChangeLog	2022-02-03 21:34:50 UTC (rev 289075)
@@ -1,3 +1,32 @@
+2022-02-03  Ziran Sun  
+
+[Forms] Value doesn't change for stepUp()/stepDown() with out of range values
+

[webkit-changes] [288544] trunk

2022-01-25 Thread zsun
Title: [288544] trunk








Revision 288544
Author z...@igalia.com
Date 2022-01-25 01:57:44 -0800 (Tue, 25 Jan 2022)


Log Message
[css-grid] Fix grid shorthand expansion of initial values
https://bugs.webkit.org/show_bug.cgi?id=234430

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

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

Source/WebCore:

This CL is to add the InitialValue support when parsing the grid shorthand for 6 grid properties
including grid-auto-columns, grid-auto-flow, grid-auto-rows, grid-template-areas,
grid-template-columns and grid-template-rows. The original code only adds a CSSInitial.

This is an import of chromium change at
https://chromium-review.googlesource.com/c/chromium/src/+/3299364

Apart from fixing wpt test imported/w3c/web-platform-tests/css/css-grid/parsing/grid-shorthand.html,
The CL also updates the expectation file for test
imported/w3c/web-platform-tests/css/css-grid/parsing/grid-shorthand-valid.html. This test fails before
this CL and need to be investigated as a seperated issue. Related bugs have been raised at -
https://bugs.chromium.org/p/chromium/issues/detail?id=1028283 &
https://bugs.webkit.org/show_bug.cgi?id=204611

* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeImplicitGridAutoFlow):
(WebCore::CSSPropertyParser::consumeGridShorthand):
* style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertGridTrackSizeList):
(WebCore::Style::BuilderConverter::convertGridAutoFlow):

LayoutTests:

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

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/css-grid-layout/grid-shorthand-get-set-expected.txt
trunk/LayoutTests/fast/css-grid-layout/grid-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/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
trunk/Source/WebCore/style/StyleBuilderConverter.h




Diff

Modified: trunk/LayoutTests/ChangeLog (288543 => 288544)

--- trunk/LayoutTests/ChangeLog	2022-01-25 07:13:34 UTC (rev 288543)
+++ trunk/LayoutTests/ChangeLog	2022-01-25 09:57:44 UTC (rev 288544)
@@ -1,3 +1,13 @@
+2022-01-25  Ziran Sun  
+
+[css-grid] Fix grid shorthand expansion of initial values
+https://bugs.webkit.org/show_bug.cgi?id=234430
+
+Reviewed by Sergio Villar Senin.
+
+* fast/css-grid-layout/grid-shorthand-get-set-expected.txt:
+* fast/css-grid-layout/grid-shorthand-get-set.html:
+
 2022-01-24  Myles C. Maxfield  
 
 REGRESSION(r282320): [Cocoa] User-installed fonts don't work in the GPU Process (in WKWebView)


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

--- trunk/LayoutTests/fast/css-grid-layout/grid-shorthand-get-set-expected.txt	2022-01-25 07:13:34 UTC (rev 288543)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-shorthand-get-set-expected.txt	2022-01-25 09:57:44 UTC (rev 288544)
@@ -201,11 +201,11 @@
 PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "none"
 PASS element.style.gridTemplateAreas is "none"
 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is "row"
-PASS element.style.gridAutoFlow is "initial"
+PASS element.style.gridAutoFlow is "row"
 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is "auto"
-PASS element.style.gridAutoColumns is "initial"
+PASS element.style.gridAutoColumns is "auto"
 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto"
-PASS element.style.gridAutoRows is "initial"
+PASS element.style.gridAutoRows is "auto"
 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "10px"
 PASS element.style.gridTemplateColumns is "10px"
 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "[line] 20px"
@@ -213,59 +213,59 @@
 PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "\"a\""
 PASS element.style.gridTemplateAreas is "\"a\""
 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is "row"
-PASS element.style.gridAutoFlow is "initial"
+PASS element.style.gridAutoFlow is "row"
 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is "auto"
-PASS element.style.gridAutoColumns is "initial"
+PASS element.style.gridAutoColumns is "auto"
 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto"
-PASS element.style.gridAutoRows is "initial"
+PASS element.style.gridAutoRows is "auto"
 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
 PASS 

[webkit-changes] [288420] trunk

2022-01-23 Thread zsun
Title: [288420] trunk








Revision 288420
Author z...@igalia.com
Date 2022-01-23 08:59:15 -0800 (Sun, 23 Jan 2022)


Log Message
[forms] Prevent contenteditable anchors from being stuck
https://bugs.webkit.org/show_bug.cgi?id=235438

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update 1 WPT test expectation file as the test is now passing.
* web-platform-tests/html/semantics/forms/the-input-element/anchor-active-contenteditable-expected.txt:

Source/WebCore:

Anchors can be stuck in the :active state if contenteditable is enabled before
:active is removed. With this patch setActive() can remove :active during
contenteditable in order to prevent anchors from navigating during contenteditable.

This is an import of Chromium CL at
https://chromium-review.googlesource.com/c/chromium/src/+/2595978

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::setActive):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/anchor-active-contenteditable-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLAnchorElement.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (288419 => 288420)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-01-23 16:50:20 UTC (rev 288419)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-01-23 16:59:15 UTC (rev 288420)
@@ -1,3 +1,13 @@
+2022-01-23  Ziran Sun  
+
+[forms] Prevent contenteditable anchors from being stuck
+https://bugs.webkit.org/show_bug.cgi?id=235438
+
+Reviewed by Darin Adler.
+
+Update 1 WPT test expectation file as the test is now passing.
+* web-platform-tests/html/semantics/forms/the-input-element/anchor-active-contenteditable-expected.txt:
+
 2022-01-21  Antoine Quint  
 
 Update css/css-animation WPT following animation-composition testing updates


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/anchor-active-contenteditable-expected.txt (288419 => 288420)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/anchor-active-contenteditable-expected.txt	2022-01-23 16:50:20 UTC (rev 288419)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/anchor-active-contenteditable-expected.txt	2022-01-23 16:59:15 UTC (rev 288420)
@@ -1,4 +1,4 @@
 anchor
 
-FAIL Anchor elements should not stay :active when contentEditable is enabled. assert_equals: expected null but got Element node  


Modified: trunk/Source/WebCore/ChangeLog (288419 => 288420)

--- trunk/Source/WebCore/ChangeLog	2022-01-23 16:50:20 UTC (rev 288419)
+++ trunk/Source/WebCore/ChangeLog	2022-01-23 16:59:15 UTC (rev 288420)
@@ -1,3 +1,20 @@
+2022-01-23  Ziran Sun  
+
+[forms] Prevent contenteditable anchors from being stuck
+https://bugs.webkit.org/show_bug.cgi?id=235438
+
+Reviewed by Darin Adler.
+
+Anchors can be stuck in the :active state if contenteditable is enabled before
+:active is removed. With this patch setActive() can remove :active during
+contenteditable in order to prevent anchors from navigating during contenteditable.
+
+This is an import of Chromium CL at
+https://chromium-review.googlesource.com/c/chromium/src/+/2595978
+
+* html/HTMLAnchorElement.cpp:
+(WebCore::HTMLAnchorElement::setActive):
+
 2022-01-23  Tyler Wilcock  
 
 AX: Refactor near-duplicate AXObjectCache::updateIsolatedTree implementations


Modified: trunk/Source/WebCore/html/HTMLAnchorElement.cpp (288419 => 288420)

--- trunk/Source/WebCore/html/HTMLAnchorElement.cpp	2022-01-23 16:50:20 UTC (rev 288419)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.cpp	2022-01-23 16:59:15 UTC (rev 288420)
@@ -213,7 +213,7 @@
 
 void HTMLAnchorElement::setActive(bool down, bool pause, Style::InvalidationScope invalidationScope)
 {
-if (hasEditableStyle()) {
+if (down && hasEditableStyle()) {
 switch (document().settings().editableLinkBehavior()) {
 case EditableLinkBehavior::Default:
 case EditableLinkBehavior::AlwaysLive:






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


[webkit-changes] [287977] trunk

2022-01-13 Thread zsun
Title: [287977] trunk








Revision 287977
Author z...@igalia.com
Date 2022-01-13 06:41:12 -0800 (Thu, 13 Jan 2022)


Log Message
[css-grid] Fix rounding of distributed free space to flexible tracks
https://bugs.webkit.org/show_bug.cgi?id=234917

LayoutTests/imported/w3c:

Reviewed by Darin Adler.

Source/WebCore:

Reviewed by Darin Adler.

When computing the growth size for flex sized tracks, the flexFraction multiplied by the flex factor can result
in a non-integer size. However, we floor the stretched size to fit in a LayoutUnit. This means that we may lose
the fractional part of the computation which can cause the entire free space not being distributed evenly. This
fix is to sum up the leftover fractional part from every flexible track to avoid this issue.

It is an import of Chromium GridNG CL at  https://chromium-review.googlesource.com/c/chromium/src/+/3193674.

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

Modified Paths

trunk/LayoutTests/TestExpectations
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/platform/gtk/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp




Diff

Modified: trunk/LayoutTests/TestExpectations (287976 => 287977)

--- trunk/LayoutTests/TestExpectations	2022-01-13 13:04:00 UTC (rev 287976)
+++ trunk/LayoutTests/TestExpectations	2022-01-13 14:41:12 UTC (rev 287977)
@@ -1415,8 +1415,6 @@
 webkit.org/b/231021 imported/w3c/web-platform-tests/css/css-grid/grid-items/percentage-margin-dynamic.html [ ImageOnlyFailure ]
 webkit.org/b/231021 imported/w3c/web-platform-tests/css/css-grid/grid-items/replaced-element-015.html [ ImageOnlyFailure ]
 
-webkit.org/b/234879 imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/flex-tracks-with-fractional-size.html [ ImageOnlyFailure ]
-
 imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/masonry-align-content-001.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/masonry-align-content-002.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/masonry-align-content-003.html [ ImageOnlyFailure ]


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (287976 => 287977)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-01-13 13:04:00 UTC (rev 287976)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-01-13 14:41:12 UTC (rev 287977)
@@ -1,3 +1,10 @@
+2022-01-13  Ziran Sun  
+
+[css-grid] Fix rounding of distributed free space to flexible tracks
+https://bugs.webkit.org/show_bug.cgi?id=234917
+
+Reviewed by Darin Adler.
+
 2022-01-12  Sergio Villar Senin  
 
 [css-flexbox] Import WPT tests - January edition


Modified: trunk/LayoutTests/platform/gtk/TestExpectations (287976 => 287977)

--- trunk/LayoutTests/platform/gtk/TestExpectations	2022-01-13 13:04:00 UTC (rev 287976)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2022-01-13 14:41:12 UTC (rev 287977)
@@ -1977,6 +1977,7 @@
 webkit.org/b/228153 imported/w3c/web-platform-tests/css/css-grid/abspos/grid-positioned-item-dynamic-change-001.html [ ImageOnlyFailure ]
 webkit.org/b/228153 imported/w3c/web-platform-tests/css/css-grid/abspos/grid-positioned-item-dynamic-change-002.html [ ImageOnlyFailure ]
 webkit.org/b/228153 imported/w3c/web-platform-tests/css/css-grid/abspos/grid-positioned-item-dynamic-change-003.html [ ImageOnlyFailure ]
+webkit.org/b/235025 imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/flex-tracks-with-fractional-size.html [ ImageOnlyFailure ]
 webkit.org/b/228153 imported/w3c/web-platform-tests/css/css-lists/content-property/marker-text-matches-armenian.html [ ImageOnlyFailure ]
 webkit.org/b/228153 imported/w3c/web-platform-tests/css/css-lists/content-property/marker-text-matches-decimal.html [ ImageOnlyFailure ]
 webkit.org/b/228153 imported/w3c/web-platform-tests/css/css-lists/content-property/marker-text-matches-decimal-leading-zero.html [ ImageOnlyFailure ]


Modified: trunk/Source/WebCore/ChangeLog (287976 => 287977)

--- trunk/Source/WebCore/ChangeLog	2022-01-13 13:04:00 UTC (rev 287976)
+++ trunk/Source/WebCore/ChangeLog	2022-01-13 14:41:12 UTC (rev 287977)
@@ -1,3 +1,20 @@
+2022-01-13  Ziran Sun  
+
+[css-grid] Fix rounding of distributed free space to flexible tracks
+https://bugs.webkit.org/show_bug.cgi?id=234917
+
+Reviewed by Darin Adler.
+
+When computing the growth size for flex sized tracks, the flexFraction multiplied by the flex factor can result
+in a non-integer size. However, we floor the stretched size to fit in a LayoutUnit. This means that we may lose
+the fractional part of the computation which can cause the entire free space not being distributed evenly. This
+fix is to sum up the leftover fractional part from every flexible track to avoid this issue.
+
+It is an import of Chromium GridNG CL at  

[webkit-changes] [287823] trunk/LayoutTests

2022-01-09 Thread zsun
Title: [287823] trunk/LayoutTests








Revision 287823
Author z...@igalia.com
Date 2022-01-09 10:18:14 -0800 (Sun, 09 Jan 2022)


Log Message
[css-grid] Resync web-platform-tests/css/css-grid tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=234879

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-align-self-img-002-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-align-self-img-last-baseline-002-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-align-self-last-baseline-002-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-align-self-rtl-last-baseline-003-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-align-self-rtl-last-baseline-004-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-align-self-vertWM-003-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-align-self-vertWM-004-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-align-self-vertWM-last-baseline-003-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-align-self-vertWM-last-baseline-004-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-justify-self-img-002-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-justify-self-img-last-baseline-002-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-justify-self-img-last-baseline-002.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-justify-self-last-baseline-002-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-justify-self-rtl-last-baseline-003-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-justify-self-rtl-last-baseline-004-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-justify-self-vertWM-003-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-justify-self-vertWM-004-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-justify-self-vertWM-last-baseline-003-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-justify-self-vertWM-last-baseline-004-expected.html:
* web-platform-tests/css/css-grid/alignment/grid-container-auto-margins-scrollbars-001-expected.html:
* web-platform-tests/css/css-grid/alignment/grid-content-alignment-with-abspos-001-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-content-alignment-with-abspos-001.html: Added.
* web-platform-tests/css/css-grid/alignment/self-baseline/w3c-import.log:
* web-platform-tests/css/css-grid/alignment/w3c-import.log:
* web-platform-tests/css/css-grid/grid-definition/w3c-import.log:
* web-platform-tests/css/css-grid/grid-items/grid-intrinsic-maximums-expected.html: Added.
* web-platform-tests/css/css-grid/grid-items/grid-intrinsic-maximums.html: Added.
* web-platform-tests/css/css-grid/grid-items/w3c-import.log:
* web-platform-tests/css/css-grid/grid-model/grid-container-scrollbars-sizing-002-expected.html:
* web-platform-tests/css/css-grid/grid-model/w3c-import.log:
* web-platform-tests/css/css-grid/layout-algorithm/flex-tracks-with-fractional-size-expected.xht: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/placement/grid-placement-items-spanning-multiple-rows-expected.xht.
* web-platform-tests/css/css-grid/layout-algorithm/flex-tracks-with-fractional-size.html: Added.
* web-platform-tests/css/css-grid/layout-algorithm/w3c-import.log:
* web-platform-tests/css/css-grid/nested-grid-item-block-size-001-expected.html: Added.
* web-platform-tests/css/css-grid/nested-grid-item-block-size-001.html: Added.
* web-platform-tests/css/css-grid/parsing/grid-area-computed-expected.txt:
* web-platform-tests/css/css-grid/parsing/grid-area-computed.html:
* web-platform-tests/css/css-grid/placement/grid-placement-items-spanning-multiple-rows-001-expected.xht: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/placement/grid-placement-items-spanning-multiple-rows-expected.xht.
* web-platform-tests/css/css-grid/placement/grid-placement-items-spanning-multiple-rows-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/placement/grid-placement-items-spanning-multiple-rows.html.
* web-platform-tests/css/css-grid/placement/grid-placement-items-spanning-multiple-rows-002-expected.xht: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/placement/grid-placement-items-spanning-multiple-rows-expected.xht.
* web-platform-tests/css/css-grid/placement/grid-placement-items-spanning-multiple-rows-002.html: Added.
* web-platform-tests/css/css-grid/placement/w3c-import.log:
* web-platform-tests/css/css-grid/subgrid/grid-subgridded-axis-auto-repeater-crash-001.html: Added.
* 

[webkit-changes] [286148] trunk

2021-11-24 Thread zsun
Title: [286148] trunk








Revision 286148
Author z...@igalia.com
Date 2021-11-24 07:04:31 -0800 (Wed, 24 Nov 2021)


Log Message
[css-grid] Track sizing algorithm not repeated even if used flex fraction would change
https://bugs.webkit.org/show_bug.cgi?id=232617

Reviewed by Javier Fernandez.

Source/WebCore:

According to https://drafts.csswg.org/css-grid/#algo-flex-tracks, when row height is
indefinite, for each grid item that crosses a flexible track, we run the track sizing
algorithm under a max-content constraint to find the flex fraction. Then we work out
the grid container height as definite, which may cause the flex fraction change. At this
point, we need to repeat the track sizing algorithm for row and layout the grid for real.
The current implementation doesn't repeat the track sizing algorithm for row.

The complication with calling RenderGrid::repeatTracksSizingIfNeeded() for flex max-sizing
is that it might change a grid item's status of participating in Baseline Alignment for
a cyclic sizing dependncy case, which should be definitively excluded. See
https://github.com/w3c/csswg-drafts/issues/3046 for more details. This issue should be handled
in a seperate bug. This CL only handle test cases that don't have baseline alignment specified.

* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithm::initializeTrackSizes):
(WebCore::GridTrackSizingAlgorithm::setup):
(WebCore::GridTrackSizingAlgorithm::reset):
* rendering/GridTrackSizingAlgorithm.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::repeatTracksSizingIfNeeded):
(WebCore::RenderGrid::layoutBlock):
* rendering/RenderGrid.h:

LayoutTests:

Unskip two tests that are passing.

* TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.h
trunk/Source/WebCore/rendering/RenderGrid.cpp
trunk/Source/WebCore/rendering/RenderGrid.h




Diff

Modified: trunk/LayoutTests/ChangeLog (286147 => 286148)

--- trunk/LayoutTests/ChangeLog	2021-11-24 14:14:28 UTC (rev 286147)
+++ trunk/LayoutTests/ChangeLog	2021-11-24 15:04:31 UTC (rev 286148)
@@ -1,3 +1,14 @@
+2021-11-24  Ziran Sun  
+
+[css-grid] Track sizing algorithm not repeated even if used flex fraction would change
+https://bugs.webkit.org/show_bug.cgi?id=232617
+
+Reviewed by Javier Fernandez.
+
+Unskip two tests that are passing.
+ 
+* TestExpectations:
+
 2021-11-24  Manuel Rego Casasnovas  
 
 [selectors] Import 2 new :focus-visible tests from WPT


Modified: trunk/LayoutTests/TestExpectations (286147 => 286148)

--- trunk/LayoutTests/TestExpectations	2021-11-24 14:14:28 UTC (rev 286147)
+++ trunk/LayoutTests/TestExpectations	2021-11-24 15:04:31 UTC (rev 286148)
@@ -1396,8 +1396,6 @@
 webkit.org/b/231021 imported/w3c/web-platform-tests/css/css-grid/grid-items/replaced-element-015.html [ ImageOnlyFailure ]
 
 imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-009.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/flex-sizing-rows-indefinite-height.html [ ImageOnlyFailure ]
-webkit.org/b/231021 imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-template-flexible-rerun-track-sizing.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/masonry-align-content-001.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/masonry-align-content-002.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/masonry-align-content-003.html [ ImageOnlyFailure ]


Modified: trunk/Source/WebCore/ChangeLog (286147 => 286148)

--- trunk/Source/WebCore/ChangeLog	2021-11-24 14:14:28 UTC (rev 286147)
+++ trunk/Source/WebCore/ChangeLog	2021-11-24 15:04:31 UTC (rev 286148)
@@ -1,3 +1,33 @@
+2021-11-24  Ziran Sun  
+
+[css-grid] Track sizing algorithm not repeated even if used flex fraction would change
+https://bugs.webkit.org/show_bug.cgi?id=232617
+
+Reviewed by Javier Fernandez.
+
+According to https://drafts.csswg.org/css-grid/#algo-flex-tracks, when row height is
+indefinite, for each grid item that crosses a flexible track, we run the track sizing
+algorithm under a max-content constraint to find the flex fraction. Then we work out
+the grid container height as definite, which may cause the flex fraction change. At this
+point, we need to repeat the track sizing algorithm for row and layout the grid for real.
+The current implementation doesn't repeat the track sizing algorithm for row.
+
+The complication with calling RenderGrid::repeatTracksSizingIfNeeded() for flex max-sizing
+is that it might change a grid item's status of participating in Baseline Alignment for
+

[webkit-changes] [286100] trunk

2021-11-21 Thread zsun
Title: [286100] trunk








Revision 286100
Author z...@igalia.com
Date 2021-11-21 10:22:01 -0800 (Sun, 21 Nov 2021)


Log Message
[css-grid] svg image as grid items should use the overriding logical width/height when defined to compute the logical height/width
https://bugs.webkit.org/show_bug.cgi?id=228105

Reviewed by Javier Fernandez.

Source/WebCore:

This is a reland of r280290. It's got reverted because another patch r280078 caused crash and had been
reverted. r280290 is a dependent patch for r280078.

As discussed at https://github.com/w3c/csswg-drafts/issues/6286#issuecomment-866986544, degenerate
aspect ratios derived from SVG width/height attributes fall back to viewbox aspect ratio
(whether due to negative values or zero values).

When computing the logical height/width using an intrinsic aspect ratio, RenderReplaced uses the
overridingLogicalWidth/overridingLogicalHeight whenever defined as long as the flex or
grid item has an intrinsic size. For an SVG graphic though, it's common to have an intrinsic aspect
ratio but not to have an intrinsic width or height. For this special case, we still should use
overridingLogicalWidth/overridingLogicalHeight for logical height/width calculations.

* rendering/RenderReplaced.cpp:
(WebCore::hasIntrinsicSize):
(WebCore::RenderReplaced::computeReplacedLogicalWidth const):
(WebCore::RenderReplaced::computeReplacedLogicalHeight const):

LayoutTests:

* TestExpectations: unskip two tests that are now passing.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderReplaced.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (286099 => 286100)

--- trunk/LayoutTests/ChangeLog	2021-11-21 16:51:11 UTC (rev 286099)
+++ trunk/LayoutTests/ChangeLog	2021-11-21 18:22:01 UTC (rev 286100)
@@ -1,3 +1,12 @@
+2021-11-21  Ziran Sun  
+
+[css-grid] svg image as grid items should use the overriding logical width/height when defined to compute the logical height/width
+https://bugs.webkit.org/show_bug.cgi?id=228105
+
+Reviewed by Javier Fernandez.
+
+* TestExpectations: unskip two tests that are now passing.
+
 2021-11-20  Carlos Garcia Campos  
 
 Report the initiating url instead of the redirected one


Modified: trunk/LayoutTests/TestExpectations (286099 => 286100)

--- trunk/LayoutTests/TestExpectations	2021-11-21 16:51:11 UTC (rev 286099)
+++ trunk/LayoutTests/TestExpectations	2021-11-21 18:22:01 UTC (rev 286100)
@@ -4322,8 +4322,6 @@
 webkit.org/b/209460 imported/w3c/web-platform-tests/css/css-grid/abspos/descendant-static-position-002.html [ ImageOnlyFailure ]
 webkit.org/b/209460 imported/w3c/web-platform-tests/css/css-grid/abspos/descendant-static-position-003.html [ ImageOnlyFailure ]
 webkit.org/b/212201 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-limits-001.html [ Skip ]
-webkit.org/b/227900 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-1.html [ ImageOnlyFailure ]
-webkit.org/b/227900 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-2.html [ ImageOnlyFailure ]
 webkit.org/b/212246 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-baseline-align-cycles-001.html [ ImageOnlyFailure ]
 webkit.org/b/231021 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-baseline.html [ ImageOnlyFailure ]
 webkit.org/b/212246 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-content-baseline-001.html [ ImageOnlyFailure ]


Modified: trunk/Source/WebCore/ChangeLog (286099 => 286100)

--- trunk/Source/WebCore/ChangeLog	2021-11-21 16:51:11 UTC (rev 286099)
+++ trunk/Source/WebCore/ChangeLog	2021-11-21 18:22:01 UTC (rev 286100)
@@ -1,3 +1,28 @@
+2021-11-21  Ziran Sun  
+
+[css-grid] svg image as grid items should use the overriding logical width/height when defined to compute the logical height/width
+https://bugs.webkit.org/show_bug.cgi?id=228105
+
+Reviewed by Javier Fernandez.
+
+This is a reland of r280290. It's got reverted because another patch r280078 caused crash and had been
+reverted. r280290 is a dependent patch for r280078.
+
+As discussed at https://github.com/w3c/csswg-drafts/issues/6286#issuecomment-866986544, degenerate
+aspect ratios derived from SVG width/height attributes fall back to viewbox aspect ratio 
+(whether due to negative values or zero values).
+
+When computing the logical height/width using an intrinsic aspect ratio, RenderReplaced uses the
+overridingLogicalWidth/overridingLogicalHeight whenever defined as long as the flex or
+grid item has an intrinsic size. For an SVG graphic though, it's common to have an intrinsic aspect
+ratio but not to have an intrinsic width or height. For this special case, we still should use
+overridingLogicalWidth/overridingLogicalHeight for logical 

[webkit-changes] [285998] trunk

2021-11-18 Thread zsun
Title: [285998] trunk








Revision 285998
Author z...@igalia.com
Date 2021-11-18 05:12:28 -0800 (Thu, 18 Nov 2021)


Log Message
Images as grid items should use the overridingLogicalWidth when defined to compute the logical Height
https://bugs.webkit.org/show_bug.cgi?id=228022

LayoutTests/imported/w3c:

Reviewed by Javier Fernandez.

* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-029-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-030-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-031-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-035-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-036-expected.txt:

Source/WebCore:

This is a re-land of r280078 and r282008. r280078 has caused a crash. Details on the crash test case is
at https://bugs.webkit.org/show_bug.cgi?id=232922. The reason for the crash is that, when recomputing the
intrinsic width we need to recompute the intrinsic width of the caller, which is the grid item, rather than
the grid in this case.

This patch addresses the original issue and the cause for the crash.

When computing the logical height using an intrinsic aspect ratio, RenderReplaced should use the
overridingLogicalWidth whenever defined just as how it does for flex items. This change is to
replace the use of intrinsic (non-stretched) logical width in current code with the overridingLogicalWidth.

The current code doesn't set overringLogicalWidth while the width changes while stretches along Row Axis.
This change adds the logic in.

Reviewed by Javier Fernandez.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeReplacedLogicalHeight const):

LayoutTests:

Reviewed by Javier Fernandez.

* TestExpectations: unskip tests that are now passing.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-029-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-030-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-031-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-035-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-036-expected.txt
trunk/LayoutTests/platform/win/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderGrid.cpp
trunk/Source/WebCore/rendering/RenderReplaced.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (285997 => 285998)

--- trunk/LayoutTests/ChangeLog	2021-11-18 12:34:31 UTC (rev 285997)
+++ trunk/LayoutTests/ChangeLog	2021-11-18 13:12:28 UTC (rev 285998)
@@ -1,3 +1,12 @@
+2021-11-18  Ziran Sun  
+
+Images as grid items should use the overridingLogicalWidth when defined to compute the logical Height
+https://bugs.webkit.org/show_bug.cgi?id=228022
+
+Reviewed by Javier Fernandez.
+
+* TestExpectations: unskip tests that are now passing.
+
 2021-11-18  Youenn Fablet  
 
 MediaPlayerAVFoundation should support rvfc


Modified: trunk/LayoutTests/TestExpectations (285997 => 285998)

--- trunk/LayoutTests/TestExpectations	2021-11-18 12:34:31 UTC (rev 285997)
+++ trunk/LayoutTests/TestExpectations	2021-11-18 13:12:28 UTC (rev 285998)
@@ -1388,9 +1388,6 @@
 imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-015.html [ Pass Failure ]
 webkit.org/b/216146 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-baseline-align-001.html [ ImageOnlyFailure ]
 webkit.org/b/216146 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-baseline-justify-001.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-002.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-007.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-008.html [ ImageOnlyFailure ]
 
 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-dynamic-001.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-repeat-max-width-001.html [ ImageOnlyFailure ]
@@ -4326,8 +4323,6 @@
 webkit.org/b/212201 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-limits-001.html [ Skip ]
 webkit.org/b/227900 

[webkit-changes] [285987] trunk

2021-11-18 Thread zsun
Title: [285987] trunk








Revision 285987
Author z...@igalia.com
Date 2021-11-18 01:12:50 -0800 (Thu, 18 Nov 2021)


Log Message
[css-grid] Transfer size for grid item with an aspect-ratio and stretch alignment against the definite row
https://bugs.webkit.org/show_bug.cgi?id=232987

Reviewed by Javier Fernandez.

Source/WebCore:

For a grid item with an aspect-ratio, if it has stretch alignment against the definite row, it should
try and resolve it if possible and transfer this size into the inline direction for the min/max content
size. For the case that the grid width is content sized, we need to update the width before laying out
the grid items. Since the min-content contribution of the grid item has changed based on the row sizes
calculated in step 2 of sizing algorithm, we also need to repeat the sizing algorithm steps to update
the width of the track sizes.

* rendering/GridLayoutFunctions.cpp:
(WebCore::GridLayoutFunctions::isAspectRatioBlockSizeDependentChild):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::updateGridAreaForAspectRatioItems):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::needsPreferredWidthsRecalculation const):

LayoutTests:

* TestExpectations: unskip the test that is now passing.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/GridLayoutFunctions.cpp
trunk/Source/WebCore/rendering/RenderGrid.cpp
trunk/Source/WebCore/rendering/RenderReplaced.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (285986 => 285987)

--- trunk/LayoutTests/ChangeLog	2021-11-18 07:58:23 UTC (rev 285986)
+++ trunk/LayoutTests/ChangeLog	2021-11-18 09:12:50 UTC (rev 285987)
@@ -1,3 +1,12 @@
+2021-11-18  Ziran Sun  
+
+[css-grid] Transfer size for grid item with an aspect-ratio and stretch alignment against the definite row
+https://bugs.webkit.org/show_bug.cgi?id=232987
+
+Reviewed by Javier Fernandez.
+
+* TestExpectations: unskip the test that is now passing.
+
 2021-11-17  Youenn Fablet  
 
 Add support for more rvfc metadata


Modified: trunk/LayoutTests/TestExpectations (285986 => 285987)

--- trunk/LayoutTests/TestExpectations	2021-11-18 07:58:23 UTC (rev 285986)
+++ trunk/LayoutTests/TestExpectations	2021-11-18 09:12:50 UTC (rev 285987)
@@ -1395,7 +1395,6 @@
 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-dynamic-001.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-repeat-max-width-001.html [ ImageOnlyFailure ]
 
-imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-004.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-003.html [ ImageOnlyFailure ]
 webkit.org/b/231021 imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-size-with-orthogonal-child-dynamic.html [ ImageOnlyFailure ]
 webkit.org/b/231021 imported/w3c/web-platform-tests/css/css-grid/grid-items/percentage-margin-dynamic.html [ ImageOnlyFailure ]


Modified: trunk/Source/WebCore/ChangeLog (285986 => 285987)

--- trunk/Source/WebCore/ChangeLog	2021-11-18 07:58:23 UTC (rev 285986)
+++ trunk/Source/WebCore/ChangeLog	2021-11-18 09:12:50 UTC (rev 285987)
@@ -1,3 +1,24 @@
+2021-11-18  Ziran Sun  
+
+[css-grid] Transfer size for grid item with an aspect-ratio and stretch alignment against the definite row
+https://bugs.webkit.org/show_bug.cgi?id=232987
+
+Reviewed by Javier Fernandez.
+
+For a grid item with an aspect-ratio, if it has stretch alignment against the definite row, it should
+try and resolve it if possible and transfer this size into the inline direction for the min/max content
+size. For the case that the grid width is content sized, we need to update the width before laying out
+the grid items. Since the min-content contribution of the grid item has changed based on the row sizes
+calculated in step 2 of sizing algorithm, we also need to repeat the sizing algorithm steps to update
+the width of the track sizes.
+
+* rendering/GridLayoutFunctions.cpp:
+(WebCore::GridLayoutFunctions::isAspectRatioBlockSizeDependentChild):
+* rendering/RenderGrid.cpp:
+(WebCore::RenderGrid::updateGridAreaForAspectRatioItems):
+* rendering/RenderReplaced.cpp:
+(WebCore::RenderReplaced::needsPreferredWidthsRecalculation const):
+
 2021-11-18 Antoine Quint  
 
 [Model] [macOS] Add support for interaction on macOS


Modified: trunk/Source/WebCore/rendering/GridLayoutFunctions.cpp (285986 => 285987)

--- trunk/Source/WebCore/rendering/GridLayoutFunctions.cpp	2021-11-18 07:58:23 UTC (rev 285986)
+++ trunk/Source/WebCore/rendering/GridLayoutFunctions.cpp	2021-11-18 09:12:50 UTC (rev 285987)
@@ -84,7 +84,7 @@
 
 bool isAspectRatioBlockSizeDependentChild(const RenderBox& child)
 {
-return (child.style().hasAspectRatio() 

[webkit-changes] [285497] trunk

2021-11-09 Thread zsun
Title: [285497] trunk








Revision 285497
Author z...@igalia.com
Date 2021-11-09 06:48:01 -0800 (Tue, 09 Nov 2021)


Log Message
[css-grid] update the content-sized grid width before laying out a grid item with block constraints and aspect-ratio
https://bugs.webkit.org/show_bug.cgi?id=231802

Reviewed by Javier Fernandez.
Source/WebCore:

For a grid item with an aspect-ratio, if it has block-constraints such as the relative logical height
case we consider in this CL, it should try and resolve it if possible and transfer this size into
the inline direction for the min/max content size. For the case that the grid width is content sized,
we need to update the width before laying out the grid items. Since the min-content contribution of
the grid item has changed based on the row sizes calculated in step 2 of sizing algorithm, we also
need to repeat the sizing algorithm steps to update the width of the track sizes.

* rendering/GridLayoutFunctions.cpp:
(WebCore::GridLayoutFunctions::isAspectRatioBlockSizeDependentChild):
* rendering/GridLayoutFunctions.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::updateGridAreaForAspectRatioItems):
* rendering/RenderGrid.h:

LayoutTests:

Unskip the tests that are now passing and add a new test to check track size updates.

* imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-005-expected.html: Added.
* imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-005.html: Added.
* TestExpectations:
* platform/ios-wk2/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/platform/ios-wk2/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/GridLayoutFunctions.cpp
trunk/Source/WebCore/rendering/GridLayoutFunctions.h
trunk/Source/WebCore/rendering/RenderGrid.cpp
trunk/Source/WebCore/rendering/RenderGrid.h


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-005-expected.html
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-005.html




Diff

Modified: trunk/LayoutTests/ChangeLog (285496 => 285497)

--- trunk/LayoutTests/ChangeLog	2021-11-09 14:40:32 UTC (rev 285496)
+++ trunk/LayoutTests/ChangeLog	2021-11-09 14:48:01 UTC (rev 285497)
@@ -1,3 +1,17 @@
+2021-11-09  Ziran Sun  
+
+[css-grid] update the content-sized grid width before laying out a grid item with block constraints and aspect-ratio
+https://bugs.webkit.org/show_bug.cgi?id=231802
+
+Reviewed by Javier Fernandez.
+
+Unskip the tests that are now passing and add a new test to check track size updates.
+
+* imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-005-expected.html: Added.
+* imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-005.html: Added.
+* TestExpectations:
+* platform/ios-wk2/TestExpectations:
+
 2021-11-09  Alan Bujtas  
 
 Rendering bug with height: min-content, position: absolute, and box-sizing: border-box


Modified: trunk/LayoutTests/TestExpectations (285496 => 285497)

--- trunk/LayoutTests/TestExpectations	2021-11-09 14:40:32 UTC (rev 285496)
+++ trunk/LayoutTests/TestExpectations	2021-11-09 14:48:01 UTC (rev 285497)
@@ -1399,7 +1399,6 @@
 
 imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-009.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/flex-sizing-rows-indefinite-height.html [ ImageOnlyFailure ]
-webkit.org/b/231021 imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-intrinsic-size-dynamic-block-size.html [ ImageOnlyFailure ]
 webkit.org/b/231021 imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-template-flexible-rerun-track-sizing.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/masonry-align-content-001.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/masonry-align-content-002.html [ ImageOnlyFailure ]


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-005-expected.html (0 => 285497)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-005-expected.html	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-005-expected.html	2021-11-09 14:48:01 UTC (rev 285497)
@@ -0,0 +1,4 @@
+
+Test passes if there is a filled green square.
+


Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-005.html (0 => 285497)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-005.html	(rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-005.html	2021-11-09 

[webkit-changes] [284876] trunk

2021-10-26 Thread zsun
Title: [284876] trunk








Revision 284876
Author z...@igalia.com
Date 2021-10-26 10:08:08 -0700 (Tue, 26 Oct 2021)


Log Message
Fix CSS serialization affecting grid-auto-flow
https://bugs.webkit.org/show_bug.cgi?id=232240

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Update the following test and expectation files -
* LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set-expected.txt:
* LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set.html:
* LayoutTests/fast/css-grid-layout/grid-shorthand-get-set-expected.txt:
* LayoutTests/fast/css-grid-layout/grid-shorthand-get-set.html:
* web-platform-tests/css/css-grid/grid-layout-properties-expected.txt:
* web-platform-tests/css/css-grid/parsing/grid-auto-flow-computed-expected.txt:
* web-platform-tests/css/css-grid/parsing/grid-auto-flow-valid-expected.txt:
* web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/grid-auto-flow.html:

Source/WebCore:

This is to fix the serialization issue of grid-auto-flow where the word 'row' has been
included necessarily.

This Change is an import of chromium CL at
https://chromium-review.googlesource.com/c/chromium/src/+/3179598

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

Modified Paths

trunk/LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set-expected.txt
trunk/LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set.html
trunk/LayoutTests/fast/css-grid-layout/grid-shorthand-get-set-expected.txt
trunk/LayoutTests/fast/css-grid-layout/grid-shorthand-get-set.html
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-layout-properties-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-auto-flow-computed-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-auto-flow-valid-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/grid-auto-flow.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp




Diff

Modified: trunk/LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set-expected.txt (284875 => 284876)

--- trunk/LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set-expected.txt	2021-10-26 17:06:43 UTC (rev 284875)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set-expected.txt	2021-10-26 17:08:08 UTC (rev 284876)
@@ -6,11 +6,11 @@
 Test getting grid-auto-flow set through CSS
 PASS window.getComputedStyle(gridAutoFlowColumnSparse, '').getPropertyValue('grid-auto-flow') is 'column'
 PASS window.getComputedStyle(gridAutoFlowRowSparse, '').getPropertyValue('grid-auto-flow') is 'row'
-PASS window.getComputedStyle(gridAutoFlowDense, '').getPropertyValue('grid-auto-flow') is 'row dense'
+PASS window.getComputedStyle(gridAutoFlowDense, '').getPropertyValue('grid-auto-flow') is 'dense'
 PASS window.getComputedStyle(gridAutoFlowColumnDense, '').getPropertyValue('grid-auto-flow') is 'column dense'
-PASS window.getComputedStyle(gridAutoFlowRowDense, '').getPropertyValue('grid-auto-flow') is 'row dense'
+PASS window.getComputedStyle(gridAutoFlowRowDense, '').getPropertyValue('grid-auto-flow') is 'dense'
 PASS window.getComputedStyle(gridAutoFlowDenseColumn, '').getPropertyValue('grid-auto-flow') is 'column dense'
-PASS window.getComputedStyle(gridAutoFlowDenseRow, '').getPropertyValue('grid-auto-flow') is 'row dense'
+PASS window.getComputedStyle(gridAutoFlowDenseRow, '').getPropertyValue('grid-auto-flow') is 'dense'
 PASS window.getComputedStyle(gridAutoFlowInherit, '').getPropertyValue('grid-auto-flow') is 'column'
 PASS window.getComputedStyle(gridAutoFlowNoInherit, '').getPropertyValue('grid-auto-flow') is 'row'
 
@@ -32,13 +32,13 @@
 PASS element.style.gridAutoFlow is 'column dense'
 PASS window.getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is 'column dense'
 PASS element.style.gridAutoFlow is 'dense'
-PASS window.getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is 'row dense'
-PASS element.style.gridAutoFlow is 'row dense'
-PASS window.getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is 'row dense'
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is 'dense'
+PASS element.style.gridAutoFlow is 'dense'
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is 'dense'
 PASS element.style.gridAutoFlow is 'column dense'
 PASS window.getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is 'column dense'
-PASS element.style.gridAutoFlow is 'row dense'
-PASS window.getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is 'row dense'
+PASS element.style.gridAutoFlow is 'dense'
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is 

[webkit-changes] [284793] trunk

2021-10-25 Thread zsun
Title: [284793] trunk








Revision 284793
Author z...@igalia.com
Date 2021-10-25 10:52:41 -0700 (Mon, 25 Oct 2021)


Log Message
[CSS-grid] Need to set prefer width dirty for the child that has constraints to the grid area
https://bugs.webkit.org/show_bug.cgi?id=232140

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Update the test expectation file for the following tests. These tests are now passing.
* web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-002-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:

For a child with relative width constraints to the grid area, such as percentaged paddings, we reset the
overridingContainingBlockContentSizeForChild value for columns when we are executing a definite strategy
for columns. Since we have updated the overridingContainingBlockContentSizeForChild inline-axis/width value
in GridTrackSizingAlgorithmStrategy::minContentForChild, we might need to recompute the child's relative
width. For some cases, we probably will not be able to do it during the RenderGrid::layoutGridItems() function
as the grid area does't change there any more. Since we are doing a layout inside
GridTrackSizingAlgorithmStrategy::logicalHeightForChild() function, this CL takes the advantage and set the
preferredLogicalWidth dirty before this layout call.

* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithmStrategy::minContentForChild const):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-002-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-002-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (284792 => 284793)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-10-25 17:48:24 UTC (rev 284792)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-10-25 17:52:41 UTC (rev 284793)
@@ -1,3 +1,15 @@
+2021-10-25  Ziran Sun  
+
+[CSS-grid] Need to set prefer width dirty for the child that has constraints to the grid area
+https://bugs.webkit.org/show_bug.cgi?id=232140
+
+Reviewed by Sergio Villar Senin.
+
+Update the test expectation file for the following tests. These tests are now passing.
+* web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-002-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:
+
 2021-10-25  Tim Nguyen  
 
 Fix imported/w3c/web-platform-tests/css/selectors/focus-visible-009.html flaky failure on macOS wk1


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-002-expected.txt (284792 => 284793)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-002-expected.txt	2021-10-25 17:48:24 UTC (rev 284792)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-002-expected.txt	2021-10-25 17:52:41 UTC (rev 284793)
@@ -1,30 +1,10 @@
 
-FAIL .grid 1 assert_equals:
-
-  X
-  
-
-width expected 60 but got 50
-FAIL .grid 2 assert_equals:
-
-  X
-  
-
-width expected 60 but got 50
+PASS .grid 1
+PASS .grid 2
 PASS .grid 3
 PASS .grid 4
-FAIL .grid 5 assert_equals:
-
-  X
-  
-
-width expected 60 but got 50
-FAIL .grid 6 assert_equals:
-
-  X
-  
-
-width expected 60 but got 50
+PASS .grid 5
+PASS .grid 6
 PASS .grid 7
 PASS .grid 8
 Direction LTR


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002-expected.txt (284792 => 284793)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002-expected.txt	2021-10-25 17:48:24 UTC (rev 284792)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002-expected.txt	2021-10-25 17:52:41 UTC (rev 284793)
@@ -1,32 +1,12 @@
 
 PASS .grid 1
 PASS .grid 2
-FAIL .grid 3 assert_equals:
-
-  X
-  
-
-height expected 60 but got 50
-FAIL .grid 4 assert_equals:
-
-  X
-  
-
-height expected 60 but got 50
+PASS .grid 3
+PASS .grid 4
 PASS .grid 5
 PASS .grid 6
-FAIL .grid 7 assert_equals:
-
-  X
-  
-
-height expected 60 but got 50
-FAIL 

[webkit-changes] [284773] trunk

2021-10-25 Thread zsun
Title: [284773] trunk








Revision 284773
Author z...@igalia.com
Date 2021-10-25 01:35:23 -0700 (Mon, 25 Oct 2021)


Log Message
[css-writing-modes] Fix sizing of orthogonal elements with percentage margins
https://bugs.webkit.org/show_bug.cgi?id=231951

Reviewed by Manuel Rego Casasnovas.
Source/WebCore:

This is to modify RenderBox::FillAvailableMeasure() to handle the case of
orthogonal elements when computing the margins. Spec reference is at
https://www.w3.org/TR/css-writing-modes-3/#dimension-mapping

The change is an import of Chromium CL at
https://chromium-review.googlesource.com/c/chromium/src/+/968522/

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

LayoutTests:

* TestExpectations: Unskipped 8 tests that are now passing.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderBox.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (284772 => 284773)

--- trunk/LayoutTests/ChangeLog	2021-10-25 06:47:50 UTC (rev 284772)
+++ trunk/LayoutTests/ChangeLog	2021-10-25 08:35:23 UTC (rev 284773)
@@ -1,3 +1,12 @@
+2021-10-25  Ziran Sun  
+
+[css-writing-modes] Fix sizing of orthogonal elements with percentage margins
+https://bugs.webkit.org/show_bug.cgi?id=231951
+
+Reviewed by Manuel Rego Casasnovas.
+
+* TestExpectations: Unskipped 8 tests that are now passing.
+
 2021-10-24  Wenson Hsieh  
 
 REGRESSION (iOS 15): Safari shows zoom callout even if -webkit-user-select is none


Modified: trunk/LayoutTests/TestExpectations (284772 => 284773)

--- trunk/LayoutTests/TestExpectations	2021-10-25 06:47:50 UTC (rev 284772)
+++ trunk/LayoutTests/TestExpectations	2021-10-25 08:35:23 UTC (rev 284773)
@@ -4229,14 +4229,6 @@
 webkit.org/b/209080 imported/w3c/web-platform-tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-001.xht [ ImageOnlyFailure ]
 webkit.org/b/209080 imported/w3c/web-platform-tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-004.xht [ ImageOnlyFailure ]
 webkit.org/b/209080 imported/w3c/web-platform-tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-008.xht [ ImageOnlyFailure ]
-webkit.org/b/209080 imported/w3c/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-001.html [ ImageOnlyFailure ]
-webkit.org/b/209080 imported/w3c/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-002.html [ ImageOnlyFailure ]
-webkit.org/b/209080 imported/w3c/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-003.html [ ImageOnlyFailure ]
-webkit.org/b/209080 imported/w3c/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-004.html [ ImageOnlyFailure ]
-webkit.org/b/209080 imported/w3c/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-005.html [ ImageOnlyFailure ]
-webkit.org/b/209080 imported/w3c/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-006.html [ ImageOnlyFailure ]
-webkit.org/b/209080 imported/w3c/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-007.html [ ImageOnlyFailure ]
-webkit.org/b/209080 imported/w3c/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-008.html [ ImageOnlyFailure ]
 webkit.org/b/209080 imported/w3c/web-platform-tests/css/css-writing-modes/table-cell-001.html [ ImageOnlyFailure ]
 webkit.org/b/209080 imported/w3c/web-platform-tests/css/css-writing-modes/table-cell-002.html [ ImageOnlyFailure ]
 webkit.org/b/209080 imported/w3c/web-platform-tests/css/css-writing-modes/table-column-order-002.xht [ ImageOnlyFailure ]


Modified: trunk/Source/WebCore/ChangeLog (284772 => 284773)

--- trunk/Source/WebCore/ChangeLog	2021-10-25 06:47:50 UTC (rev 284772)
+++ trunk/Source/WebCore/ChangeLog	2021-10-25 08:35:23 UTC (rev 284773)
@@ -1,3 +1,20 @@
+2021-10-25  Ziran Sun  
+
+[css-writing-modes] Fix sizing of orthogonal elements with percentage margins
+https://bugs.webkit.org/show_bug.cgi?id=231951
+
+Reviewed by Manuel Rego Casasnovas.
+
+This is to modify RenderBox::FillAvailableMeasure() to handle the case of
+orthogonal elements when computing the margins. Spec reference is at
+https://www.w3.org/TR/css-writing-modes-3/#dimension-mapping
+
+The change is an import of Chromium CL at
+https://chromium-review.googlesource.com/c/chromium/src/+/968522/
+
+* rendering/RenderBox.cpp:
+(WebCore::RenderBox::fillAvailableMeasure const):
+
 2021-10-24  Kimmo Kinnunen  
 
 ImageBitmap should report its memory cost


Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (284772 => 284773)

--- trunk/Source/WebCore/rendering/RenderBox.cpp	2021-10-25 06:47:50 UTC (rev 284772)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2021-10-25 08:35:23 UTC (rev 284773)
@@ -2694,8 +2694,10 @@
 
 LayoutUnit 

[webkit-changes] [283492] trunk/LayoutTests

2021-10-04 Thread zsun
Title: [283492] trunk/LayoutTests








Revision 283492
Author z...@igalia.com
Date 2021-10-04 05:14:33 -0700 (Mon, 04 Oct 2021)


Log Message
[css-grid] Resync web-platform-tests/css/css-grid tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=231020

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-grid/abspos/grid-positioned-item-dynamic-change-005-expected.html: Added.
* web-platform-tests/css/css-grid/abspos/grid-positioned-item-dynamic-change-005.html: Added.
* web-platform-tests/css/css-grid/abspos/grid-positioned-item-dynamic-change-006-expected.html: Added.
* web-platform-tests/css/css-grid/abspos/grid-positioned-item-dynamic-change-006.html: Added.
* web-platform-tests/css/css-grid/abspos/grid-positioned-item-dynamic-change-007-expected.html: Added.
* web-platform-tests/css/css-grid/abspos/grid-positioned-item-dynamic-change-007.html: Added.
* web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-017-expected.html: Added.
* web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-017.html: Added.
* web-platform-tests/css/css-grid/abspos/positioned-grid-items-023-expected.html: Added.
* web-platform-tests/css/css-grid/abspos/positioned-grid-items-023.html: Added.
* web-platform-tests/css/css-grid/abspos/positioned-grid-items-024-expected.xht: Added.
* web-platform-tests/css/css-grid/abspos/positioned-grid-items-024.html: Added.
* web-platform-tests/css/css-grid/abspos/w3c-import.log:
* web-platform-tests/css/css-grid/alignment/grid-inline-baseline-expected.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-baseline.html: Added.
* web-platform-tests/css/css-grid/alignment/w3c-import.log:
* web-platform-tests/css/css-grid/empty-grid-within-flexbox-expected.xht: Added.
* web-platform-tests/css/css-grid/empty-grid-within-flexbox.html: Added.
* web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-minmax-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-item-percentage-quirk-001-expected.html.
* web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-minmax.html: Added.
* web-platform-tests/css/css-grid/grid-definition/w3c-import.log:
* web-platform-tests/css/css-grid/grid-items/grid-size-with-orthogonal-child-dynamic-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-item-percentage-quirk-002-expected.html.
* web-platform-tests/css/css-grid/grid-items/grid-size-with-orthogonal-child-dynamic.html: Added.
* web-platform-tests/css/css-grid/grid-items/percentage-margin-dynamic-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-item-percentage-quirk-001-expected.html.
* web-platform-tests/css/css-grid/grid-items/percentage-margin-dynamic.html: Added.
* web-platform-tests/css/css-grid/grid-items/replaced-element-014-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-item-percentage-quirk-001-expected.html.
* web-platform-tests/css/css-grid/grid-items/replaced-element-014.html: Added.
* web-platform-tests/css/css-grid/grid-items/replaced-element-015-expected.html: Added.
* web-platform-tests/css/css-grid/grid-items/replaced-element-015.html: Added.
* web-platform-tests/css/css-grid/grid-items/w3c-import.log:
* web-platform-tests/css/css-grid/grid-model/grid-item-hit-test-expected.txt: Added.
* web-platform-tests/css/css-grid/grid-model/grid-item-hit-test.html: Added.
* web-platform-tests/css/css-grid/grid-model/w3c-import.log:
* web-platform-tests/css/css-grid/grid-with-dynamic-img-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-item-percentage-quirk-001-expected.html.
* web-platform-tests/css/css-grid/grid-with-dynamic-img.html: Added.
* web-platform-tests/css/css-grid/grid-with-orthogonal-child-within-flexbox-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-item-percentage-quirk-001-expected.html.
* web-platform-tests/css/css-grid/grid-with-orthogonal-child-within-flexbox.html: Added.
* web-platform-tests/css/css-grid/grid-within-flexbox-indefinite-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-item-percentage-quirk-001-expected.html.
* web-platform-tests/css/css-grid/grid-within-flexbox-indefinite.html: Added.
* web-platform-tests/css/css-grid/layout-algorithm/grid-intrinsic-size-dynamic-block-size-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-item-percentage-quirk-001-expected.html.
* web-platform-tests/css/css-grid/layout-algorithm/grid-intrinsic-size-dynamic-block-size.html: Added.
* web-platform-tests/css/css-grid/layout-algorithm/grid-template-flexible-rerun-track-sizing-expected.xht: Added.
* web-platform-tests/css/css-grid/layout-algorithm/grid-template-flexible-rerun-track-sizing.html: Added.
* web-platform-tests/css/css-grid/layout-algorithm/w3c-import.log:
* 

[webkit-changes] [283439] trunk

2021-10-02 Thread zsun
Title: [283439] trunk








Revision 283439
Author z...@igalia.com
Date 2021-10-02 05:38:36 -0700 (Sat, 02 Oct 2021)


Log Message
[css-grid] Accommodate spanning items crossing flexible tracks
https://bugs.webkit.org/show_bug.cgi?id=230252

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Three tests are passing and the test expectation files are updated.

* web-platform-tests/css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-001-expected.txt:
* web-platform-tests/css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-002-expected.txt:
* web-platform-tests/css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-003-expected.txt:

Source/WebCore:

CSS spec has added one more step at https://drafts.csswg.org/css-grid/#algo-spanning-flex-items
for resolving intrinsic track sizes. Basically, increasing sizes to accommodate spanning items
crossing flexible tracks instead of ignoring their contents completely.

This patch is an import of obrufau's work in chromium. Initial CL is at
https://chromium-review.googlesource.com/c/chromium/src/+/1492337/16..20.
The performance issue caused by the patch were fixed at https://bugs.webkit.org/show_bug.cgi?id=207852
for webkit and https://bugs.chromium.org/p/chromium/issues/detail?id=1021929 for chromium.
This change also addresses web compat issue raised at https://github.com/w3c/csswg-drafts/issues/4783.

* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithm::initialGrowthLimit const):
(WebCore::GridTrackSizingAlgorithm::spanningItemCrossesFlexibleSizedTracks const):
(WebCore::GridTrackSizingAlgorithm::increaseSizesToAccommodateSpanningItems):
(WebCore::getSizeDistributionWeight):
(WebCore::distributeItemIncurredIncreaseToTrack):
(WebCore::distributeItemIncurredIncreases):
(WebCore::GridTrackSizingAlgorithm::distributeSpaceToTracks const):
(WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):
(WebCore::GridTrackSizingAlgorithm::resolveIntrinsicTrackSizes):
* rendering/GridTrackSizingAlgorithm.h:
(WebCore::GridTrackSizingAlgorithmStrategy::distributeSpaceToTracks const):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-001-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-002-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-003-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.h




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (283438 => 283439)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-10-02 11:57:48 UTC (rev 283438)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-10-02 12:38:36 UTC (rev 283439)
@@ -1,3 +1,16 @@
+2021-10-02  Ziran Sun  
+
+[css-grid] Accommodate spanning items crossing flexible tracks
+https://bugs.webkit.org/show_bug.cgi?id=230252
+
+Reviewed by Sergio Villar Senin.
+
+Three tests are passing and the test expectation files are updated.
+
+* web-platform-tests/css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-001-expected.txt:
+* web-platform-tests/css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-002-expected.txt:
+* web-platform-tests/css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-003-expected.txt:
+
 2021-10-02  Youenn Fablet  
 
 Add support for ServiceWorkerGlobalScope push event handler


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-001-expected.txt (283438 => 283439)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-001-expected.txt	2021-10-02 11:57:48 UTC (rev 283438)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-001-expected.txt	2021-10-02 12:38:36 UTC (rev 283439)
@@ -7,24 +7,24 @@
 PASS 'grid' with: grid-template-columns: minmax(0, 1fr); and grid-template-rows: minmax(0, 1fr);
 PASS 'grid' with: grid-template-columns: minmax(0, 2fr); and grid-template-rows: minmax(0, 2fr);
 PASS 'grid' with: grid-template-columns: minmax(75px, 1fr); and grid-template-rows: minmax(75px, 1fr);
-FAIL 'grid' with: grid-template-columns: 0fr 0fr; and grid-template-rows: 0fr 0fr; assert_in_array: gridTemplateColumns value "0px 0px" not in array ["50px 50px"]
-FAIL 'grid' with: grid-template-columns: 0fr 1fr; and grid-template-rows: 0fr 1fr; assert_in_array: gridTemplateColumns value "0px 50px" not in array ["0px 100px"]
-FAIL 'grid' with: grid-template-columns: 1fr 0fr; and grid-template-rows: 1fr 0fr; assert_in_array: gridTemplateColumns value "50px 0px" not in array ["100px 0px"]

[webkit-changes] [283321] trunk

2021-09-30 Thread zsun
Title: [283321] trunk








Revision 283321
Author z...@igalia.com
Date 2021-09-30 12:15:38 -0700 (Thu, 30 Sep 2021)


Log Message
[css-grid]  Transfer sizes from the aspect-ratio while resolving min-length for auto repetitions
https://bugs.webkit.org/show_bug.cgi?id=230676

Source/WebCore:

Reviewed by  Sergio Villar Senin.

When resolving min-length for auto repetitions, if the min-length on the axis considered is not specified,
we need to check if the min-length on the other axis and the aspect ratio are specified. When both are
specified, we will fetch the transferred min-length for the axis we are considering.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeAutoRepeatTracksCount const):

LayoutTests:

Reviewed by Sergio Villar Senin.

Updated TestExpectations file as two tests with image failures are now passing.

* TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderGrid.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (283320 => 283321)

--- trunk/LayoutTests/ChangeLog	2021-09-30 17:48:19 UTC (rev 283320)
+++ trunk/LayoutTests/ChangeLog	2021-09-30 19:15:38 UTC (rev 283321)
@@ -1,3 +1,14 @@
+2021-09-30  Ziran Sun  
+
+[css-grid]  Transfer sizes from the aspect-ratio while resolving min-length for auto repetitions
+https://bugs.webkit.org/show_bug.cgi?id=230676
+
+Reviewed by Sergio Villar Senin.
+
+Updated TestExpectations file as two tests with image failures are now passing.
+
+* TestExpectations:
+
 2021-09-30  Arcady Goldmints-Orlov  
 
 [GLIB] Rebaseline a number of tests. Unreviewed test gardening.


Modified: trunk/LayoutTests/TestExpectations (283320 => 283321)

--- trunk/LayoutTests/TestExpectations	2021-09-30 17:48:19 UTC (rev 283320)
+++ trunk/LayoutTests/TestExpectations	2021-09-30 19:15:38 UTC (rev 283321)
@@ -1341,8 +1341,6 @@
 webkit.org/b/216146 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-baseline-align-001.html [ ImageOnlyFailure ]
 webkit.org/b/216146 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-baseline-justify-001.html [ ImageOnlyFailure ]
 
-imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-aspect-ratio-001.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-aspect-ratio-002.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-dynamic-001.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-dynamic-003.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-repeat-max-width-001.html [ ImageOnlyFailure ]


Modified: trunk/Source/WebCore/ChangeLog (283320 => 283321)

--- trunk/Source/WebCore/ChangeLog	2021-09-30 17:48:19 UTC (rev 283320)
+++ trunk/Source/WebCore/ChangeLog	2021-09-30 19:15:38 UTC (rev 283321)
@@ -1,3 +1,17 @@
+2021-09-30  Ziran Sun  
+
+[css-grid]  Transfer sizes from the aspect-ratio while resolving min-length for auto repetitions
+https://bugs.webkit.org/show_bug.cgi?id=230676
+
+Reviewed by  Sergio Villar Senin.
+
+When resolving min-length for auto repetitions, if the min-length on the axis considered is not specified,
+we need to check if the min-length on the other axis and the aspect ratio are specified. When both are
+specified, we will fetch the transferred min-length for the axis we are considering.
+
+* rendering/RenderGrid.cpp:
+(WebCore::RenderGrid::computeAutoRepeatTracksCount const):
+
 2021-09-30  John Wilander  
 
 PCM: Take app bundle ID into consideration when matching triggering events with pending clicks


Modified: trunk/Source/WebCore/rendering/RenderGrid.cpp (283320 => 283321)

--- trunk/Source/WebCore/rendering/RenderGrid.cpp	2021-09-30 17:48:19 UTC (rev 283320)
+++ trunk/Source/WebCore/rendering/RenderGrid.cpp	2021-09-30 19:15:38 UTC (rev 283321)
@@ -479,7 +479,10 @@
 }
 
 const Length& minSize = isRowAxis ? style().logicalMinWidth() : style().logicalMinHeight();
-if (!availableMaxSize && !minSize.isSpecified())
+const auto& minSizeForOrthogonalAxis = isRowAxis ? style().logicalMinHeight() : style().logicalMinWidth();
+bool shouldComputeMinSizeFromAspectRatio = minSizeForOrthogonalAxis.isSpecified() && !shouldIgnoreAspectRatio();
+
+if (!availableMaxSize && !minSize.isSpecified() && !shouldComputeMinSizeFromAspectRatio)
 return autoRepeatTrackListLength;
 
 std::optional availableMinSize;
@@ -488,9 +491,12 @@
 containingBlockAvailableSize = isRowAxis ? containingBlockLogicalWidthForContent() : containingBlockLogicalHeightForContent(ExcludeMarginBorderPadding);
 LayoutUnit minSizeValue = valueForLength(minSize, 

[webkit-changes] [282804] trunk

2021-09-21 Thread zsun
Title: [282804] trunk








Revision 282804
Author z...@igalia.com
Date 2021-09-21 00:26:24 -0700 (Tue, 21 Sep 2021)


Log Message
[css-grid] When the max is less than the min in minmax(), the max will be floored by the min
https://bugs.webkit.org/show_bug.cgi?id=230481

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Updated test expectation files as all the tests are passing.

* web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-columns-001-expected.txt:
* web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-rows-001-expected.txt:
* web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-columns-001-expected.txt:
* web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-rows-001-expected.txt:

Source/WebCore:

As per discussions in https://github.com/w3c/csswg-drafts/issues/4043, when the max is less than
the min in minmax()we need to floor the max track sizing function by the min track sizing function
when calculating the number of "auto-fit" or "auto-fill" repetitions. This change handles the
situations such as
  -  If both the min and max track sizing functions are definite, use the maximum of them
  -  If only one track sizing function is definite, use that one

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeAutoRepeatTracksCount const):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-columns-001-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-rows-001-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-columns-001-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-rows-001-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderGrid.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (282803 => 282804)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-09-21 07:18:03 UTC (rev 282803)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-09-21 07:26:24 UTC (rev 282804)
@@ -1,3 +1,17 @@
+2021-09-21  Ziran Sun  
+
+[css-grid] When the max is less than the min in minmax(), the max will be floored by the min
+https://bugs.webkit.org/show_bug.cgi?id=230481
+
+Reviewed by Sergio Villar Senin.
+
+Updated test expectation files as all the tests are passing.
+
+* web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-columns-001-expected.txt:
+* web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-rows-001-expected.txt:
+* web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-columns-001-expected.txt:
+* web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-rows-001-expected.txt:
+
 2021-09-21  Youenn Fablet  
 
 Update list of WebRTC senders and receivers when updating local or remote descriptions


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-columns-001-expected.txt (282803 => 282804)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-columns-001-expected.txt	2021-09-21 07:18:03 UTC (rev 282803)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-columns-001-expected.txt	2021-09-21 07:26:24 UTC (rev 282804)
@@ -2,16 +2,8 @@
 PASS .grid 1
 PASS .grid 2
 PASS .grid 3
-FAIL .grid 4 assert_equals:
-
-
-
-width expected 180 but got 450
-FAIL .grid 5 assert_equals:
-
-
-
-width expected 180 but got 450
+PASS .grid 4
+PASS .grid 5
 PASS .grid 6
 PASS .grid 7
 PASS .grid 8


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-rows-001-expected.txt (282803 => 282804)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-rows-001-expected.txt	2021-09-21 07:18:03 UTC (rev 282803)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-rows-001-expected.txt	2021-09-21 07:26:24 UTC (rev 282804)
@@ -2,16 +2,8 @@
 PASS .grid 1
 PASS .grid 2
 PASS .grid 3
-FAIL .grid 4 assert_equals:
-
-
-
-height expected 180 but got 450
-FAIL .grid 5 assert_equals:
-
-
-
-height expected 180 but got 450
+PASS .grid 4
+PASS .grid 5
 PASS .grid 6
 PASS .grid 7
 PASS .grid 8


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-columns-001-expected.txt (282803 => 282804)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-columns-001-expected.txt	2021-09-21 07:18:03 UTC (rev 282803)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-columns-001-expected.txt	2021-09-21 07:26:24 UTC (rev 282804)
@@ -2,16 +2,8 @@
 PASS .grid 1
 PASS 

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

2021-09-21 Thread zsun
Title: [282801] trunk/Source/WebCore








Revision 282801
Author z...@igalia.com
Date 2021-09-21 00:08:56 -0700 (Tue, 21 Sep 2021)


Log Message
[css-grid] FlexType is not applicable to min track sizing
https://bugs.webkit.org/show_bug.cgi?id=230405

Reviewed by Sergio Villar Senin.

For min track sizing, flexType is not applicable and shouldn't need a check.
This change is to remove the check that should not happen. No behaviour changes with
this change.

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

Modified Paths

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




Diff

Modified: trunk/Source/WebCore/ChangeLog (282800 => 282801)

--- trunk/Source/WebCore/ChangeLog	2021-09-21 05:27:09 UTC (rev 282800)
+++ trunk/Source/WebCore/ChangeLog	2021-09-21 07:08:56 UTC (rev 282801)
@@ -1,3 +1,17 @@
+2021-09-21  Ziran Sun  
+
+[css-grid] FlexType is not applicable to min track sizing
+https://bugs.webkit.org/show_bug.cgi?id=230405
+
+Reviewed by Sergio Villar Senin.
+
+For min track sizing, flexType is not applicable and shouldn't need a check.
+This change is to remove the check that should not happen. No behaviour changes with
+this change.
+
+* rendering/GridTrackSizingAlgorithm.cpp:
+(WebCore::GridTrackSizingAlgorithm::spanningItemCrossesFlexibleSizedTracks const):
+
 2021-09-20  Chris Dumez  
 
 Drop remaining uses of makeRefPtr() in WebCore/


Modified: trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp (282800 => 282801)

--- trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp	2021-09-21 05:27:09 UTC (rev 282800)
+++ trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp	2021-09-21 07:08:56 UTC (rev 282801)
@@ -265,7 +265,7 @@
 const Vector& trackList = tracks(m_direction);
 for (auto trackPosition : itemSpan) {
 const auto& trackSize = trackList[trackPosition].cachedTrackSize();
-if (trackSize.minTrackBreadth().isFlex() || trackSize.maxTrackBreadth().isFlex())
+if (trackSize.maxTrackBreadth().isFlex())
 return true;
 }
 






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


[webkit-changes] [282463] trunk

2021-09-15 Thread zsun
Title: [282463] trunk








Revision 282463
Author z...@igalia.com
Date 2021-09-15 11:06:47 -0700 (Wed, 15 Sep 2021)


Log Message
[css-grid] Overflow should be computed with the actual logical bottom
https://bugs.webkit.org/show_bug.cgi?id=226981

Reviewed by Javier Fernandez.

When computing the overflow area in the grid container, we need to obtain the result of ClientLogicalBottom
function. This value should be retrieved after computing the actual logical height rather than before.

For grid, width/height of the overflow rect should be the width/height of the grid area of the items rather than
the width/height of the container block. As per https://github.com/w3c/csswg-drafts/issues/3653, child's margins
along with padding should contribute to the scrollable overflow area.

Test: imported/w3c/web-platform-tests/css/css-grid/alignment/grid-content-alignment-overflow-002.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::clientLogicalBottomAfterRepositioning):
(WebCore::RenderBlock::computeOverflow):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::logicalLeftForChild const):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::clientLogicalBottomAfterRepositioning): Deleted.
* rendering/RenderFlexibleBox.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):

Modified Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-content-alignment-overflow-002-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderBlock.cpp
trunk/Source/WebCore/rendering/RenderBlock.h
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
trunk/Source/WebCore/rendering/RenderFlexibleBox.h
trunk/Source/WebCore/rendering/RenderGrid.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-content-alignment-overflow-002-expected.txt (282462 => 282463)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-content-alignment-overflow-002-expected.txt	2021-09-15 18:05:10 UTC (rev 282462)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-content-alignment-overflow-002-expected.txt	2021-09-15 18:06:47 UTC (rev 282463)
@@ -41,77 +41,18 @@
 Content-Alignment: center and Overflow-Alignment: unsafe
 
 
-FAIL .grid 1 assert_equals:
-
-  
-
-
-
-
-  
-
-scrollWidth expected 110 but got 80
-FAIL .grid 2 assert_equals:
-
-  
-
-
-
-
-  
-
-scrollHeight expected 205 but got 260
-FAIL .grid 3 assert_equals:
-
-  
-
-
-
-
-  
-
-scrollWidth expected 160 but got 130
+PASS .grid 1
+PASS .grid 2
+PASS .grid 3
 PASS .grid 4
 PASS .grid 5
-FAIL .grid 6 assert_equals:
-
-  
-
-
-
-
-  
-
-scrollHeight expected 150 but got 260
-FAIL .grid 7 assert_equals:
-
-  
-
-
-
-
-  
-
-scrollWidth expected 160 but got 130
+PASS .grid 6
+PASS .grid 7
 PASS .grid 8
 PASS .grid 9
 PASS .grid 10
-FAIL .grid 11 assert_equals:
-
-  
-
-
-  
-
-scrollHeight expected 100 but got 310
-FAIL .grid 12 assert_equals:
-
-  
-
-
-  
-
-scrollWidth expected 180 but got 150
+PASS .grid 11
+PASS .grid 12
 PASS .grid 13
 PASS .grid 14
 


Modified: trunk/Source/WebCore/ChangeLog (282462 => 282463)

--- trunk/Source/WebCore/ChangeLog	2021-09-15 18:05:10 UTC (rev 282462)
+++ trunk/Source/WebCore/ChangeLog	2021-09-15 18:06:47 UTC (rev 282463)
@@ -1,3 +1,29 @@
+2021-09-15  Ziran Sun  
+
+[css-grid] Overflow should be computed with the actual logical bottom
+https://bugs.webkit.org/show_bug.cgi?id=226981
+
+Reviewed by Javier Fernandez.
+
+When computing the overflow area in the grid container, we need to obtain the result of ClientLogicalBottom
+function. This value should be retrieved after computing the actual logical height rather than before.
+
+For grid, width/height of the overflow rect should be the width/height of the grid area of the items rather than
+the width/height of the container block. As per https://github.com/w3c/csswg-drafts/issues/3653, child's margins
+along with padding should contribute to the scrollable overflow area.
+
+Test: imported/w3c/web-platform-tests/css/css-grid/alignment/grid-content-alignment-overflow-002.html
+* rendering/RenderBlock.cpp:
+(WebCore::RenderBlock::clientLogicalBottomAfterRepositioning):
+(WebCore::RenderBlock::computeOverflow):
+* rendering/RenderBlock.h:
+(WebCore::RenderBlock::logicalLeftForChild const):
+* rendering/RenderFlexibleBox.cpp:
+(WebCore::RenderFlexibleBox::clientLogicalBottomAfterRepositioning): Deleted.
+* rendering/RenderFlexibleBox.h:
+* rendering/RenderGrid.cpp:
+(WebCore::RenderGrid::layoutBlock):
+
 2021-09-15  Youenn Fablet  
 
 imported/w3c/web-platform-tests/webrtc-extensions/transfer-datachannel.html is failing after https://trac.webkit.org/changeset/282445/webkit



[webkit-changes] [282340] trunk

2021-09-13 Thread zsun
Title: [282340] trunk








Revision 282340
Author z...@igalia.com
Date 2021-09-13 11:15:52 -0700 (Mon, 13 Sep 2021)


Log Message
[css-grid] calling correct offset function for RTL for out of flow child
https://bugs.webkit.org/show_bug.cgi?id=229968

Reviewed by Javier Fernandez.

Handle RTL case to return the correct border values when calculating offsets for start and end edges
of a column for out of flow child.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::gridAreaPositionForOutOfFlowChild const):

Modified Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-alignment-positioned-items-with-margin-border-padding-016-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderGrid.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-alignment-positioned-items-with-margin-border-padding-016-expected.txt (282339 => 282340)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-alignment-positioned-items-with-margin-border-padding-016-expected.txt	2021-09-13 18:06:30 UTC (rev 282339)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-alignment-positioned-items-with-margin-border-padding-016-expected.txt	2021-09-13 18:15:52 UTC (rev 282340)
@@ -23,14 +23,7 @@
 XX XXX
 
 PASS .grid 1
-FAIL .grid 2 assert_equals:
-
-  X XX X
-  XX XX XXX XXX XXX
-  X XX X
-  XX XX XX XXX
-
-offsetLeft expected 377 but got 375
+PASS .grid 2
 PASS .grid 3
 PASS .grid 4
 


Modified: trunk/Source/WebCore/ChangeLog (282339 => 282340)

--- trunk/Source/WebCore/ChangeLog	2021-09-13 18:06:30 UTC (rev 282339)
+++ trunk/Source/WebCore/ChangeLog	2021-09-13 18:15:52 UTC (rev 282340)
@@ -1,3 +1,16 @@
+2021-09-13  Ziran Sun  
+
+[css-grid] calling correct offset function for RTL for out of flow child
+https://bugs.webkit.org/show_bug.cgi?id=229968
+
+Reviewed by Javier Fernandez.
+
+Handle RTL case to return the correct border values when calculating offsets for start and end edges
+of a column for out of flow child.
+
+* rendering/RenderGrid.cpp:
+(WebCore::RenderGrid::gridAreaPositionForOutOfFlowChild const):
+
 2021-09-13  Antti Koivisto  
 
 Expose TextBoxSelectableRange in the iterator


Modified: trunk/Source/WebCore/rendering/RenderGrid.cpp (282339 => 282340)

--- trunk/Source/WebCore/rendering/RenderGrid.cpp	2021-09-13 18:06:30 UTC (rev 282339)
+++ trunk/Source/WebCore/rendering/RenderGrid.cpp	2021-09-13 18:15:52 UTC (rev 282340)
@@ -1578,7 +1578,7 @@
 LayoutUnit end;
 auto& positions = isRowAxis ? m_columnPositions : m_rowPositions;
 auto& outOfFlowItemLine = isRowAxis ? m_outOfFlowItemColumn : m_outOfFlowItemRow;
-LayoutUnit borderEdge = isRowAxis ? borderLogicalLeft() : borderBefore();
+LayoutUnit borderEdge = isRowAxis ? (style().isLeftToRightDirection() ? borderLogicalLeft() : borderLogicalRight()) : borderBefore();
 if (startIsAuto)
 start = resolveAutoStartGridPosition(direction) + borderEdge;
 else {
@@ -1626,7 +1626,7 @@
 LayoutUnit trackBreadth = GridLayoutFunctions::overridingContainingBlockContentSizeForChild(child, direction).value();
 bool isRowAxis = direction == ForColumns;
 auto& outOfFlowItemLine = isRowAxis ? m_outOfFlowItemColumn : m_outOfFlowItemRow;
-start = isRowAxis ? borderLogicalLeft() : borderBefore();
+start = isRowAxis ? (style().isLeftToRightDirection() ? borderLogicalLeft() : borderLogicalRight()) : borderBefore();
 if (auto line = outOfFlowItemLine.get()) {
 auto& positions = isRowAxis ? m_columnPositions : m_rowPositions;
 start = positions[line.value()];






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


[webkit-changes] [282008] trunk

2021-09-03 Thread zsun
Title: [282008] trunk








Revision 282008
Author z...@igalia.com
Date 2021-09-03 10:30:39 -0700 (Fri, 03 Sep 2021)


Log Message
REGRESSION(r280078): broke fast/images/exif-orientation-composited.html on windows
https://bugs.webkit.org/show_bug.cgi?id=228325

Reviewed by Javier Fernandez.

Source/WebCore:

The is to fix regression caused by r280078. After updating overridingLogicalWidth,
there is no need to reset the logicalWidth.

No test needed. Test fast/images/exif-orientation-composited.html is enough to cover
the affected code.

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

LayoutTests:

* platform/win/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/win/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderGrid.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (282007 => 282008)

--- trunk/LayoutTests/ChangeLog	2021-09-03 17:27:54 UTC (rev 282007)
+++ trunk/LayoutTests/ChangeLog	2021-09-03 17:30:39 UTC (rev 282008)
@@ -1,3 +1,12 @@
+2021-09-03  Ziran Sun  
+
+REGRESSION(r280078): broke fast/images/exif-orientation-composited.html on windows
+https://bugs.webkit.org/show_bug.cgi?id=228325
+
+Reviewed by Javier Fernandez.
+
+* platform/win/TestExpectations:
+
 2021-09-03  Ayumi Kojima  
 
 [ iOS EWS ] imported/w3c/web-platform-tests/content-security-policy/worker-src/service-* tests are flaky failing.


Modified: trunk/LayoutTests/platform/win/TestExpectations (282007 => 282008)

--- trunk/LayoutTests/platform/win/TestExpectations	2021-09-03 17:27:54 UTC (rev 282007)
+++ trunk/LayoutTests/platform/win/TestExpectations	2021-09-03 17:30:39 UTC (rev 282008)
@@ -3786,8 +3786,6 @@
 
 webkit.org/b/177216 fast/images/animated-image-mp4.html [ Skip ]
 
-webkit.org/b/228325 fast/images/exif-orientation-composited.html [ Pass ImageOnlyFailure ]
-
 webkit.org/b/177234 http/wpt/resource-timing/rt-cors.html [ Skip ]
 webkit.org/b/177234 http/wpt/resource-timing/rt-cors.worker.html [ Skip ]
 


Modified: trunk/Source/WebCore/ChangeLog (282007 => 282008)

--- trunk/Source/WebCore/ChangeLog	2021-09-03 17:27:54 UTC (rev 282007)
+++ trunk/Source/WebCore/ChangeLog	2021-09-03 17:30:39 UTC (rev 282008)
@@ -1,3 +1,19 @@
+2021-09-03  Ziran Sun  
+
+REGRESSION(r280078): broke fast/images/exif-orientation-composited.html on windows
+https://bugs.webkit.org/show_bug.cgi?id=228325
+
+Reviewed by Javier Fernandez.
+
+The is to fix regression caused by r280078. After updating overridingLogicalWidth,
+there is no need to reset the logicalWidth.
+
+No test needed. Test fast/images/exif-orientation-composited.html is enough to cover
+the affected code.
+   
+* rendering/RenderGrid.cpp:
+(WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
+
 2021-09-03  Peng Liu  
 
 [iOS] Media playback continues after backgrounding Safari


Modified: trunk/Source/WebCore/rendering/RenderGrid.cpp (282007 => 282008)

--- trunk/Source/WebCore/rendering/RenderGrid.cpp	2021-09-03 17:27:54 UTC (rev 282007)
+++ trunk/Source/WebCore/rendering/RenderGrid.cpp	2021-09-03 17:30:39 UTC (rev 282008)
@@ -1177,10 +1177,8 @@
 LayoutUnit stretchedLogicalWidth = availableAlignmentSpaceForChildBeforeStretching(GridLayoutFunctions::overridingContainingBlockContentSizeForChild(child, childInlineDirection).value(), child);
 LayoutUnit desiredLogicalWidth = constrainLogicalWidthInFragmentByMinMax(stretchedLogicalWidth, contentWidth(), *this, nullptr);
 child.setOverridingLogicalWidth(desiredLogicalWidth);
-if (desiredLogicalWidth != child.logicalWidth()) {
-child.setLogicalWidth(0_lu);
+if (desiredLogicalWidth != child.logicalWidth())
 child.setNeedsLayout(MarkOnlyThis);
-}
 } 
 }
 






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


[webkit-changes] [280290] trunk

2021-07-26 Thread zsun
Title: [280290] trunk








Revision 280290
Author z...@igalia.com
Date 2021-07-26 00:42:45 -0700 (Mon, 26 Jul 2021)


Log Message
[css-grid] svg image as grid items should use the overriding logical width/height when defined to compute the logical height/width
https://bugs.webkit.org/show_bug.cgi?id=228105

Source/WebCore:

As discussed at https://github.com/w3c/csswg-drafts/issues/6286#issuecomment-866986544, degenerate
aspect ratios derived from SVG width/height attributes fall back to viewbox aspect ratio
(whether due to negative values or zero values).

When computing the logical height/width using an intrinsic aspect ratio, RenderReplaced uses the
overridingLogicalWidth/overridingLogicalHeight whenever defined as long as the flex or
grid item has an intrinsic size. For an SVG graphic though, it's common to have an intrinsic aspect
ratio but not to have an intrinsic width or height. For this special case, we still should use
overridingLogicalWidth/overridingLogicalHeight for logical height/width calculations.

Reviewed by Javier Fernandez.

* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeReplacedLogicalWidth const):
(WebCore::RenderReplaced::computeReplacedLogicalHeight const):

LayoutTests:

Reviewed by Javier Fernandez.

Update TestExpectations as 4 failed grid WPT tests are now passing.

* TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderReplaced.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (280289 => 280290)

--- trunk/LayoutTests/ChangeLog	2021-07-25 22:32:20 UTC (rev 280289)
+++ trunk/LayoutTests/ChangeLog	2021-07-26 07:42:45 UTC (rev 280290)
@@ -1,3 +1,14 @@
+2021-07-26  Ziran Sun  
+
+[css-grid] svg image as grid items should use the overriding logical width/height when defined to compute the logical height/width
+https://bugs.webkit.org/show_bug.cgi?id=228105
+
+Reviewed by Javier Fernandez.
+
+Update TestExpectations as 4 failed grid WPT tests are now passing.
+ 
+* TestExpectations:
+
 2021-07-25  Alexey Shvayka  
 
 Partly implement Function.prototype.{caller,arguments} reflection proposal


Modified: trunk/LayoutTests/TestExpectations (280289 => 280290)

--- trunk/LayoutTests/TestExpectations	2021-07-25 22:32:20 UTC (rev 280289)
+++ trunk/LayoutTests/TestExpectations	2021-07-26 07:42:45 UTC (rev 280290)
@@ -4273,10 +4273,6 @@
 webkit.org/b/209460 imported/w3c/web-platform-tests/css/css-grid/abspos/descendant-static-position-002.html [ ImageOnlyFailure ]
 webkit.org/b/209460 imported/w3c/web-platform-tests/css/css-grid/abspos/descendant-static-position-003.html [ ImageOnlyFailure ]
 webkit.org/b/212201 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-limits-001.html [ Skip ]
-webkit.org/b/227900 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-1.html [ ImageOnlyFailure ]
-webkit.org/b/227900 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-2.html [ ImageOnlyFailure ]
-webkit.org/b/227900 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-3.html [ ImageOnlyFailure ]
-webkit.org/b/227900 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-4.html [ ImageOnlyFailure ]
 webkit.org/b/212246 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-baseline-align-cycles-001.html [ ImageOnlyFailure ]
 webkit.org/b/212246 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-content-baseline-001.html [ ImageOnlyFailure ]
 webkit.org/b/212246 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-content-baseline-002.html [ ImageOnlyFailure ]


Modified: trunk/Source/WebCore/ChangeLog (280289 => 280290)

--- trunk/Source/WebCore/ChangeLog	2021-07-25 22:32:20 UTC (rev 280289)
+++ trunk/Source/WebCore/ChangeLog	2021-07-26 07:42:45 UTC (rev 280290)
@@ -1,3 +1,24 @@
+2021-07-26  Ziran Sun  
+
+[css-grid] svg image as grid items should use the overriding logical width/height when defined to compute the logical height/width
+https://bugs.webkit.org/show_bug.cgi?id=228105
+
+As discussed at https://github.com/w3c/csswg-drafts/issues/6286#issuecomment-866986544, degenerate
+aspect ratios derived from SVG width/height attributes fall back to viewbox aspect ratio 
+(whether due to negative values or zero values).
+
+When computing the logical height/width using an intrinsic aspect ratio, RenderReplaced uses the
+overridingLogicalWidth/overridingLogicalHeight whenever defined as long as the flex or
+grid item has an intrinsic size. For an SVG graphic though, it's common to have an intrinsic aspect
+ratio but not to have an intrinsic width or height. For this special case, we still should use
+overridingLogicalWidth/overridingLogicalHeight for logical height/width 

[webkit-changes] [280078] trunk

2021-07-20 Thread zsun
Title: [280078] trunk








Revision 280078
Author z...@igalia.com
Date 2021-07-20 04:26:28 -0700 (Tue, 20 Jul 2021)


Log Message
Images as grid items should use the overridingLogicalWidth when defined to compute the logical Height
https://bugs.webkit.org/show_bug.cgi?id=228022

Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

Update test expectations as the sub-tests are now passing.

* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-029-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-030-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-031-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-035-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-036-expected.txt:

Source/WebCore:

When computing the logical height using an intrinsic aspect ratio, RenderReplaced should use the
overridingLogicalWidth whenever defined just as how it does for flex items. This change is to
replace the use of intrinsic (non-stretched) logical width in current code with the overridingLogicalWidth.

The current code doesn't set overringLogicalWidth while the width changes while stretches along Row Axis.
This change adds the logic in.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeReplacedLogicalHeight const):

LayoutTests:

Update TestExpectations as 3 failed grid WPT tests are now passing.

* TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-029-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-030-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-031-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-035-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-036-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderGrid.cpp
trunk/Source/WebCore/rendering/RenderReplaced.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (280077 => 280078)

--- trunk/LayoutTests/ChangeLog	2021-07-20 11:08:00 UTC (rev 280077)
+++ trunk/LayoutTests/ChangeLog	2021-07-20 11:26:28 UTC (rev 280078)
@@ -1,3 +1,14 @@
+2021-07-20  Ziran Sun  
+
+Images as grid items should use the overridingLogicalWidth when defined to compute the logical Height
+https://bugs.webkit.org/show_bug.cgi?id=228022
+
+Reviewed by Javier Fernandez.
+
+Update TestExpectations as 3 failed grid WPT tests are now passing.
+
+* TestExpectations:
+
 2021-07-20  Rob Buis  
 
 Fix grid aspect-ratio tests


Modified: trunk/LayoutTests/TestExpectations (280077 => 280078)

--- trunk/LayoutTests/TestExpectations	2021-07-20 11:08:00 UTC (rev 280077)
+++ trunk/LayoutTests/TestExpectations	2021-07-20 11:26:28 UTC (rev 280078)
@@ -1443,9 +1443,6 @@
 imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-015.html [ Pass Failure ]
 webkit.org/b/216146 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-baseline-align-001.html [ ImageOnlyFailure ]
 webkit.org/b/216146 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-baseline-justify-001.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-002.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-007.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-008.html [ ImageOnlyFailure ]
 
 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-aspect-ratio-001.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-aspect-ratio-002.html [ ImageOnlyFailure ]


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (280077 => 280078)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-07-20 11:08:00 UTC (rev 280077)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-07-20 11:26:28 UTC (rev 280078)
@@ -1,3 +1,18 @@
+2021-07-20  Ziran Sun  
+
+Images as grid items should use the overridingLogicalWidth when defined to compute the logical Height
+https://bugs.webkit.org/show_bug.cgi?id=228022
+
+Reviewed by Javier Fernandez.
+
+Update test expectations as the sub-tests are now passing.
+
+* 

[webkit-changes] [280024] trunk

2021-07-19 Thread zsun
Title: [280024] trunk








Revision 280024
Author z...@igalia.com
Date 2021-07-19 07:25:38 -0700 (Mon, 19 Jul 2021)


Log Message
[css-grid] Images as grid items should use the overridingLogicalHeight when defined to compute the logical width
https://bugs.webkit.org/show_bug.cgi?id=227984

Reviewed by Javier Fernandez.
LayoutTests/imported/w3c:

* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-011-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-012-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-013-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-014-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-017-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-018-expected.txt:

Source/WebCore:

As discussed in https://github.com/w3c/csswg-drafts/issues/5713, for images as grid items, when
stretch alignment is only applied in one axis we should respect aspect-ratio on the other.

When computing the logical width using an intrinsic aspect ratio, RenderReplaced should use the
overridingLogicalHeight whenever defined just as how it does for flex items. This change is to
replace the use of intrinsic (non-stretched) logical height in current code with the overridingLogicalHeight.

This allows us to pass an additional of 9 grid WPT tests.

* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeReplacedLogicalWidth const):

LayoutTests:

9 grid WPT tests are now passing.

* TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-011-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-012-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-013-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-014-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-017-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-018-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderReplaced.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (280023 => 280024)

--- trunk/LayoutTests/ChangeLog	2021-07-19 13:55:23 UTC (rev 280023)
+++ trunk/LayoutTests/ChangeLog	2021-07-19 14:25:38 UTC (rev 280024)
@@ -1,5 +1,16 @@
 2021-07-19  Ziran Sun  
 
+[css-grid] Images as grid items should use the overridingLogicalHeight when defined to compute the logical width
+https://bugs.webkit.org/show_bug.cgi?id=227984
+
+Reviewed by Javier Fernandez.
+
+9 grid WPT tests are now passing.
+
+* TestExpectations:
+
+2021-07-19  Ziran Sun  
+
 [CSS-grid] Ignore the aspect-ratio of a replaced element if stretch alignments are applied to both axes
 https://bugs.webkit.org/show_bug.cgi?id=227573
 


Modified: trunk/LayoutTests/TestExpectations (280023 => 280024)

--- trunk/LayoutTests/TestExpectations	2021-07-19 13:55:23 UTC (rev 280023)
+++ trunk/LayoutTests/TestExpectations	2021-07-19 14:25:38 UTC (rev 280024)
@@ -1432,14 +1432,10 @@
 imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-015.html [ Pass Failure ]
 webkit.org/b/216146 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-baseline-align-001.html [ ImageOnlyFailure ]
 webkit.org/b/216146 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-baseline-justify-001.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-001.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-002.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-006.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-007.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-008.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-009.html [ ImageOnlyFailure ]
 
-
 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-aspect-ratio-001.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-aspect-ratio-002.html [ ImageOnlyFailure ]
 

[webkit-changes] [280023] trunk

2021-07-19 Thread zsun
Title: [280023] trunk








Revision 280023
Author z...@igalia.com
Date 2021-07-19 06:55:23 -0700 (Mon, 19 Jul 2021)


Log Message
[css-grid] Use correct block-size to resolve min-content
https://bugs.webkit.org/show_bug.cgi?id=227167

Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

The following test is passing -

* web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-001.html:

Source/WebCore:

When the min/max depends on block-size, We need to make sure that min/max widths are set dirty for
replaced element when block-size changes so that the correct block-size is used to get min/max widths.

Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-001.html

* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::layout):

Modified Paths

trunk/LayoutTests/TestExpectations
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/platform/ios-wk2/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderReplaced.cpp




Diff

Modified: trunk/LayoutTests/TestExpectations (280022 => 280023)

--- trunk/LayoutTests/TestExpectations	2021-07-19 08:39:01 UTC (rev 280022)
+++ trunk/LayoutTests/TestExpectations	2021-07-19 13:55:23 UTC (rev 280023)
@@ -1447,7 +1447,6 @@
 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-repeat-max-width-001.html [ ImageOnlyFailure ]
 
 imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-004.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-001.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-003.html [ ImageOnlyFailure ]
 
 imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-009.html [ ImageOnlyFailure ]


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (280022 => 280023)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-07-19 08:39:01 UTC (rev 280022)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-07-19 13:55:23 UTC (rev 280023)
@@ -1,3 +1,14 @@
+2021-07-19  Ziran Sun  
+
+[css-grid] Use correct block-size to resolve min-content
+https://bugs.webkit.org/show_bug.cgi?id=227167
+
+Reviewed by Javier Fernandez.
+
+The following test is passing -
+
+* web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-001.html:
+
 2021-07-15  Chris Dumez  
 
 Implement 'SubmitEvent' interface


Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (280022 => 280023)

--- trunk/LayoutTests/platform/ios-wk2/TestExpectations	2021-07-19 08:39:01 UTC (rev 280022)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations	2021-07-19 13:55:23 UTC (rev 280023)
@@ -1864,6 +1864,7 @@
 webkit.org/b/227283 imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-001.html [ ImageOnlyFailure ]
 webkit.org/b/227283 imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-002.html [ ImageOnlyFailure ]
 webkit.org/b/227283 imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-003.html [ ImageOnlyFailure ]
+webkit.org/b/227283 imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-001.html [ ImageOnlyFailure ]
 webkit.org/b/227283 imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-002.html [ ImageOnlyFailure ]
 webkit.org/b/227283 imported/w3c/web-platform-tests/css/css-grid/grid-items/replaced-element-011.html [ ImageOnlyFailure ]
 webkit.org/b/227283 imported/w3c/web-platform-tests/css/css-grid/grid-items/replaced-element-012.html [ ImageOnlyFailure ]


Modified: trunk/Source/WebCore/ChangeLog (280022 => 280023)

--- trunk/Source/WebCore/ChangeLog	2021-07-19 08:39:01 UTC (rev 280022)
+++ trunk/Source/WebCore/ChangeLog	2021-07-19 13:55:23 UTC (rev 280023)
@@ -1,5 +1,20 @@
 2021-07-19  Ziran Sun  
 
+[css-grid] Use correct block-size to resolve min-content
+https://bugs.webkit.org/show_bug.cgi?id=227167
+
+Reviewed by Javier Fernandez.
+
+When the min/max depends on block-size, We need to make sure that min/max widths are set dirty for
+replaced element when block-size changes so that the correct block-size is used to get min/max widths.
+
+Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-001.html
+
+* rendering/RenderReplaced.cpp:
+(WebCore::RenderReplaced::layout):
+
+2021-07-19  Ziran Sun  
+
 [CSS-grid] Ignore the aspect-ratio of a replaced element if stretch alignments are applied to both axes
 https://bugs.webkit.org/show_bug.cgi?id=227573
 


Modified: trunk/Source/WebCore/rendering/RenderReplaced.cpp (280022 => 280023)

--- trunk/Source/WebCore/rendering/RenderReplaced.cpp	2021-07-19 08:39:01 UTC (rev 280022)
+++ trunk/Source/WebCore/rendering/RenderReplaced.cpp	2021-07-19 13:55:23 UTC (rev 280023)
@@ 

[webkit-changes] [280022] trunk

2021-07-19 Thread zsun
Title: [280022] trunk








Revision 280022
Author z...@igalia.com
Date 2021-07-19 01:39:01 -0700 (Mon, 19 Jul 2021)


Log Message
[CSS-grid] Ignore the aspect-ratio of a replaced element if stretch alignments are applied to both axes
https://bugs.webkit.org/show_bug.cgi?id=227573

Reviewed by Javier Fernandez.

Source/WebCore:

As discussed in https://github.com/w3c/csswg-drafts/issues/5713, for the replaced element as a grid item,
when both axes have stretch alignments applied and there is no auto margin(s) presented, the aspect ratio
should be ignored if there is any.

Part of this patch is an import of Chromium CL at
https://chromium-review.googlesource.com/c/chromium/src/+/2651651

* rendering/RenderBox.cpp:
(WebCore::RenderBox::hasStretchedLogicalHeight const):
(WebCore::RenderBox::shouldComputeLogicalWidthFromAspectRatio const):
* rendering/RenderBox.h:

LayoutTests:

Two grid WPT tests are now passing.

* TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderBox.cpp
trunk/Source/WebCore/rendering/RenderBox.h




Diff

Modified: trunk/LayoutTests/ChangeLog (280021 => 280022)

--- trunk/LayoutTests/ChangeLog	2021-07-18 22:59:28 UTC (rev 280021)
+++ trunk/LayoutTests/ChangeLog	2021-07-19 08:39:01 UTC (rev 280022)
@@ -1,3 +1,14 @@
+2021-07-19  Ziran Sun  
+
+[CSS-grid] Ignore the aspect-ratio of a replaced element if stretch alignments are applied to both axes
+https://bugs.webkit.org/show_bug.cgi?id=227573
+
+Reviewed by Javier Fernandez.
+
+Two grid WPT tests are now passing.
+
+* TestExpectations:
+
 2021-07-16  Simon Fraser  
 
 getBoundingClientRect() returns the incorrect rectangle on elements whose parent element is set -webkit-column-count


Modified: trunk/LayoutTests/TestExpectations (280021 => 280022)

--- trunk/LayoutTests/TestExpectations	2021-07-18 22:59:28 UTC (rev 280021)
+++ trunk/LayoutTests/TestExpectations	2021-07-19 08:39:01 UTC (rev 280022)
@@ -1434,8 +1434,6 @@
 webkit.org/b/216146 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-baseline-justify-001.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-001.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-002.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-004.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-005.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-006.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-007.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-008.html [ ImageOnlyFailure ]


Modified: trunk/Source/WebCore/ChangeLog (280021 => 280022)

--- trunk/Source/WebCore/ChangeLog	2021-07-18 22:59:28 UTC (rev 280021)
+++ trunk/Source/WebCore/ChangeLog	2021-07-19 08:39:01 UTC (rev 280022)
@@ -1,3 +1,22 @@
+2021-07-19  Ziran Sun  
+
+[CSS-grid] Ignore the aspect-ratio of a replaced element if stretch alignments are applied to both axes
+https://bugs.webkit.org/show_bug.cgi?id=227573
+
+Reviewed by Javier Fernandez.
+
+As discussed in https://github.com/w3c/csswg-drafts/issues/5713, for the replaced element as a grid item,
+when both axes have stretch alignments applied and there is no auto margin(s) presented, the aspect ratio
+should be ignored if there is any. 
+
+Part of this patch is an import of Chromium CL at
+https://chromium-review.googlesource.com/c/chromium/src/+/2651651
+
+* rendering/RenderBox.cpp:
+(WebCore::RenderBox::hasStretchedLogicalHeight const):
+(WebCore::RenderBox::shouldComputeLogicalWidthFromAspectRatio const):
+* rendering/RenderBox.h:
+
 2021-07-18  Sam Weinig  
 
 Fix canvas overflow checking to use CheckedArithmatic rather than adhoc floating point mechanism


Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (280021 => 280022)

--- trunk/Source/WebCore/rendering/RenderBox.cpp	2021-07-18 22:59:28 UTC (rev 280021)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2021-07-19 08:39:01 UTC (rev 280022)
@@ -2760,6 +2760,23 @@
 }
 
 // FIXME: Can/Should we move this inside specific layout classes (flex. grid)? Can we refactor columnFlexItemHasStretchAlignment logic?
+bool RenderBox::hasStretchedLogicalHeight() const
+{
+auto& style = this->style();
+if (!style.logicalHeight().isAuto() || style.marginBefore().isAuto() || style.marginAfter().isAuto())
+return false;
+RenderBlock* containingBlock = this->containingBlock();
+if 

[webkit-changes] [279939] trunk/LayoutTests

2021-07-15 Thread zsun
Title: [279939] trunk/LayoutTests








Revision 279939
Author z...@igalia.com
Date 2021-07-15 01:42:07 -0700 (Thu, 15 Jul 2021)


Log Message
Resync web-platform-tests/css/css-grid tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=227901

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-align-self-vertWM-003-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-align-self-vertWM-004-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-justify-self-vertWM-003-expected.html:
* web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-justify-self-vertWM-004-expected.html:
* web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-1-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-4-expected.html.
* web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-1.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-4.html.
* web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-2-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-5-expected.html.
* web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-2.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-10.html.
* web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-3-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-6-expected.html.
* web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-3.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-6.html.
* web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-4-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-7-expected.html.
* web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-4.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-7.html.
* web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-10-expected.html: Removed.
* web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-4-expected.html:
* web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-4.html:
* web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-5-expected.html:
* web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-5.html:
* web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-6-expected.html:
* web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-6.html:
* web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-8-expected.html: Removed.
* web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-8.html: Removed.
* web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-9-expected.html: Removed.
* web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-9.html: Removed.
* web-platform-tests/css/css-grid/alignment/w3c-import.log:
* web-platform-tests/css/css-grid/grid-item-percentage-quirk-001-expected.html: Removed.
* web-platform-tests/css/css-grid/grid-item-percentage-quirk-002-expected.html: Removed.
* web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-002-expected.xht: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-002.tentative-expected.xht.
* web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-002.tentative.html.
* web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-003-expected.xht: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-003.tentative-expected.xht.
* web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-003.tentative.html.
* web-platform-tests/css/css-grid/grid-items/grid-items-contribution-negative-margins-expected.xht: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-002.tentative-expected.xht.
* web-platform-tests/css/css-grid/grid-items/grid-items-contribution-negative-margins.html: Added.
* 

[webkit-changes] [279280] trunk/Tools

2021-06-25 Thread zsun
Title: [279280] trunk/Tools








Revision 279280
Author z...@igalia.com
Date 2021-06-25 07:51:12 -0700 (Fri, 25 Jun 2021)


Log Message
Add myself to contributor list
https://bugs.webkit.org/show_bug.cgi?id=227400

Reviewed by Sergio Villar Senin.

* Scripts/webkitpy/common/config/contributors.json:

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/common/config/contributors.json




Diff

Modified: trunk/Tools/ChangeLog (279279 => 279280)

--- trunk/Tools/ChangeLog	2021-06-25 14:08:08 UTC (rev 279279)
+++ trunk/Tools/ChangeLog	2021-06-25 14:51:12 UTC (rev 279280)
@@ -1,3 +1,12 @@
+2021-06-25  Ziran Sun  
+
+Add myself to contributor list
+https://bugs.webkit.org/show_bug.cgi?id=227400
+
+Reviewed by Sergio Villar Senin.
+
+* Scripts/webkitpy/common/config/contributors.json:
+
 2021-06-24  Kate Cheney  
 
 WKWebView loadSimulatedRequest does not set attribution value for url requests within html content


Modified: trunk/Tools/Scripts/webkitpy/common/config/contributors.json (279279 => 279280)

--- trunk/Tools/Scripts/webkitpy/common/config/contributors.json	2021-06-25 14:08:08 UTC (rev 279279)
+++ trunk/Tools/Scripts/webkitpy/common/config/contributors.json	2021-06-25 14:51:12 UTC (rev 279280)
@@ -6097,6 +6097,15 @@
   ],
   "status" : "committer"
},
+   "Ziran Sun" : {
+  "emails" : [
+ "z...@igalia.com"
+  ],
+  "nicks" : [
+ "zsun"
+  ],
+  "status" : "committer"
+   },
"Zoltan Arvai" : {
   "emails" : [
  "zar...@inf.u-szeged.hu"






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


[webkit-changes] [279278] trunk

2021-06-25 Thread zsun
Title: [279278] trunk








Revision 279278
Author z...@igalia.com
Date 2021-06-25 06:58:25 -0700 (Fri, 25 Jun 2021)


Log Message
[css-grid] Consider container's writing mode to get grid item's margin
https://bugs.webkit.org/show_bug.cgi?id=226877

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Update test results.

* web-platform-tests/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-008-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-011-expected.txt:

Source/WebCore:

When computing the logical offset of a non-static absolute positioned grid item, we need
to pass its container's style in order to resolve the child margin correctly, especially
for the case when the item has flipped block writing mode (vertical-rl).

This change is an import of the Chromium change at
https://chromium-review.googlesource.com/c/chromium/src/+/2577365

* rendering/RenderBox.h:
(WebCore::RenderBox::marginLogicalLeft const):
(WebCore::RenderBox::marginLogicalRight const):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::logicalOffsetForOutOfFlowChild const):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-008-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-011-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderBox.h
trunk/Source/WebCore/rendering/RenderGrid.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (279277 => 279278)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-06-25 13:49:07 UTC (rev 279277)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-06-25 13:58:25 UTC (rev 279278)
@@ -1,5 +1,17 @@
 2021-06-25  Ziran Sun  
 
+[css-grid] Consider container's writing mode to get grid item's margin
+https://bugs.webkit.org/show_bug.cgi?id=226877
+
+Reviewed by Sergio Villar Senin.
+
+Update test results.
+  
+* web-platform-tests/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-008-expected.txt:
+* web-platform-tests/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-011-expected.txt:
+
+2021-06-25  Ziran Sun  
+
 Resync web-platform-tests/css/css-grid tests from upstream
 https://bugs.webkit.org/show_bug.cgi?id=223593
 


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-008-expected.txt (279277 => 279278)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-008-expected.txt	2021-06-25 13:49:07 UTC (rev 279277)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-008-expected.txt	2021-06-25 13:58:25 UTC (rev 279278)
@@ -22,29 +22,8 @@
 X
 XX XXX
 
-FAIL .grid 1 assert_equals:
-
-  X XX X
-  XX XX XXX XXX XXX
-  X XX X
-  XX XX XX XXX
-
-offsetLeft expected 200 but got 210
-FAIL .grid 2 assert_equals:
-
-  X XX X
-  XX XX XXX XXX XXX
-  X XX X
-  XX XX XX XXX
-
-offsetLeft expected 100 but got 110
+PASS .grid 1
+PASS .grid 2
 PASS .grid 3
-FAIL .grid 4 assert_equals:
-
-  X XX X
-  XX XX XXX XXX XXX
-  X XX X
-  XX XX XX XXX
-
-offsetLeft expected 125 but got 135
+PASS .grid 4
 


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-011-expected.txt (279277 => 279278)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-011-expected.txt	2021-06-25 13:49:07 UTC (rev 279277)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-011-expected.txt	2021-06-25 13:58:25 UTC (rev 279278)
@@ -22,29 +22,8 @@
 X
 XX XXX
 
-FAIL .grid 1 assert_equals:
-
-  X XX X
-  XX XX XXX XXX XXX
-  X XX X
-  XX XX XX XXX
-
-offsetLeft expected 190 but got 194
-FAIL .grid 2 assert_equals:
-
-  X XX X
-  XX XX XXX XXX XXX
-  X XX X
-  XX XX XX XXX
-
-offsetLeft expected 90 but got 94
+PASS .grid 1
+PASS .grid 2
 PASS .grid 3
-FAIL .grid 4 assert_equals:
-
-  X XX X
-  XX XX XXX XXX XXX
-  X XX X
-  XX XX XX XXX
-
-offsetLeft expected 113 but got 117
+PASS .grid 4
 


Modified: trunk/Source/WebCore/ChangeLog (279277 => 279278)

--- trunk/Source/WebCore/ChangeLog	2021-06-25 13:49:07 UTC (rev 279277)
+++ trunk/Source/WebCore/ChangeLog	2021-06-25 13:58:25 UTC (rev 279278)
@@ -1,3 +1,23 @@
+2021-06-25  Ziran Sun  
+
+[css-grid] Consider container's writing mode to get grid item's margin
+https://bugs.webkit.org/show_bug.cgi?id=226877
+
+Reviewed by Sergio Villar Senin.
+
+When computing the logical