Closed
Bug 1506592
Opened 7 years ago
Closed 7 years ago
We show the broken image icon for <img> without src attributes after bug 1196668
Categories
(Core :: Layout: Images, Video, and HTML Frames, defect)
Core
Layout: Images, Video, and HTML Frames
Tracking
()
VERIFIED
FIXED
mozilla65
| Tracking | Status | |
|---|---|---|
| firefox65 | --- | verified |
People
(Reporter: jlast, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(5 files, 1 obsolete file)
On 11/09 we landed 1503871, which converted the SVG URLs to relative urls which would not violate the security issues. Shortly after, bug 1196668 landed which required alt attributes to be present.
Adding an alt attribute works in most cases, but it effects the layout of the source tree.
| Reporter | ||
Comment 1•7 years ago
|
||
| Reporter | ||
Comment 2•7 years ago
|
||
here is a GIF of the source tree layout being fixed by removing alt attributes. -- http://g.recordit.co/jjaUgvUStx.gif
| Assignee | ||
Comment 3•7 years ago
|
||
Assignee: nobody → emilio
| Assignee | ||
Updated•7 years ago
|
Blocks: 1196668
Summary: SVGs with a mask URL are broken → We show the broken image icon for <img> without src attributes after bug 1196668
| Assignee | ||
Updated•7 years ago
|
Component: Debugger → Layout: Images, Video, and HTML Frames
Product: DevTools → Core
| Assignee | ||
Updated•7 years ago
|
Attachment #9024452 -
Attachment mime type: text/plain → text/html
| Assignee | ||
Comment 4•7 years ago
|
||
This is enough to fix the devtools regression and matches what other browsers
do in the no-attribute case.
Also, I think this change over all makes sense: it doesn't make any sense to
display the broken image icon if there's no request, and we already assume in
EnsureIntrinsicSizeAndRatio() that we don't paint the icon for those (and make
the intrinsic size 0x0).
We still show the border, which matches other UAs (note that devtools
effectively masks the border away with mask-image).
This technically also can change behavior of <object> and <input>, but I think
it's better to be consistent, since EnsureIntrinsicSizeAndRatio also doesn't
special-case <img> either.
Updated•7 years ago
|
Attachment #9024444 -
Attachment is obsolete: true
Comment 5•7 years ago
|
||
this issue is also apparent on the new tab page in new profiles.
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/63fca07a71b8
Make sure to only display the broken image icon if there's a request at all. r=bzbarsky
Comment 8•7 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Comment 11•7 years ago
|
||
The issue was only partially fixed on all platforms, at least on the New Tab page. The broken icon is no longer displayed, but the weird rectangle is still there.
@Emilio, should we reopen this issue or log a new one for this behavior?
Flags: needinfo?(emilio)
Comment 12•7 years ago
|
||
Attached a screenshot of the behavior described in comment 11.
| Assignee | ||
Comment 13•7 years ago
|
||
Yeah, the patch here doesn't remove the border, just the broken image icon.
I could make it do so if needed, but all other UAs that show a border around broken images (that's WebKit and Blink effectively) agree on showing a border here as well, as it can be seen in: https://crisal.io/tmp/img-fallback.html
Is there any chance the front end could use any other tag, like, let's say, a <span> or so?
Does anybody have any strong opinion about that? I'm fairly ambivalent about whether we should render the border or not for the cases we don't paint the icon.
The only reason for using an <img> instead of a <span> here would be accessibility I guess (after bug 1196668 the <img> node for the a11y tree would be a graphic instead of another thing). Though what we were doing before that was effectively the same accessibility-wise than using a span.
Flags: needinfo?(emilio)
Comment 14•7 years ago
|
||
@andreio, could you please comment on the workarounds offered in comment 13?
Flags: needinfo?(andrei.br92)
Comment 15•7 years ago
|
||
Comment 17•7 years ago
|
||
Commit pushed to master at https://github.com/mozilla/activity-stream
https://github.com/mozilla/activity-stream/commit/78c4062812b803cfcafc36f4ad34303c632c4235
Fix Bug 1506592 - Broken image icon for empty sections (#4564)
Comment 18•7 years ago
|
||
Activity stream export bug 1508407 with span workaround from comment 13
https://hg.mozilla.org/mozilla-central/rev/945c7e99ee1f#l25.1147
Comment 19•7 years ago
|
||
I have verified that the issue is no longer reproducible on the latest Nightly 65.0a1 (Build ID 20181120100045) on Windows 10 x64, Mac 10.13.3, and Arch Linux 4.16 x64.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•