Closed
Bug 655966
Opened 14 years ago
Closed 14 years ago
404 images do not take given width or height
Categories
(Core :: Web Painting, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: ckkoshi, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.21 Safari/534.30
Build Identifier: 4.0.1
If an image is in 404, before load it will take the given width or height, but when image give 404 status, it removes the image size.
A display:inline-block will resolve the problem.
Reproducible: Always
![]() |
||
Comment 1•14 years ago
|
||
This is the desired behavior (and quite purposeful). Images that have to fall back will fall back to a non-replaced element containing the alt text (except in certain quirks mode situations). Then you can style them however you want.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
![]() |
||
Comment 2•14 years ago
|
||
In particular, the HTML5 spec at http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html#the-img-element is pretty clear on this. Read the list starting "What an img element represents depends on the src attribute and the alt attribute." The only part of that we don't do is the "should display some sort of indicator that there is an image that is not being rendered" when there is no alt attribute.
It a bad interpretation, at not time it tells that even if height or width is specified an image without valid src represent nothing.
Even forced in CSS the image doesn't have any height/width assigned.
![]() |
||
Comment 4•14 years ago
|
||
> Even forced in CSS the image doesn't have any height/width assigned.
CSS width and height don't apply to display:inline non-replaced elements.
So don't make item in display:inline; when SRC is invalid?
![]() |
||
Comment 6•14 years ago
|
||
We just make it non-replaced. Everything in CSS is display:inline unless specified otherwise; see the CSS spec.
Again, you're welcome to style your images with some other display type if that's the behavior you want!
Assignee | ||
Updated•7 years ago
|
Component: Layout: View Rendering → Layout: Web Painting
You need to log in
before you can comment on or make changes to this bug.
Description
•