Bug 228160

Summary: REGRESSION(r279987): [GTK][WPE] It caused 2 new test failures
Product: WebKit Reporter: Carlos Alberto Lopez Perez <clopez>
Component: WebKitGTKAssignee: Alice Mikhaylenko <alicem>
Status: RESOLVED FIXED    
Severity: Normal CC: alicem, bugs-noreply, changseok, esprehn+autocc, ews-watchlist, glenn, kondapallykalyan, mcatanzaro, pdr
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=208204
https://bugs.webkit.org/show_bug.cgi?id=214455
Attachments:
Description Flags
Patch ews-feeder: commit-queue-

Description Carlos Alberto Lopez Perez 2021-07-21 12:43:59 PDT
Commit r279987 caused 7 new unexpected failures on GTK and WPE ports:

Regressions: Unexpected image-only failures (7)
  fast/selectors/input-with-selection-pseudo-element.html [ ImageOnlyFailure ]
  imported/blink/fast/table/whitespace-between-elements-with-table-cell-display-3.html [ ImageOnlyFailure ]
  imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-change-checkbox.html [ ImageOnlyFailure ]
  imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-alpha.html [ ImageOnlyFailure ]
  imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-opaque.html [ ImageOnlyFailure ]
  imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-visited-link-initial.html [ ImageOnlyFailure ]
  imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/propagate-text-decoration.html [ ImageOnlyFailure ]

Looking at the diffs seems that there is some difference on the rounding of the corners of some boxes in some cases and also differences on the color of the text or background in other cases

Check here the results:
 - https://people.igalia.com/clopez/wkbug/208204/layout-test-results/results.html
Comment 1 Alice Mikhaylenko 2021-07-21 13:15:41 PDT
`imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/*` ones - I see we have a Pass override for glib and otherwise it's expected to fail. Which is... interesting, but I suppose we should match Safari here.

The rounding ones - I need to check again if there's a way to only do the rounding with non-`none` appearance. Makes sense, that seems like an actual regression.
Comment 2 Carlos Alberto Lopez Perez 2021-07-21 13:18:50 PDT
An update:

The 5 WPT tests for css-color-adjust (imported WPT tests) tests fail also on the Mac port, and they started to fail on GTK/WPE after enabling this CSS property, so it seems there is a pre-exist bug somewhere on the common code for this (not related with r279987 )

The other 2 failures seem new failures that are not reported on the Mac port:

  - fast/selectors/input-with-selection-pseudo-element.html [ ImageOnlyFailure ]
  - imported/blink/fast/table/whitespace-between-elements-with-table-cell-display-3.html [ ImageOnlyFailure ]

Which are the ones related with some difference on the rounding of the corners of the boxes,
Comment 3 Carlos Alberto Lopez Perez 2021-07-21 13:19:35 PDT
(In reply to Carlos Alberto Lopez Perez from comment #2)
> An update:
> 
> The 5 WPT tests for css-color-adjust (imported WPT tests) tests fail also on
> the Mac port, and they started to fail on GTK/WPE after enabling this CSS
> property, so it seems there is a pre-exist bug somewhere on the common code
> for this (not related with r279987 )
> 

See bug 214455
Comment 4 Carlos Alberto Lopez Perez 2021-07-21 13:21:15 PDT
imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/propagate-text-decoration.html is also reported on the Mac port (no bug assigned), so I assume this was also a pre-existent failure not related with r279987
Comment 5 Carlos Alberto Lopez Perez 2021-07-21 13:35:38 PDT
Updated test expectations on r280159
Comment 6 Alice Mikhaylenko 2021-07-21 13:49:08 PDT
Mm, I think fixing the rounding would still make sense. Thanks for updating the tests!
Comment 7 Alice Mikhaylenko 2021-07-22 03:38:38 PDT
Found the reason for the rounding. https://bugs.webkit.org/show_bug.cgi?id=173572 calls adjustTextFieldStyle() even if the element is styled:

```
+        case TextFieldPart:
+            adjustTextFieldStyle(styleResolver, style, element);
+            FALLTHROUGH;
```

I wonder if that's still relevant or if it was only relevant before for RenderThemeGtk? Because then we could remove that for an easy fix.
Comment 8 Alice Mikhaylenko 2021-08-06 15:17:57 PDT
Created attachment 435095 [details]
Patch
Comment 9 Alice Mikhaylenko 2021-08-06 15:45:20 PDT
Comment on attachment 435095 [details]
Patch

Let's see if setting cq+ myself works.
Comment 10 EWS 2021-08-06 16:15:01 PDT
Committed r280742 (240328@main): <https://commits.webkit.org/240328@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 435095 [details].