Closed
Bug 1184647
Opened 10 years ago
Closed 10 years ago
cloned image node omits naturalWidth and naturalHeight properties
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: scaturrob, Assigned: bzbarsky)
Details
(Keywords: testcase)
Attachments
(1 file)
3.16 KB,
patch
|
jdm
:
review+
smaug
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36
Steps to reproduce:
I created a fiddle that demonstrates the issue:
http://jsfiddle.net/scaturrob/yqed6ts0/
Actual results:
The loaded image returns the correct dimensions for naturalWidth and naturalHeight. Cloning that image results in a 0 value for both naturalWidth and naturalHeight on the clone.
Expected results:
The original node and clone should have identical naturalWidth and naturalHeight properties
![]() |
Assignee | |
Comment 1•10 years ago
|
||
Nice catch.
The problem is that cloning passes false for aNotify to SetAttr, so the image load doesn't get started on the clone.
Assignee: nobody → bzbarsky
Status: UNCONFIRMED → NEW
Ever confirmed: true
![]() |
Assignee | |
Comment 2•10 years ago
|
||
Olli, sorry to pile onto your review load, but this needs some checking wrt the static document bits and the responsive image interaction, and I seem to recall you know about the latter.
Attachment #8635413 -
Flags: review?(bugs)
Comment 3•10 years ago
|
||
Comment on attachment 8635413 [details] [diff] [review]
Cloning an image should ensure that the clone tries to load the src, if any
oh, hmm, I think we may want to pass true as aNotify in CopyInnerTo, but that needs some more investigation, so not in this bug.
2 spaces for indentation.
but I'm not familiar with responsive image interaction. jdm has done some work there.
Attachment #8635413 -
Flags: review?(bugs) → review?(josh)
Comment 4•10 years ago
|
||
Comment on attachment 8635413 [details] [diff] [review]
Cloning an image should ensure that the clone tries to load the src, if any
But for static document case, yes, we don't want to load anything there, but just
clone.
Attachment #8635413 -
Flags: review+
Comment 5•10 years ago
|
||
Comment on attachment 8635413 [details] [diff] [review]
Cloning an image should ensure that the clone tries to load the src, if any
Review of attachment 8635413 [details] [diff] [review]:
-----------------------------------------------------------------
Makes sense.
Attachment #8635413 -
Flags: review?(josh) → review+
Comment 7•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•