Bug 260318

Summary: [css-break] 'orphans' and 'widows' property should have '2' as initial value
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: fantasai.bugs, mmaxfield, ntim, webkit-bug-importer
Priority: P2 Keywords: InRadar, WPTImpact
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Ahmad Saleem 2023-08-16 16:25:45 PDT
Hi Team,

While going through failing WPT test, came across following two failing where we don't have initial value for 'orphans' and 'windows' and return 'auto' instead of '2' as per spec.

Failing WPT Test: https://wpt.fyi/results/css/css-break/inheritance.html?label=master&label=experimental&aligned=&q=inheritance

sub-test names: Property orphans has initial value 2 & Property widows has initial value 2

Web-Spec: https://drafts.csswg.org/css-break/#property-index

I tried to look into CSSProperties.json whether we have way to do 'initial value' similar to Chromium bug couldn't figure out.

Just wanted to raise so we can fix it.

Thanks!
Comment 1 Tim Nguyen (:ntim) 2023-08-16 23:58:13 PDT
removing all code related to `hasAutoOrphans` and `hasAutoWidows` should just work:
https://searchfox.org/wubkat/search?q=hasAutoOrphans&path=&case=false&regexp=false
https://searchfox.org/wubkat/search?q=hasAutoWidows&path=&case=false&regexp=false

(although some of these checks will need to be replaced with `style().orphans() == RenderStyle::initialOrphans()` or something similar)
Comment 2 Radar WebKit Bug Importer 2023-08-23 16:26:13 PDT
<rdar://problem/114350539>
Comment 3 Ahmad Saleem 2024-06-26 14:42:48 PDT
Test Changes (if we started doing it in future) - https://github.com/chromium/chromium/commit/b25fd3116d7cb9366a24af711666fc63a27f91b4
Comment 4 Tim Nguyen (:ntim) 2024-08-02 11:57:46 PDT

*** This bug has been marked as a duplicate of bug 277559 ***