Closed
Bug 610935
Opened 15 years ago
Closed 15 years ago
The display style problem of div insides a table
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla2.0b8
People
(Reporter: yli, Assigned: Ms2ger)
Details
Attachments
(1 file, 1 obsolete file)
3.43 KB,
patch
|
Details | Diff | Splinter Review |
The html code like this:
<div style="width:300px;background:yellow;height:50px;">
<table width="150%" cellspacing="0" cellpadding="0" border="0">
<tr><td style="background:blue;">parent div float=left</td></tr>
</table>
</div>
In Firefox, the max width of table is the parent div's width.
But in IE, Chrome, Safri and Opera, the width of table is larger than it's parent div.
This is a bug for Firefox?
Comment 1•15 years ago
|
||
FWIW it works if you use CSS.
Component: General → Layout: Tables
Product: Firefox → Core
QA Contact: general → layout.tables
![]() |
||
Comment 2•15 years ago
|
||
Jonas, nsAttrValue::ParseSpecialIntValue has:
1077 if (aCanBePercent && (isPercent || tmp.RFindChar('%') >= 0)) {
1078 if (val > 100) {
1079 val = 100;
1080 }
Why, exactly?
Component: Layout: Tables → DOM
QA Contact: layout.tables → general
![]() |
||
Comment 3•15 years ago
|
||
OK, this code used to live in nsHTMLValue, and before that in nsGenericHTMLElement.
The original blame is revision 1.1 of nsGenericHTMLElement.cpp:
1.1 <kipp@netscape.com> 1998-09-02 16:52
Spanked
Not helpful.
Do any other browsers do this for any %-valued attributes? If not, can we just nuke lines 1078-1080?
Seems like i just carried that forward. If other browsers don't do it we should nuke it too I agree.
![]() |
||
Comment 5•15 years ago
|
||
Tested with image width too, and the behavior is the same; no weird clamping in other browsers.
I think we should remove the clamping. Ms2ger, want to do the honors?
Assignee | ||
Comment 7•15 years ago
|
||
Attachment #489601 -
Flags: review?(bzbarsky)
Attachment #489601 -
Flags: review?(bzbarsky) → review+
Attachment #489601 -
Flags: approval2.0+
Assignee | ||
Updated•15 years ago
|
Assignee | ||
Comment 8•15 years ago
|
||
Attachment #489601 -
Attachment is obsolete: true
Comment 9•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•