Closed
Bug 69196
Opened 24 years ago
Closed 23 years ago
border of HTMLImageElement not dynamically changeable
Categories
(Core :: DOM: Core & HTML, defect, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla0.9.9
People
(Reporter: martin.honnen, Assigned: jst)
References
Details
(Keywords: dom1, Whiteboard: [HAVE FIX])
Attachments
(3 files)
1.77 KB,
image/gif
|
Details | |
880 bytes,
text/html
|
Details | |
3.04 KB,
patch
|
sicking
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
I try to set the border property of an HTMLImageElement from JavaScript but nothing shows up. The border property is listed in DOM level 1 HTML and there are no restrictions that it should only be readable. <HTML> <HEAD> <SCRIPT> var step = 1; var border = 0; function borderAnimation () { document.imageName.border = border = border + step; window.status = 'border = ' + document.imageName.border; if (border == 20) step = -1; if (step > 1 || border > 0) setTimeout('borderAnimation()', 100); } </SCRIPT> </HEAD> <BODY ONLOAD="borderAnimation();"> <FORM NAME="gui"> <SELECT NAME="border" ONCHANGE="document.imageName.border = this.selectedIndex; window.status = 'border = ' + document.imageName.border;" > <SCRIPT> for (var i = 0; i < 20; i++) document.write('<OPTION>' + i); </SCRIPT> </SELECT> </FORM> <SCRIPT> document.gui.border.selectedIndex = -1; </SCRIPT> <IMG NAME="imageName" SRC="kiboInside.gif"> </BODY> </HTML>
Reporter | ||
Comment 1•24 years ago
|
||
Reporter | ||
Comment 2•24 years ago
|
||
Assignee | ||
Comment 3•24 years ago
|
||
Aiming for mozilla1.0
OS: other → All
Priority: -- → P3
Hardware: PC → All
Target Milestone: --- → mozilla1.0
Updated•24 years ago
|
Component: DOM Level 1 → DOM HTML
Comment 6•23 years ago
|
||
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1 (you can query for this string to delete spam or retrieve the list of bugs I've moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
Comment 7•23 years ago
|
||
The patch adds a NS_IMPL_PIXEL_ATTR macro in nsGenericHTMLElement.h. I could get away with using NS_IMPL_INT_ATTR for the getter, but the setter required a new macro. I modified three HTMLImageElement properties to use the new macro. We can change other properties to use this macro as the issues arise, I guess.
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Priority: P3 → P2
Whiteboard: [HAVE FIX]
Target Milestone: mozilla1.0.1 → mozilla0.9.9
Assignee | ||
Comment 8•23 years ago
|
||
Comment on attachment 67510 [details] [diff] [review] Proposed fix for this baby Looks great, sr=jst
Attachment #67510 -
Flags: superreview+
Comment 9•23 years ago
|
||
jonas, could you please review this patch? thanks in advance :-)
Comment on attachment 67510 [details] [diff] [review] Proposed fix for this baby The code looks fine, but I'm not 100% sure I understand why it fixes the bug. Is it becuase the stylesystem relies on that the attribute has pixel unit?
Attachment #67510 -
Flags: review+
Comment 11•23 years ago
|
||
*** Bug 47249 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 12•23 years ago
|
||
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 13•23 years ago
|
||
*** Bug 120089 has been marked as a duplicate of this bug. ***
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•