Bug 256040 - Do not parse caption-side: left / right as valid CSS
Summary: Do not parse caption-side: left / right as valid CSS
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar, WPTImpact
Depends on:
Blocks:
 
Reported: 2023-04-27 07:33 PDT by Ahmad Saleem
Modified: 2023-05-19 09:50 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-04-27 07:33:34 PDT
Hi Team,

Currently we are failing following WPT test (two sub-tests) in STP168 & WebKit ToT:

Test Case View - https://wpt.fyi/results/css/css-tables/parsing/caption-side-invalid.html?label=master&label=experimental&aligned=&q=css-tables%2F

Test Case Link - http://wpt.live/css/css-tables/parsing/caption-side-invalid.html

Blink fixed it via following commit - https://chromium.googlesource.com/chromium/src.git/+/4af5b86049ac7e3b8fb3db9b5cb9383386dd7bbe

Just wanted to raise so we can track and fix it and it might be quick win.

Thanks!
Comment 1 Ahmad Saleem 2023-04-27 07:44:26 PDT
I tried to find for cases in 'CSSPropertyCaptionSide' but couldn't find except this:

https://searchfox.org/wubkat/source/Source/WebCore/css/parser/CSSPropertyParser.cpp#1139

and then this:

https://searchfox.org/wubkat/source/Source/WebCore/css/CSSProperties.json#3071

______

Let me try to remove 'left' and 'right' from .json file from above and see if it works.

Although, if we need to remove elsewhere as well, appreciate if someone else can guide. Thanks!
Comment 2 Ahmad Saleem 2023-04-27 08:22:53 PDT
(In reply to Ahmad Saleem from comment #1)
> I tried to find for cases in 'CSSPropertyCaptionSide' but couldn't find
> except this:
> 
> https://searchfox.org/wubkat/source/Source/WebCore/css/parser/
> CSSPropertyParser.cpp#1139
> 
> and then this:
> 
> https://searchfox.org/wubkat/source/Source/WebCore/css/CSSProperties.
> json#3071
> 
> ______
> 
> Let me try to remove 'left' and 'right' from .json file from above and see
> if it works.
> 
> Although, if we need to remove elsewhere as well, appreciate if someone else
> can guide. Thanks!

Removing just from CSSProperties.json makes us pass this bit.
Comment 4 Karl Dubost 2023-04-27 18:40:46 PDT
That said, I wonder about left and right because of the spec:

> These two values are added only for implementations that support left and right values for caption-side. The left and right values themselves are defined to be line-relative.https://w3c.github.io/csswg-drafts/css-logical/#caption-side


The two values being `inline-start` and `inline-end`.


> line-relative
> Interpreted relative to the orientation of the line box. The line-relative directions are line-left, line-right, line-over, and line-under.https://w3c.github.io/csswg-drafts/css-writing-modes-4/#line-relative
Comment 5 Radar WebKit Bug Importer 2023-05-04 07:34:19 PDT
<rdar://problem/108892083>
Comment 6 Ahmad Saleem 2023-05-05 04:31:07 PDT
(In reply to Ahmad Saleem from comment #2)
> (In reply to Ahmad Saleem from comment #1)
> > I tried to find for cases in 'CSSPropertyCaptionSide' but couldn't find
> > except this:
> > 
> > https://searchfox.org/wubkat/source/Source/WebCore/css/parser/
> > CSSPropertyParser.cpp#1139
> > 
> > and then this:
> > 
> > https://searchfox.org/wubkat/source/Source/WebCore/css/CSSProperties.
> > json#3071
> > 
> > ______
> > 
> > Let me try to remove 'left' and 'right' from .json file from above and see
> > if it works.
> > 
> > Although, if we need to remove elsewhere as well, appreciate if someone else
> > can guide. Thanks!
> 
> Removing just from CSSProperties.json makes us pass this bit.

Plus I run following:

Tools/Scripts/run-webkit-tests fast/table imported/w3c/web-platform-tests/css/ imported/w3c/web-platform-tests/html/semantics


to see, if we fail any 'caption' tests except just two progressions. I think we don't have any regressions or failure but also to highlight, we haven't imported 'css-table' from the WPT yet (which is bug 252516). So we don't know full breakage as well but just wanted to give what I have tried so far on this bug.
Comment 7 Karl Dubost 2023-05-16 07:40:44 PDT
Let's hope that it will be useful to solve this issue. :) 
https://github.com/WebKit/WebKit/pull/13920
Comment 8 Karl Dubost 2023-05-18 20:48:32 PDT
Ahmad, 
/css/css-tables are imported.
Bug bug 252516 is closed.
Comment 9 Ahmad Saleem 2023-05-19 04:44:35 PDT
(In reply to Karl Dubost from comment #8)
> Ahmad, 
> /css/css-tables are imported.
> Bug bug 252516 is closed.

Thanks @Karl. Appreciate it.

PR - https://github.com/WebKit/WebKit/pull/14069
Comment 10 EWS 2023-05-19 09:50:44 PDT
Committed 264262@main (402ed699af6c): <https://commits.webkit.org/264262@main>

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