WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
223889
Some WPT are failing because of colors being in the wrong format
https://bugs.webkit.org/show_bug.cgi?id=223889
Summary
Some WPT are failing because of colors being in the wrong format
Tim Nguyen (:ntim)
Reported
2021-03-29 11:36:48 PDT
Example:
https://webkit-search.igalia.com/webkit/source/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub-expected.txt
Attachments
Minimal test case
(913 bytes, text/html)
2021-03-29 11:47 PDT
,
Sam Weinig
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2021-03-29 11:47:15 PDT
Created
attachment 424555
[details]
Minimal test case
Sam Weinig
Comment 2
2021-03-29 11:48:48 PDT
Looks like something (likely CSSGradientValue) is not resolving color identifiers down to Colors before serializing.
Sam Weinig
Comment 3
2021-03-29 13:19:28 PDT
I haven't dropped into the debugger yet, but I am pretty sure this happening in ComputedStyleExtractor::valueForPropertyInStyle(): case CSSPropertyBackgroundImage: case CSSPropertyWebkitMaskImage: { auto& layers = propertyID == CSSPropertyWebkitMaskImage ? style.maskLayers() : style.backgroundLayers(); if (!layers.next()) { if (layers.image()) return layers.image()->cssValue(); return cssValuePool.createIdentifierValue(CSSValueNone); } auto list = CSSValueList::createCommaSeparated(); for (auto* currLayer = &layers; currLayer; currLayer = currLayer->next()) { if (currLayer->image()) list->append(currLayer->image()->cssValue()); else list->append(cssValuePool.createIdentifierValue(CSSValueNone)); } return list; } When the `layers.image()->cssValue()` call happens, the `image()`, which is of type CSSGradientValue, has not had its color styles resolved. You can see in the lines above it what a call with color resolving looks like: case CSSPropertyBackgroundColor: return m_allowVisitedStyle ? cssValuePool.createColorValue(style.visitedDependentColor(CSSPropertyBackgroundColor)) : currentColorOrValidColor(&style, style.backgroundColor()); So, somehow, we need to resolve those colors.
Sam Weinig
Comment 4
2021-03-29 13:19:41 PDT
Antti, any ideas on a good pattern for this?
Radar WebKit Bug Importer
Comment 5
2021-04-05 11:37:33 PDT
<
rdar://problem/76226756
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug