WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
119039
Layout <img> with empty src attribute.
https://bugs.webkit.org/show_bug.cgi?id=119039
Summary
Layout <img> with empty src attribute.
Jaehun Lim
Reported
2013-07-24 01:22:30 PDT
There is a difference between WebKit and FF. Which one is right ? In my testcase, <div> has +500px height in WebKit and 0 height in FF.
Attachments
testcase
(115 bytes, text/html)
2013-07-24 01:24 PDT
,
Jaehun Lim
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Jaehun Lim
Comment 1
2013-07-24 01:24:37 PDT
Created
attachment 207383
[details]
testcase
zalan
Comment 2
2013-07-25 05:08:02 PDT
What I think is happening here is that FF considers this <img> element empty and empty inline elements generate empty inline boxes (like <span></span>) We, on the other hand, similarly to Opera create an inline box for it and this linebox is getting its calculated height value from the parent's font-size attribute. Once you add either padding, margin or border to the <img>, FF starts behaving like us. I couldn't find any traces in the spec when the <img> should be treated empty if at all.
Jaehun Lim
Comment 3
2013-07-25 17:50:33 PDT
(In reply to
comment #2
)
> What I think is happening here is that FF considers this <img> element empty and empty inline elements generate empty inline boxes (like <span></span>) We, on the other hand, similarly to Opera create an inline box for it and this linebox is getting its calculated height value from the parent's font-size attribute. > Once you add either padding, margin or border to the <img>, FF starts behaving like us. > I couldn't find any traces in the spec when the <img> should be treated empty if at all.
'src' in <img> is a mandatory attribute. I can't find how to treat <img> with empty src attribute in spec, too. Is it a bug ?
Ahmad Saleem
Comment 4
2023-05-08 07:12:16 PDT
All browsers render this testcase same with space and not collapsed, so I think Firefox changed the behavior. I tested via STP169, Chrome Canary 115 and Firefox Nightly 114. Considering Firefox changed, it would be RESOLVED INVALID>
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