Open Bug 227483 Opened 21 years ago Updated 2 years ago

Incorrect offset in nested absolute positioned layers using percentages

Categories

(Core :: Layout: Positioned, defect)

x86
Linux
defect

Tracking

()

People

(Reporter: dsegan, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(3 files)

User-Agent:       Mozilla 5.0 (GNU/Linuks; Galeon)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686) Gecko/0 Galeon/1.3.7

There are uncolored pixels on the mentioned page (i.e. two layers which should
be adjacent are not adjacent) when using percentages to set "width" and "left"
of absolutely positioned layers.


Reproducible: Always

Steps to Reproduce:




Simpler testcase is this:
<html><body>
<div style="height: 10pt;">
  <div style="position: absolute; height:100%; background: green; left: 0%;    
width: 33.97%;"></div>
  <div style="position: absolute; height:100%; background: blue;  left: 33.97%;
width: 22.71%;"></div>
  <div style="position: absolute; height:100%; background: red;   left: 56.68%;
width: 43.32%;"></div>
</div></body></html>

If it doesn't work for you with these percentages, check the linked page above
and see if any "graph" is showing the problem. Since resolution might be
relevant, I tested this on 1024x768 screen with approximately 92dpi (Mozilla is
set to 96dpi). The page mentioned above doesn't use the entire screen width
("position: relative" DIV to change "containing block"), but it still exhibits
the same problem.

If I remove "height: 10pt" in the parent DIV, I don't see the problem. Also, if
it's not nested in a DIV, there's no problem either.

I suspect this is either some rounding error, or usage of different algorithm in
a couple of places (width+left for one layer really adds up to left for next
layer, but they're still not adjacent).

I'm using Mozilla 1.5b compiled from source with GCC 2.95.3, but I've checked
all 117 bugs for relative and absolute positioning, and didn't find anything
related. I may try newer Mozilla releases later on, but since I'm on dial-up,
I'm looking forward to avoiding it.
Blocks: 134942
Attached file testcase
Resize a bit and you see it. This is a rounding error, but we have bugs for
this. Might be a duplicate.
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
Confirming this again as a bug in

Firefox 1.0.6
Mozilla/5.0 (X11; U; Linux i686; sr_CS; rv:1.7.10) Gecko/20050913 Epiphany/1.8.0
(Ubuntu) (Ubuntu package 1.0.6)

(tested in both Epiphany using Firefox Gecko and Firefox itself).

However, this now happens in quite a bit less common situations.  Eg. it happens
in the following two cases (attaching screenshots), yet it doesn't happen for
any browser widths in between (I think it's 4 pixels where it works ok).  So,
it's still probably a rounding problem, just the one that doesn't happen as often.
I can't reproduce a seam on either FF 2.0 of trunk; WORKSFORME?
Firefox 2008042404 on Linux: a gap appears between the red/blue area when
resizing the window at some widths.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
Assignee: layout.r-and-a-pos → nobody
QA Contact: ian → layout.r-and-a-pos
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: