Bug 189582

Summary: Safari incorrectly accepts "end safe" and incorrectly serializes "safe end" as "end safe" on various properties
Product: WebKit Reporter: Eric Willigers <ericwilligers>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: jfernandez, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: FromImplementor, InRadar
Version: Safari 11   
Hardware: Unspecified   
OS: Unspecified   

Description Eric Willigers 2018-09-13 04:51:15 PDT
The properties
align-content, align-items, align-self, justify-content, justify-items, justify-self
should accept "safe end" i.e. <overflow-position> <content-position> or <overflow-position> <self-position>
but not "end safe" i.e. <content-position> <overflow-position> or <self-position> <overflow-position>

Blink and Firefox correctly reject "safe end".
However, Edge and Safari incorrectly accept "end safe" and incorrectly serialize "safe end" as "end safe".
http://jsfiddle.net/ericwilligers/cthjpbv0/

https://drafts.csswg.org/css-align-3/#property-index
Comment 1 Javier Fernandez 2018-09-17 02:09:31 PDT
I can take a look at this issue, if nobody is currently working on it.
Comment 2 Javier Fernandez 2018-09-17 02:54:44 PDT
I cannot reproduce the issue in my current trunk (r233461). 

The commit landed in r227432 should precisely implement the expected behavior, so that <overflow-position> is parsed as invalid if it doesn't precede a either a <content-position> or <self-position> keyword.

As a matter of fact, the mentioned patch provides tests to verify that "start safe" and "end unsafe" are parsed as invalid:

https://trac.webkit.org/browser/webkit/trunk/LayoutTests/css3/parse-align-self.html#L227

Maybe the patch in r227432 has not been merged into the Safari version the issue was reported for ?
Comment 3 Eric Willigers 2018-10-17 06:27:01 PDT
> I cannot reproduce the issue in my current trunk (r233461). 

I was testing with Safari 11.1 (using browserstack.com)

I confirm this bug no longer occurs in Safari 12 (which browserstack.com now has)
Comment 4 Radar WebKit Bug Importer 2018-10-17 06:27:30 PDT
<rdar://problem/45336944>