Bug 171326

Summary: <img> with no src draws a thin outline that can't be overridden
Product: WebKit Reporter: Antoine Quint <graouts>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, dino, rniwa, simon.fraser, zalan
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=243601
Attachments:
Description Flags
Testcase
none
Safari 15.6 matches with other browsers none

Antoine Quint
Reported 2017-04-26 08:55:46 PDT
A page that is only <img style="width: 100px; height: 100px;"> draws a thin outline that cannot be overridden with CSS, or at least not that I could figure out.
Attachments
Testcase (42 bytes, text/html)
2017-04-26 10:55 PDT, Simon Fraser (smfr)
no flags
Safari 15.6 matches with other browsers (458.40 KB, image/png)
2022-07-26 04:56 PDT, Ahmad Saleem
no flags
Simon Fraser (smfr)
Comment 1 2017-04-26 10:54:43 PDT
That outline is painted by RenderImage::paintReplaced() if the image has no source. What do other browsers do?
Simon Fraser (smfr)
Comment 2 2017-04-26 10:55:36 PDT
Created attachment 308268 [details] Testcase
Simon Fraser (smfr)
Comment 3 2017-04-26 10:56:08 PDT
Both Chrome and FF draw the outline. Chrome draws a broken image icon.
Ahmad Saleem
Comment 4 2022-07-26 04:56:01 PDT
Created attachment 461219 [details] Safari 15.6 matches with other browsers I am unclear on expected results but all browsers match with each other as can be seen in attached screenshot. If I am incorrectly, please ignore my comment and test accordingly. Thanks!
Simon Fraser (smfr)
Comment 5 2022-07-26 10:21:58 PDT
We could resolve this as "Behaves Correctly" but it would be better if authors could override this. I commented in https://github.com/whatwg/html/issues/3631.
Note You need to log in before you can comment on or make changes to this bug.