Closed Bug 232317 Opened 20 years ago Closed 20 years ago

[FIX]there are height and width properties of images that not being loaded

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla1.7alpha

People

(Reporter: sekundes, Assigned: bzbarsky)

References

()

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7a) Gecko/20040120 Firebird/0.8.0+

.

Reproducible: Always
Steps to Reproduce:
1.try testcase(URL).
2.right click on "alternate text" and select properties.
Actual Results:  
Width: 1240704px
Height: 4865812px

What're they...?

Expected Results:  
width and height properties should not be shown in this case, just like Mozilla.
Using:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040114 Firebird/0.7+

...on Windows XP, I see no height/width properties; all I see are the Location,
Size of file (unavailable), and Alternate text (Alternate text).

I'm going to install an updated build in a second, so I'll see if it works in
there and report back if it doesn't.
Confirming on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7a)
Gecko/20040120 Firebird/0.7+ and Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.7a) Gecko/20040118

Moving to Browser - Layout: Images, I guess.
Assignee: blake → jdunn
Status: UNCONFIRMED → NEW
Component: General → Layout: Images
Ever confirmed: true
Product: Firebird → Browser
QA Contact: core.layout.images
Version: unspecified → Trunk
Is this a regression?
heh, a fun bug
nsHTMLImageElement::GetWidthHeight totally fails to deal with the case of
"neither frame nor width/height attribute given", and just returns garbage in
such a case.

not sure what best behaviour would be, maybe returning 0 would be better... or
throw an exception, but can pages deal with some_image.width possibly throwing
an exception?
Assignee: jdunn → bz-vacation
Status: NEW → ASSIGNED
OS: Windows 2000 → All
Priority: -- → P3
Hardware: PC → All
Summary: there are height and width properties of images that not being loaded → [FIX]there are height and width properties of images that not being loaded
Target Milestone: --- → mozilla1.7alpha
Attachment #140010 - Flags: superreview?(jst)
Attachment #140010 - Flags: review?(jst)
Returning an exception is really not an option.... ;)
Comment on attachment 140010 [details] [diff] [review]
Make sure to init the return value

Either this, or initialize size at the top of the method, potentially saving us
from another similar bug in this method in the future. I'm not sure which one
is less code, performance hardly matters here.
Attachment #140010 - Flags: superreview?(jst)
Attachment #140010 - Flags: superreview+
Attachment #140010 - Flags: review?(jst)
Attachment #140010 - Flags: review+
Attachment #140010 - Attachment is obsolete: true
Component: Layout: Images → DOM: HTML
QA Contact: core.layout.images → ian
Checked that in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Component: DOM: HTML → DOM: Core & HTML
QA Contact: ian → general
You need to log in before you can comment on or make changes to this bug.