Closed Bug 98223 Opened 23 years ago Closed 18 years ago

Percentage padding-left omitted when placing Abs Pos element.

Categories

(Core :: Layout: Positioned, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: val, Assigned: MatsPalmgren_bugz)

Details

(Keywords: css2, testcase)

Attachments

(6 files)

From Bugzilla Helper:
User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD NetscapeOnline.co.uk  (Win98; I)
BuildID:    2001080110

If an Abs Pos element has an 'auto' value for 'left', then the calculated value 
for 'left' should be "the distance from the left edge of the containing block to 
the left margin edge of a hypothetical box that would have been the first box of 
the element if its 'position' property had been 'static'." [1]

(Forthcoming changes to CSS2 probably won't significantly alter this, but 
merely specify that in this case, if 'left' and 'right' are 'auto', 'left' 
should be treated as 'static-position'.)

This is being done correctly, except when the containing block has a percentage 
value for 'padding-left' (shorthand or otherwise), in which case the left 
padding is being omitted.


Reproducible: Always
Steps to Reproduce: The attached testcase illustrates this problem.


[1]<http://www.w3.org/TR/REC-CSS2/visudet.html#abs-non-replaced-width>
Keywords: css2
Keywords: testcase
Looks good enough for me to confirm.  No obvious dupes, either.

Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.5+) Gecko/20011019
Status: UNCONFIRMED → NEW
Ever confirmed: true
not table specific bug, reassigning to core owner!
Assignee: karnaze → attinasi
Target Milestone: --- → Future
Reconfirmed using FizzillaCFM/2002071208. Setting All/All.
OS: Windows 98 → All
Hardware: PC → All
.
Assignee: attinasi → position
Component: Layout → Layout: R & A Pos
QA Contact: cpetersen0953 → ian
Target Milestone: Future → ---
Attached file Testcase #2
Attached patch Patch rev. 1Splinter Review
Assignee: core.layout.r-and-a-pos → mats.palmgren
Status: NEW → ASSIGNED
Attachment #142610 - Flags: review?(bzbarsky)
Summary: Percentage padding-left omitted when placing Abs Pos element. → [FIX] Percentage padding-left omitted when placing Abs Pos element.
Attached file Another testcase
This testcase isn't fixed by that patch (since in this case the nearest block
is not the containing block but has padding).

Similar issues would arise if the containing block were a rel pos inline
sitting inside a percent-padding block.

The patch does make the specific case when the nearest block is also the
containing block and has percent padding better... I can still go ahead and
review it if you want (it looks fine), but we should really work out a way to
solve this in general...
Comment on attachment 142610 [details] [diff] [review]
Patch rev. 1

This does fix the original testcase in this bug... Like I said in comment 9,
it's not a fix in general, and I'm not sure whether we want to do the partial
wallpapering...
Attachment #142610 - Flags: review?(bzbarsky) → review+
Appears to have been fixed between 2006-12-17-04 -- 2006-12-18-04.
Possibly bug 363637.

-> WORKSFORME
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Flags: in-testsuite?
Resolution: --- → WORKSFORME
Summary: [FIX] Percentage padding-left omitted when placing Abs Pos element. → Percentage padding-left omitted when placing Abs Pos element.
Attachment #256260 - Flags: superreview?(bzbarsky)
Attachment #256260 - Flags: review?(bzbarsky)
Comment on attachment 256260 [details] [diff] [review]
Reftests derived from "Testcase #2" and "Another testcase"

Looks good.
Attachment #256260 - Flags: superreview?(bzbarsky)
Attachment #256260 - Flags: superreview+
Attachment #256260 - Flags: review?(bzbarsky)
Attachment #256260 - Flags: review+
Comment on attachment 256260 [details] [diff] [review]
Reftests derived from "Testcase #2" and "Another testcase"

Reftests checked in on trunk at 2007-02-26 22:17 PST
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: