Bug 240455 - "box-shadow" does not work on native form controls
Summary: "box-shadow" does not work on native form controls
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Safari 15
Hardware: All All
: P2 Critical
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
: 240635 242162 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-05-16 07:04 PDT by Chijin
Modified: 2023-01-14 16:43 PST (History)
11 users (show)

See Also:


Attachments
webkit screenshot (84.62 KB, image/png)
2022-05-16 07:04 PDT, Chijin
no flags Details
chrome screenshot (193.46 KB, image/png)
2022-05-16 07:06 PDT, Chijin
no flags Details
firefox screenshot (90.65 KB, image/png)
2022-05-16 07:06 PDT, Chijin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chijin 2022-05-16 07:04:25 PDT
Created attachment 459420 [details]
webkit screenshot

reprodiciable example: https://codepen.io/chijinz/pen/vYdgpdY

code:
```
<html>
<head>
<style>
</style>
<script>
function jsfuzzer() {
document.getElementById("htmlvar00004").style["box-shadow"] = "red 1px 73px"
}
</script>
</head>
<body onload=jsfuzzer()>
<textarea id="htmlvar00004" >aaa</textarea>
</body>
</html>

```

version: all webkit products (including Safari)

description:

The textarea element does not have shadow even though the "box-shadow" is set. Chrome and Firefox work fine with it.
Comment 1 Chijin 2022-05-16 07:06:41 PDT
Created attachment 459421 [details]
chrome screenshot
Comment 2 Chijin 2022-05-16 07:06:55 PDT
Created attachment 459422 [details]
firefox screenshot
Comment 3 Radar WebKit Bug Importer 2022-05-16 09:39:38 PDT
<rdar://problem/93351344>
Comment 4 Tim Nguyen (:ntim) 2022-05-16 11:23:34 PDT
Seems intentional: https://webkit-search.igalia.com/webkit/rev/7bebd4483c6744ddf9823572d42d2e34dc9d0bd9/Source/WebCore/rendering/RenderTheme.cpp#174

though I think this behavior should be changed.
Comment 5 Chijin 2022-05-16 18:19:11 PDT
(In reply to Tim Nguyen (:ntim) from comment #4)
> Seems intentional:
> https://webkit-search.igalia.com/webkit/rev/
> 7bebd4483c6744ddf9823572d42d2e34dc9d0bd9/Source/WebCore/rendering/
> RenderTheme.cpp#174
> 
> though I think this behavior should be changed.

Thanks. Could you backtrace the reason for doing this? Is it for the security concern or just wrong implementation?
Comment 6 Tim Nguyen (:ntim) 2022-05-16 21:25:36 PDT
(In reply to Chijin from comment #5)
> (In reply to Tim Nguyen (:ntim) from comment #4)
> > Seems intentional:
> > https://webkit-search.igalia.com/webkit/rev/
> > 7bebd4483c6744ddf9823572d42d2e34dc9d0bd9/Source/WebCore/rendering/
> > RenderTheme.cpp#174
> > 
> > though I think this behavior should be changed.
> 
> Thanks. Could you backtrace the reason for doing this? Is it for the
> security concern or just wrong implementation?

Probably some old UI guideline saying native controls shouldn't get shadows. Anyway, this should be fixed to be in-line with other browsers.
Comment 7 Aditya Keerthi 2022-05-19 15:31:43 PDT
*** Bug 240635 has been marked as a duplicate of this bug. ***
Comment 8 Fujii Hironori 2022-06-29 21:29:13 PDT
*** Bug 242162 has been marked as a duplicate of this bug. ***