[Webkit-unassigned] [Bug 248346] New: -webkit-mask-box-image-slice:initial is not the initial value
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Nov 25 09:04:19 PST 2022
https://bugs.webkit.org/show_bug.cgi?id=248346
Bug ID: 248346
Summary: -webkit-mask-box-image-slice:initial is not the
initial value
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
Assignee: webkit-unassigned at lists.webkit.org
Reporter: obrufau at igalia.com
Blocks: 248325
Created attachment 463732
--> https://bugs.webkit.org/attachment.cgi?id=463732&action=review
testcase
If no -webkit-mask-box-image-slice is provided, then https://searchfox.org/wubkat/rev/70230d10f272f17151f1e77d496553716b449cea/Source/WebCore/rendering/style/NinePieceImage.h uses
data.imageSlices = LengthBox(0);
However, if you specify -webkit-mask-box-image-slice:initial, then https://searchfox.org/wubkat/rev/70230d10f272f17151f1e77d496553716b449cea/Source/WebCore/style/StyleBuilderCustom.h#536
image.setImageSlices(LengthBox());
These are different:
- LengthBox() has lengths of LengthType::Auto and in NinePieceImage::computeSlices they will behave like Length(100, LengthType::Percent).
- LengthBox(0) has Length(0, LengthType::Fixed).
Using LengthBox() seems clearly wrong, I think there are 2 possibilities:
- Switch both places to using LengthBox(0).
This will match the current behavior when no -webkit-mask-box-image-slice is provided.
This will obey https://www.w3.org/TR/2014/WD-css-masking-1-20140213/#the-mask-box-slice and https://drafts.fxtf.org/css-masking-1/#the-mask-border-slice
- Switch both places to using LengthBox(Length(100, LengthType::Percent), Length(100, LengthType::Percent), Length(100, LengthType::Percent), Length(100, LengthType::Percent))
This will match the current behavior when using -webkit-mask-box-image-slice:initial
This will make it consistent with border-image-slice
Referenced Bugs:
https://bugs.webkit.org/show_bug.cgi?id=248325
[Bug 248325] No need to check for auto lengths or calculated values in valueForImageSliceSide
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221125/18a5a53b/attachment.htm>
More information about the webkit-unassigned
mailing list