Closed
Bug 211440
Opened 22 years ago
Closed 22 years ago
BGCOLOR does not work without a # char in the color code on table which is output dynamically using getElementByID function and innerHTML property
Categories
(Core :: DOM: Core & HTML, defect, P1)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.5alpha
People
(Reporter: madwent, Assigned: bzbarsky)
References
()
Details
Attachments
(1 file)
10.26 KB,
patch
|
john
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624
In the page at http://noby.cubicproductions.com/bugzillatest/, all three tables
should appear in green. Two of them are dynamically output, one is static. The
code for the first table and the third table are identical except that the first
is being output by javascript to a DIV tag. The only difference between the two
dynamically output tables is that one does not contain a # in the color code. In
Mozilla, the first table is displayed with no explicit background color (it
should be green).
Reproducible: Always
Steps to Reproduce:
1. Write a standard HTML table with one TD in it. Using BGCOLOR, set the
background color to, say, green 00FF00. Omit the # character from the color code.
2. Write this table to a div tag using getElementById and innerHTML.
3. Launch Mozilla, view the output.
Actual Results:
The table did not have a background color.
Expected Results:
The table should have appeared as it does if it is statically output (versus
output by javascript). It should have appeared with a background color.
This happens on a couple other copies of Mozilla, all 1.4 and all on Windows XP
systems. Not sure about any other platforms/etc.
![]() |
Assignee | |
Comment 1•22 years ago
|
||
We have to pass the right document in; otherwise we get standards-mode parsing
for fragments....
![]() |
Assignee | |
Updated•22 years ago
|
Attachment #126935 -
Flags: superreview?(jst)
Attachment #126935 -
Flags: review?(jkeiser)
![]() |
Assignee | |
Comment 2•22 years ago
|
||
taking.
Assignee: dom_bugs → bzbarsky
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Priority: -- → P1
Hardware: PC → All
Target Milestone: --- → mozilla1.5alpha
Comment 3•22 years ago
|
||
Comment on attachment 126935 [details] [diff] [review]
patch
already_AddRefed<nsIDocument> nsGenericElement::GetOwnerDocument() would indeed
be useful :-)
sr=jst
Attachment #126935 -
Flags: superreview?(jst) → superreview+
Comment 4•22 years ago
|
||
Comment on attachment 126935 [details] [diff] [review]
patch
r=me, though I'd rather prefer that logic be in a helper function too ... r=me
as well if you want to do GetOwnerDocument()
Comment 5•22 years ago
|
||
Comment on attachment 126935 [details] [diff] [review]
patch
r=me, though I'd rather prefer that logic be in a helper function too ... r=me
as well if you want to do GetOwnerDocument()
Attachment #126935 -
Flags: review?(jkeiser) → review+
![]() |
Assignee | |
Comment 6•22 years ago
|
||
Bug 211634 filed on the GetOwnerDocument thing -- I'd like to make that a
tree-wide sweep as I do it.
Patch checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•