Bug 244657 - border-image-* returns the initial keyword instead of the initial value when setting border-image shorthand
Summary: border-image-* returns the initial keyword instead of the initial value when ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Darin Adler
URL: http://wpt.live/css/css-backgrounds/p...
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2022-08-31 21:57 PDT by Karl Dubost
Modified: 2022-11-29 08:12 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Dubost 2022-08-31 21:57:35 PDT
Enter:

data:text/html,<div%20style="border-image:%20initial">

Then 

document.getElementsByTagName('div')[0].style.borderImageOutset
returns initial instead of 0

and so on the other properties.

document.getElementsByTagName('div')[0].style.borderImageRepeat
returns initial instead of stretch

etc.

see the tests in http://wpt.live/css/css-backgrounds/parsing/border-image-shorthand.sub.html

and 

https://searchfox.org/wubkat/rev/482480f60b1f8c26dfe99b670a5fe677abb0fcd8/Source/WebCore/css/parser/CSSPropertyParser.cpp#5645-5677

https://searchfox.org/wubkat/search?q=symbol:_ZN7WebCore12CSSValuePool26createImplicitInitialValueEv&redirect=false
Comment 1 Radar WebKit Bug Importer 2022-08-31 21:57:47 PDT
<rdar://problem/99420050>
Comment 2 Darin Adler 2022-11-13 22:44:06 PST
All uses of createImplicitInitialValue have this problem.
Comment 3 Darin Adler 2022-11-15 08:44:39 PST
I started working on this and I am sort of falling down a rabbit hole, since there is so much here that can be improved.
Comment 4 Darin Adler 2022-11-18 14:33:11 PST
Pull request: https://github.com/WebKit/WebKit/pull/6652
Comment 5 Darin Adler 2022-11-18 14:33:50 PST
Scaled back my ambition in this particular bug to just the two border-image shorthands, rather than all the other uses of createImplicitInitialValue, which likely each create a similar problem.
Comment 6 EWS 2022-11-29 08:12:38 PST
Committed 257119@main (c0c6ad146d33): <https://commits.webkit.org/257119@main>

Reviewed commits have been landed. Closing PR #6652 and removing active labels.