Closed Bug 41635 Opened 25 years ago Closed 24 years ago

Navquirks: background-repeat and background-position fail on tables

Categories

(Core :: Layout: Tables, defect, P3)

defect

Tracking

()

VERIFIED FIXED
Future

People

(Reporter: bugzilla+mozilla, Assigned: karnaze)

References

Details

(Keywords: css1, testcase, Whiteboard: WORKSFORME?)

Attachments

(2 files)

I appologize if I've assigned this to the wrong section--I was suprised not to find one labeled "CSS" or something similar. I have added a background image to a table via CSS like so: <table width="100%" border="0" cellspacing="12" cellpadding="0" style= "background-image:url('images/radar-bg.gif'); background-repeat:no-repeat; background-position: bottom right"> This renders fine in *ahem* IE5, however in Mozilla (2000060508) the image is repeated (tiled). Of course, because of this it is thus not honoring the bottom -right position property either.
Erm, this works fine for me: http://www.bath.ac.uk/%7Epy8ieh/m/fixedpos-bg-tables.html Could you attach a test case, or give the URI of a test case, which shows the problem? If possible, make the page qutie small (less than 2kb).
Keywords: css1
Whiteboard: WORKSFORME?
This bug is in quirks-mode only and is specific to tables (or perhaps other table elements - haven't tested). Do table backgrounds in NavQuirks mode really need to be so quirky? IMO, quirks mode should only be for quirks that pages depend on, not for perfect imitation of NN 4.x behavior. Changing component to HTMLTables, confirming, and reassigning.
Assignee: pierre → karnaze
Status: UNCONFIRMED → NEW
Component: Style System → HTMLTables
Ever confirmed: true
QA Contact: ckritzer → desale
Summary: CSS background ignores repeat and position → Navquirks: background-repeat and background-position fail on tables
This bug has been marked "future" because the original netscape engineer working on this is over-burdened. If you feel this is an error, that you or another known resource will be working on this bug,or if it blocks your work in some way -- please attach your concern to the bug for reconsideration.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Adding testcase keyword so this doesn't show up on the bugathon search page.
Keywords: testcase
QA Contact: desale → chrisd
Analysis: The recently deceased Nav4xx does not display background images that are attached via CSS to a table. So it was decided (definetely not by me) to disable these background images in the quirk's mode. To illustrate this look at: http://lxr.mozilla.org/seamonkey/source/layout/html/table/src/nsTableColFrame.cpp#124 http://lxr.mozilla.org/seamonkey/source/layout/html/table/src/nsTableColGroupFrame.cpp#451 http://lxr.mozilla.org/seamonkey/source/layout/html/table/src/nsTableFrame.cpp#1332 http://lxr.mozilla.org/seamonkey/source/layout/html/table/src/nsTableRowFrame.cpp#537 http://lxr.mozilla.org/seamonkey/source/layout/html/table/src/nsTableRowGroupFrame.cpp#212 The only place where the nsCSSRendering::PaintBackground is executed regardless of the quirk-mode is nsTableCellFrame.cpp because by this the background of the table cell's is drawn. The bad thing is that nsCSSRendering::PaintBackground makes two things: it first applies a background image if present and in the second step applies the requested background color. The patch tells the nsCSSRendering::PaintBackground routine that for this cell there is no background image. I tested the patch against the - precheckin tests - all table regression test's Solution: Index: nsTableCellFrame.cpp =================================================================== RCS file: /cvsroot/mozilla/layout/html/table/src/nsTableCellFrame.cpp,v retrieving revision 3.226 diff -u -r3.226 nsTableCellFrame.cpp --- nsTableCellFrame.cpp 2000/10/28 22:14:57 3.226 +++ nsTableCellFrame.cpp 2000/11/18 14:12:07 @@ -304,7 +304,11 @@ const nsStyleTable* cellTableStyle; GetStyleData(eStyleStruct_Table, ((const nsStyleStruct *&)cellTableStyle)); nsRect rect(0, 0, mRect.width, mRect.height); - + nsCompatibility mode; + aPresContext->GetCompatibilityMode(&mode); + if (eCompatibility_NavQuirks == mode) { + ((nsStyleColor*)myColor)->mBackgroundImage.SetLength(0); + } // Don't render background images in quirks mode // only non empty cells render their background if (PR_FALSE == GetContentEmpty()) { nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
Keywords: patch, review
Probably my patch is more a quick shot, that could have been applied before rtm (relase the monkey) but a better way would be to split nsCSSRendering::PaintBackground into nsCSSRendering::PaintBackgroundImage and nsCSSRendering::PaintBackgroundColor and to call both function's from PaintBackground so that nothing changes for regular call's of nsCSSRendering::PaintBackground. By doing this one could enable the background images also in the quirk mode and maintain the coloring as it was before. I tried to run a regression test without all these quirk mode stuff for the background painting and so many differences occure that I would be very afraid to enable the full background painting also in the quirk mode.
*** Bug 63575 has been marked as a duplicate of this bug. ***
QA contact update
QA Contact: chrisd → amar
another URL to see this one is http://www.world-direct.com/central
FIXED by Bernd Mielke's checkin on 2001-07-01 (bug 46268)
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
OS: Windows NT → All
Hardware: PC → All
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Marking verified on 2001-07-27-00-0.9.2 build
That's interesting, since the checkin wasn't even on the 0.9.2 branch.
the testcase at http://www.world-direct.com/central/ is broken with the final Netscape 6.1 How can that be?!
very easily, this is the consequence of checking in to the trunk only.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: