Summary: | [WPT] infrastructure/assumptions/html-elements.html fails due to changes in style when all: initial is used | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sam Weinig <sam> | ||||||||||
Component: | CSS | Assignee: | Sam Weinig <sam> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | esprehn+autocc, ews-watchlist, glenn, gsnedders, gyuyoung.kim, joepeck, koivisto, macpherson, menard, simon.fraser, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Sam Weinig
2020-06-13 11:17:50 PDT
The two failing cases are: - Different value for stroke-color expected "rgb(0, 0, 0)" but got "rgba(0, 0, 0, 0)". - Different value for -webkit-mask-box-image-slice expected "0" but got "0 fill". For stroke-color, the first thing that pops out to me is that in CSSProperties.json, "stroke-color" is set to: "initial": "currentColor" but, RenderStyle::initialStrokeColor() is set to: static Color initialStrokeColor() { return Color::transparent; } Yeah, seems like a bug. The spec indicates 'transparent' is the correct value so I suppose CSSProperties.json is wrong here. (In reply to Antti Koivisto from comment #3) > Yeah, seems like a bug. The spec indicates 'transparent' is the correct > value so I suppose CSSProperties.json is wrong here. Ok. Cool, that's easy to fix. For -webkit-mask-box-image-slice, it was a bit harder to track down due to macros, but it looks like it gets the fill = false from ApplyPropertyBorderImageModifier::applyInitialValue() while NinePieceImage when initialized with Type::Mask (as it is in StyleRareNonInheritedData) gets initialized with fill = true. My guess is to match the one in NinePieceImage. Created attachment 401939 [details]
WIP
Created attachment 401966 [details]
Patch
Comment on attachment 401966 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=401966&action=review > Source/WebCore/css/CSSProperties.json:3734 > + "initial": "initialStrokeColor", I think calling RenderStyle::initialFoo is the default so just not specifying anything here should work too. > Source/WebCore/style/StyleBuilderCustom.h:543 > - image.setFill(false); > + image.setFill(type == BorderImage ? false : true); type != BorderImage Created attachment 402110 [details]
Patch
Committed r263156: <https://trac.webkit.org/changeset/263156> All reviewed patches have been landed. Closing bug and clearing flags on attachment 402110 [details]. *** Bug 187052 has been marked as a duplicate of this bug. *** |