Closed
Bug 17911
Opened 25 years ago
Closed 24 years ago
[Content Sink] Body bgcolor not working in XML
Categories
(Core :: XML, defect, P3)
Tracking
()
VERIFIED
FIXED
Future
People
(Reporter: christinehoff4, Assigned: attinasi)
References
Details
(Whiteboard: [FIX IN HAND][nsbeta3+])
Attachments
(4 files)
179 bytes,
text/xml
|
Details | |
1.05 KB,
patch
|
Details | Diff | Splinter Review | |
1.54 KB,
patch
|
Details | Diff | Splinter Review | |
1.60 KB,
patch
|
Details | Diff | Splinter Review |
Using build 1999110308 on Win 95. Also tested on Mac and Linux. Behavior is cross platform Steps to Reproduce: 1. Open attached file. Document uses HTML namespace. Body bgcolor is assigned a value or red. Expected result: Body should display in red. Actual result: Body has not color. This worked in previous 5.0 version (10/3, for example).
Reporter | ||
Comment 1•25 years ago
|
||
Reporter | ||
Updated•25 years ago
|
Summary: Body bgcolor not working in XML
This is caused by having a BODY element that's not a child of the HTML element. I suspect the body background fixup rule. I think if the parent isn't HTML, you should cancel the fixup rule... Troy?
Comment 3•25 years ago
|
||
David's analysis is correct: when the document is changed so that the parent element of the BODY element is an HTML element in the HTML namespace, the background misteriously appears.
Yes, the fixup rule should only apply for HTML documents (and hence the parent is the document element)
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M16
Comment 5•25 years ago
|
||
Acceptign bug and setting target milestone to M16...
Comment 7•24 years ago
|
||
Move back into M16 because this is related to the XML/HTML content sink factoring work that I want to do in M16...
Target Milestone: M17 → M16
Comment 8•24 years ago
|
||
Moving XML/HTML content sink factoring related bugs out to M17...
Target Milestone: M16 → M17
Comment 10•24 years ago
|
||
Nominating for beta 3...
Keywords: nsbeta3
Summary: Body bgcolor not working in XML → [Content Sink] Body bgcolor not working in XML
Comment 11•24 years ago
|
||
correctness. Is it a usable workaround to specify the background color on the BODY in a (possibly external) CSS stylesheet instead?
Keywords: correctness
Comment 12•24 years ago
|
||
nsbeta3-, ->future, since a workaround exists.
Whiteboard: [nsbeta3-]
Target Milestone: M17 → Future
Requesting reevaluation for nsbeta3 1) I think this should be a reasonably simple fix to the BodyFixupRule (don't do anything if HTML not parent) 2) What workaround??
Whiteboard: [nsbeta3-]
Assignee | ||
Comment 14•24 years ago
|
||
Hmmmm. Works for me (background is red) using a trunk build from Wed 8/9 on NT and Linux. Can somebody confirm this please? I agree with David, however, that the BodyFixupRule shoul donly apply if the document is an HTML file. This can be done in the method nsHTMLBodyElement::GetInlineStyleRules I believe, where the BodyFixupRule is created. Nonetheless, I think this bug is WORKSFORME.
Comment 15•24 years ago
|
||
No, the BODY is *not* red. The root element is red. The body is a one line element in that document.
Assignee | ||
Comment 16•24 years ago
|
||
Oops - sorry, you are right, of course. I'll look at cutting off the BodyFixupRule when the parent of the HTMLBodyElement is not the HTMLElement - should be easy.
Assignee | ||
Comment 17•24 years ago
|
||
Nisheeth, I hope you don't mind me taking this (it is Future'd) but I have a really simple fix for it... I'll attach it as a patch for consideration.
Assignee: nisheeth → attinasi
Status: ASSIGNED → NEW
Assignee | ||
Comment 18•24 years ago
|
||
Assignee | ||
Comment 19•24 years ago
|
||
Simple patch attached. Can somebody please review?
Assignee | ||
Comment 20•24 years ago
|
||
CC'ing David Baron - can you check out the attached patch?
Hmmm. Don't you want to put the new stuff after the |mInner.GetInlineStyleRules(aRules)| ?
Assignee | ||
Comment 22•24 years ago
|
||
Good catch David, you are absoluttely right, thanks. Attaching a new patch that avoids the body fixup rule but still allows the inline style rules from the inner to be used.
Assignee | ||
Comment 23•24 years ago
|
||
Hate to say this now... but one more thing. If someone makes body the root in a XML doc, won't this fail because the GetParent returns null? So should you initialize to FALSE and set to TRUE at the inside if the tag does match?
Assignee | ||
Comment 25•24 years ago
|
||
David, if the body was the root element then we would end up creating the BodyFixupRule, which would be OK because it checks to make sure that the parent of the body is not null (the style contexts, not the content elements). However, it is better to check for it before creating the rule, as you suggested, and avoid the overhead of the rule since it won't apply anyway. One more time now...
Assignee | ||
Comment 26•24 years ago
|
||
r=dbaron, as long as there are no regressions on Ian's background tests. (Boy, I'm picky...)
Assignee | ||
Comment 28•24 years ago
|
||
Believe it or not, your pickiness is a tremendous asset! Thanks, David.
Assignee | ||
Comment 29•24 years ago
|
||
Approving for beta3: fix in hand, reviewed and tested. Localized change that will improve correctness and eliminate a tiny amount of bloat on some XML documents.
Whiteboard: [FIX IN HAND] → [FIX IN HAND][nsbeta3+]
Assignee | ||
Comment 30•24 years ago
|
||
Fix checked in (nsHTMLBodyElement.cpp)
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Reporter | ||
Updated•24 years ago
|
QA Contact: chrisd → petersen
Comment 32•23 years ago
|
||
see bug 73294 before reopening this bug
You need to log in
before you can comment on or make changes to this bug.
Description
•