Closed Bug 105057 Opened 23 years ago Closed 23 years ago

images used as form controls doesn't appear on Page Info | Images

Categories

(SeaMonkey :: Page Info, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: aha, Assigned: db48x)

References

Details

Attachments

(2 files, 1 obsolete file)

Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.5+) Gecko/20011014-trunk

Repro (Always):
1. open an attachment in new windows
2. you see two pictures - a form button 'JDI' and small black square
3. go to Page Info (Ctrl+I)
4. go to 'Images' tab

Actual:
You will see only black square image listed (../bt.gif), form button isn't there
(http://j.lupa.cz/m/g/tl-jdi.gif)

Wanted:
All pictures used in page are diplayed.

If this bug will be confirmed, add please bug 82059 to BugsDependsOnThis.
Attached file testcase
seeing this with 2001101513/Redhat 7.1
->daniel
Assignee: blakeross → db48x
mass moving open bugs pertaining to page info to pmac@netscape.com as qa contact.

to find all bugspam pertaining to this, set your search string to
"BigBlueDestinyIsHere".
QA Contact: sairuh → pmac
*** Bug 121629 has been marked as a duplicate of this bug. ***
confirmed.

The problem is that grabAllMedia grabs <input type="image"> but the

switch (elem.nodeName.toLowerCase())

in makeMediaTab() does not have a case for "input".  Add the "image input" type
to the media type list?  Or just make "img" and "input" do the same thing?

makePreview() may need updating too... Does the src of <input type="image">
return a relative or absolute URL?
Blocks: 82059
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows NT → All
Hardware: PC → All
I'll do some debugging on this tonight, should be simple and I'll have a patch
in morning.
oh, bz, thanks. you beat me to it, I'd gone off for some ice cream :)

That does look like the reason. I'll test some changes now, but I won't be able
to make a patch until tommorrow
Status: NEW → ASSIGNED
bleh, the dom sucks. I've got it working, but it has the same problem that
images specified in link tabs have, they don't show up in the preview pane. The
problem is that neither the input nor the link tab stores the width or height of
the image, so it ends up as a 0x0 image in the preview window. I suppose either
those properties need to be added (yes, they'd be a netscape extension, but oh
well), or the xul image tag needs to have a better setter on it's .src property
that can find the width and height, which it doesn't appear to do.
Blocks: 121801
Attached patch fixes input and links (obsolete) — Splinter Review
thanks to bz for the idea
Comment on attachment 66503 [details] [diff] [review]
fixes input and links

r=bzbarsky
Attachment #66503 - Flags: review+
jag, can you sr=?
Comment on attachment 66503 [details] [diff] [review]
fixes input and links

>Index: xpfe/browser/resources/content/pageInfo.js
>===================================================================
>RCS file: /cvsroot/mozilla/xpfe/browser/resources/content/pageInfo.js,v
>retrieving revision 1.14
>diff -u -r1.14 pageInfo.js
>--- xpfe/browser/resources/content/pageInfo.js	2002/01/24 07:27:47	1.14
>+++ xpfe/browser/resources/content/pageInfo.js	2002/01/25 20:20:07
>@@ -672,8 +677,10 @@
>   }
> 
>   newImage.setAttribute("id", "thepreviewimage");
>-  newImage.width = ("width" in item && item.width) || unknown;
>-  newImage.height = ("height" in item && item.height) || unknown;
>+  if ("width" in item && item.width)
>+    newImage.width = item.width;
>+  if ("height" in item && item.height)
>+      newImage.height = item.height;

Nit: indent

Fix that and sr=jag
Attachment #66503 - Flags: superreview+
Attached patch fix nit :PSplinter Review
Attachment #66503 - Attachment is obsolete: true
Comment on attachment 66560 [details] [diff] [review]
fix nit :P

transferring r= and sr=.

No need to attach new patches for such nits, generally.
Attachment #66560 - Flags: superreview+
Attachment #66560 - Flags: review+
yea, I just can't check it in, so I figured I'd save someone the trouble while I
was working on other bugs :)
Summary: images used as form controls doesn't apper on Page Info | Images → images used as form controls doesn't appear on Page Info | Images
thanks timeless, marking fixed
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
verified fixed with an 5min old CVS build
Status: RESOLVED → VERIFIED
Component: XP Apps: GUI Features → Page Info
*** Bug 122207 has been marked as a duplicate of this bug. ***
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: