Closed Bug 271924 Opened 20 years ago Closed 18 years ago

{inc} 100% width table does not fill shrink-to-fit abs.pos. when it widens

Categories

(Core :: Layout: Tables, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: MatsPalmgren_bugz, Unassigned)

References

Details

(Keywords: regression, testcase, Whiteboard: [reflow-refactor])

Attachments

(1 file)

100% width table does not fill shrink-to-fit abs.pos. when it widens. This is a followup from bug 201897. STEPS TO REPRODUCE: 1. load the attached testcase 2. narrow the window width, then make it wider. ACTUAL RESULTS: The table does not grow to fill the available width when the window widens. EXPECTED RESULTS: Table should fill the available width. ADDITIONAL INFORMATION: When resizing the window I see this assertion: ###!!! ASSERTION: this doesn't do anything: 'NS_UNCONSTRAINEDSIZE != aReflowState.availableWidth', file nsTableFrame.cpp, line 1958 Break: at file nsTableFrame.cpp, line 1958
Attached file Testcase #1 (deleted) —
The assertion reveals a flaw in the caller of the table which asks the table to resize to an unconstrained available width. The correct way IIRC is to reflow it constrained and to use the mMaximumWidth for a new resize.
Reflow it constrained with which reflow type/command?
Resize with BRS_COMPUTEMAXWIDTH flag
Hmm... As I seem to recall, the way shrink-to-fit is done is that you reflow the thing you want to shrink-to-fit unconstrained and then based on the desired size it comes out with you decide what to do next... I guess tables are different, though. It may be worth it do just do this after reflow refactoring.
Whiteboard: [reflow-refactor]
Blocks: 201897
No longer depends on: 201897
Blocks: 275179
No longer blocks: 201897
Testcase WFM using Mozilla Suite Trunk Nightly Build 2005052105 on Windows XP.
Testcase WFM using Deer Park Alpha 2 Build 2005071612 on Windows XP. Can this bug be resolved?
Mats, the table seems to increase its size, only why does with a wide window the table occupy the available space while the div grows only until it can place the content of the div without wrapping. (Opera behaves like we, IE does not make a difference between both)
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20061208 Minefield/3.0a1 ID:2006120812 [cairo] seems fixed by reflow branch landing
Was it broken before the reflow branch landing?
The bug, as I reported it, did not occur before the reflow branch landing. FWIW, the original problem is still reproducible with http://archive.mozilla.org/pub/firefox/nightly/2004-12-05-07-trunk/ There were two other problems though - 1, making the window very wide made the table grow beyond its preferred width (always fills to the right edge) 2, when a line break occur in the DIV, the green background does not always fill the space all the way to the right edge The table and div should grow/shrink in a similar fashion. Both the above problems occur in SeaMonkey 2006120701 on Linux. They do not occur in SeaMonkey 2006120801 on Linux (and the rendering in 2006120801 is correct AFAICT). -> FIXED (by reflow branch landing)
Status: NEW → RESOLVED
Closed: 18 years ago
Depends on: reflow-refactor
Resolution: --- → FIXED
Adding in-testsuite? nomination per bz's request in m.d.t.l. Sorry for the bugspam.
Flags: in-testsuite?
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: