WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
236153
Implement overflow-clip-margin
https://bugs.webkit.org/show_bug.cgi?id=236153
Summary
Implement overflow-clip-margin
Rob Buis
Reported
2022-02-04 12:46:01 PST
Implement overflow-clip-margin:
https://drafts.csswg.org/css-overflow/#overflow-clip-margin
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-02-11 12:46:16 PST
<
rdar://problem/88830478
>
Karl Dubost
Comment 2
2022-12-26 16:53:45 PST
https://wpt.fyi/results/css/css-overflow?label=master&label=experimental&aligned&view=subtest&q=overflow-clip%20safari%3Afail
Suraj
Comment 3
2025-12-15 01:58:13 PST
I would like to take a stab at implementing this feature. I’m working on familiarizing myself with how clipping is implemented in the WebKit codebase.
Ahmad Saleem
Comment 4
2025-12-15 02:32:49 PST
(In reply to Suraj from
comment #3
)
> I would like to take a stab at implementing this feature. I’m working on > familiarizing myself with how clipping is implemented in the WebKit codebase.
Sure, please go ahead and also join Open Source WebKit slack to ask any question in #dev channel. How to join -
https://webkit.org/getting-started/#staying-in-touch
Suraj
Comment 5
2025-12-19 12:48:52 PST
Quick update for anyone tracking this feature - I made some progress in implementing this feature. To implement this feature, most likely, the dimensions calculated in RenderBox::overflowClipRect need to be updated based on the value of the overflow clip margin property -
https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderBox.cpp#2265
. I started by implementing the parsing logic for this property. I defined a new CSS property in CSSProperties.json file and created a new RenderStyle class named "OverflowClipMargin". I managed to compile the code and get it running. More than half of the WPT parsing tests defined here are passing -
http://wpt.live/css/css-overflow/parsing/overflow-clip-margin.html
. All the failing tests are due to the error "serialization should be canonical". I'm working through such errors by trying to understand how CSS style serialization is implemented and make changes to the OverflowClipMargin RenderStyle class accordingly.
Ahmad Saleem
Comment 6
2025-12-19 13:35:03 PST
(In reply to Suraj from
comment #5
)
> Quick update for anyone tracking this feature - > > I made some progress in implementing this feature. To implement this > feature, most likely, the dimensions calculated in > RenderBox::overflowClipRect need to be updated based on the value of the > overflow clip margin property - >
https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderBox
. > cpp#2265. I started by implementing the parsing logic for this property. I > defined a new CSS property in CSSProperties.json file and created a new > RenderStyle class named "OverflowClipMargin". I managed to compile the code > and get it running. More than half of the WPT parsing tests defined here are > passing - >
http://wpt.live/css/css-overflow/parsing/overflow-clip-margin.html
. All the > failing tests are due to the error "serialization should be canonical". I'm > working through such errors by trying to understand how CSS style > serialization is implemented and make changes to the OverflowClipMargin > RenderStyle class accordingly.
Thanks for an update, if you want feedback and input while you iterate, you can do draft PR and tag engineers. You should join our Open Source WebKit Slack channel as well, where in #dev or #help channel, you can ask for inputs as well. How to join -
https://webkit.org/getting-started/#staying-in-touch
Suraj
Comment 7
2025-12-19 15:15:51 PST
Sure, I didn’t know we could draft PRs. Thanks for letting me know.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug