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

Dynamic changes to table-layout property have no visible effect

RESOLVED FIXED

Status

()

Core
Layout: Tables
--
minor
RESOLVED FIXED
11 years ago
10 years ago

People

(Reporter: Jesse Ruderman, Assigned: dbaron)

Tracking

({testcase})

Trunk
testcase
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

11 years ago
Created attachment 251941 [details]
testcase

Steps to reproduce:
1. Click the first button in the testcase.
2. Click the second button in the testcase.

Expected: layout changes after step 1 (only)

Result: layout changes after step 2 (only)
(Reporter)

Comment 1

10 years ago
I still see this bug on trunk.
(Reporter)

Comment 2

10 years ago
The testcase above doesn't show the bug on current trunk due to a change in bug 368600 that made "table-layout: fixed" be ignored if the table's width is "auto".  (This might get reverted; see bug 400776.)

I'll attach a new testcase that does demonstrate this bug on trunk.
(Reporter)

Comment 3

10 years ago
Created attachment 301589 [details]
testcase 2
Attachment #251941 - Attachment is obsolete: true
I see this on Linux as well, with FF 3.0b2. (using 'testcase 2')
  OS / Platform --> All.
OS: Mac OS X → All
Hardware: Macintosh → All
nsStyleTable::CalcDifference returns NS_STYLE_HINT_REFLOW for mLayoutStrategy differences.

I think we either:

 (1) need to make nsTableFrame::MarkIntrinsicWidthsDirty check that the layout strategy is still the correct type (which may involve a little other work to initialize it correctly), or

 (2) return a framechange hint instead of reflow.

Comment 6

10 years ago
I prefer the framechange hint as we keep the layout strategy as a overloaded member variable that triggers very different functions to be loaded. 
Created attachment 301635 [details] [diff] [review]
patch

Well, that's simple enough.  I haven't tested this; I'll do so tomorrow.
Assignee: nobody → dbaron
Status: NEW → ASSIGNED
Comment on attachment 301635 [details] [diff] [review]
patch

Trivial patch to change the style hint for nsStyleTable::mLayoutStrategy changes to NS_STYLE_HINT_FRAMECHANGE.
Attachment #301635 - Flags: superreview?(bzbarsky)
Attachment #301635 - Flags: review?(bzbarsky)
Comment on attachment 301635 [details] [diff] [review]
patch

Looks good.
Attachment #301635 - Flags: superreview?(bzbarsky)
Attachment #301635 - Flags: superreview+
Attachment #301635 - Flags: review?(bzbarsky)
Attachment #301635 - Flags: review+
Comment on attachment 301635 [details] [diff] [review]
patch

Trivial patch; very low risk.
Attachment #301635 - Flags: approval1.9?

Updated

10 years ago
Attachment #301635 - Flags: approval1.9? → approval1.9+
Checked in to trunk, 2008-02-08 11:56 -0800.
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
(Reporter)

Comment 12

10 years ago
I checked in two reftests, one for fixed->auto and one for auto->fixed.
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.