If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Percentage on 'width' incorrect for replaced elements

VERIFIED DUPLICATE of bug 39901

Status

()

Core
Layout
P3
normal
VERIFIED DUPLICATE of bug 39901
18 years ago
17 years ago

People

(Reporter: bert, Assigned: Chris Waterson)

Tracking

({css2, regression})

Trunk
css2, regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

18 years ago
The CSS rule

img { width: 100% }

doesn't make the image as wide as the parent element,
but has the same effect as 'width: auto'. It appears that
the percentage is (erroneously) computed relative to the
intrinsic size, rather than the parent's size.

Here is a test page:

http://www.w3.org/Style/Examples/005/width-test.html

(See http://www.w3.org/TR/REC-CSS2/visudet.html#propdef-width)
Confirmed in Mac 2000070311 build.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 2

18 years ago
This is a regression introduced by Buster on May 13 21:46 in layout/html/base/
src/nsHTMLImageLoader.cpp version 1.25 in order to fix bug 38396. If you remove 
the additional test on line 277, it works.

Reassigned to Waterson.
Assignee: pierre → waterson
Component: Style System → Layout
Keywords: css2, regression
OS: Linux → All
Hardware: PC → All
(Assignee)

Updated

17 years ago
Status: NEW → ASSIGNED
Keywords: correctness, nsbeta3
Target Milestone: --- → M18
Er... buster basically just turned % widths off.  There's another bug on this.

*** This bug has been marked as a duplicate of 39901 ***
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → DUPLICATE
For images, that is.

Comment 5

17 years ago
Marking VERIFIED DUPLICATE.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.