Closed Bug 145572 Opened 22 years ago Closed 21 years ago

[ABS] abs. pos. table does not honour the right: xxpx

Categories

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

x86
All
defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: bernd_mozilla, Assigned: bernd_mozilla)

References

Details

(Keywords: testcase)

Attachments

(3 files, 1 obsolete file)

A absolute positioned table with a percent width does not honour the right
position description. win98 2002051508
Attachment #84204 - Attachment description: testcase → testcase with left:200px
the issue has nothing to do with percent tables. It's a consequence of our
bizarre style context relationship between outertable and table. At
nsHTMLReflowState::InitAbsoluteConstraints we look up the containing block left
offset and not the ParentStyleContextProvider
(http://lxr.mozilla.org/seamonkey/source/layout/html/base/src/nsHTMLReflowState.cpp#1025)

As the left offset is not specified it has the value auto, at html.css we have
left:inherit for the outer-table so it should inherit the value from table but
nsHTMLReflowState.cpp the containing block is looked up.
Summary: [ABS] abs. pos. table with percent width does not honour the right: xxpx → [ABS] abs. pos. table does not honour the right: xxpx
 right:200px in the testcase is not honoured even on WIN2K. Adding testcase 
keyword.
Keywords: testcase
OS: Windows 98 → All
Priority: -- → P3
Depends on: 53663
Target Milestone: --- → Future
mass reassign to default owner
Assignee: karnaze → table
QA Contact: amar → madhur
Target Milestone: Future → ---
Target Milestone: --- → Future
This can be easily worked around with divs around the table, but it's annoying
extra markup, especially when creating right aligned menu's or RSS data dumps.
Also applies to 'fixed' positioning.
This bug looks fixed, but as you can see, the second div (blue foo) is not align
200px from the right, but less. We are almost there!
*** Bug 220906 has been marked as a duplicate of this bug. ***
Attached patch patch (obsolete) — Splinter Review
width:0 is a hack
see
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=html.css&branch=&root=/cvsroot&subdir=mozilla/layout/html/document/src&command=DIFF_FRAMESET&rev1=3.69&rev2=3.70

this comment was removed during the cleanup in revision 109 but is IMHO very
true.
What about removing the 'height: 0'?
Attached patch patchSplinter Review
This patch does not generate block size errors in the layout regression tests
(to my big surprise)
It generates however style mismatches, but thats what I would expect.
With this patch moz will render
http://www.hixie.ch/tests/adhoc/css/box/absolute/008.html correctly.
I did test the xul tree problems within a sidebar in bug 37643 and bug 37663
that led to this hack and did not see a cpu cycle eating.
Attachment #136948 - Attachment is obsolete: true
Attachment #137002 - Flags: superreview?(dbaron)
Attachment #137002 - Flags: review?(dbaron)
Attachment #137002 - Flags: superreview?(dbaron)
Attachment #137002 - Flags: superreview+
Attachment #137002 - Flags: review?(dbaron)
Attachment #137002 - Flags: review+
Is this bug fixed now? I will be very happy when this bug is fixed!

"It generates however style mismatches, but thats what I would expect."
Does this result in incorrect rendering pages?
Ger this has not checked in yet as the tree is closed. I will check it in in the
1.7alpha and bake it a little bit. If it doesn't cause regressions I will ask
for a 1.6 permission. In the meantime you can apply this patch to your local
copy of mozilla or fb by modifing the ua.css as shown in the patch.

The width of the outer table frame has changed from 0px to auto this is a
stylistic change but it doesnt create changes in the box parameters as tables
never even looked what width has been specified for the outer table frame which
is more a placeholder than a real thing.
taking care
Assignee: table → bernd_mozilla
Comment on attachment 137002 [details] [diff] [review]
patch

Sure, what can go wrong?

/be
Attachment #137002 - Flags: approval1.6? → approval1.6+
fix checked in
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
*** Bug 229088 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: