Closed Bug 108340 Opened 23 years ago Closed 23 years ago

style change gives wrong reflow type

Categories

(Core :: Layout: Tables, defect)

x86
Windows 98
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bernd_mozilla, Assigned: bernd_mozilla)

Details

(Keywords: testcase, Whiteboard: PATCH)

Attachments

(3 files, 1 obsolete file)

While working on bug 99923 , I was wondering whether we see ever 
eReflowReason_StyleChange at

if ((availCellWidth != cellFrame->GetPriorAvailWidth())           ||
            (cellDesiredSize.width > cellFrame->GetPriorAvailWidth()) ||
            (eReflowReason_StyleChange == aReflowState.reason)        ||
            isPaginated) {

nsTableRowFrame.cpp line 922.

I placed the following assertion behind this statement 
NS_ASSERTION(eReflowReason_StyleChange != aReflowState.reason, "style change 
reflow");
and tested all table and block testcases and had no hit!!! (so far for our 
testcase coverage). Then I looked up when this was introduced (bug 72181)
and I tried to create a testcase from this because it really hit the assertion.
In the first attachment the style change is applied to the table itself 
(problem) in the second the the style change is applied to the outer div (this 
works)

Using the new debug facilities (bug 109325 , thanks Chris)
in the bug case we have  

 block 0241B050 r=1 a=9180,UC c=8940,UC cnt=4779
  block 0241B514 r=1 a=8940,UC c=8940,UC cnt=4780
   tblO 02442288 r=1 a=8940,UC c=0,0 cnt=4781
    tbl 02419068 r=1 a=8940,UC c=UC,UC cnt=4782
     rowG 0241925C r=2 a=645,UC c=645,UC cnt=4783
      row 0241939C r=2 a=645,UC c=645,UC cnt=4784

while in the reference

 block 02443108 r=1 a=9180,UC c=8940,UC cnt=4819
  block 024435A0 r=1 a=8940,UC c=8940,UC cnt=4820
   text 02443644 r=3 a=8940,UC c=UC,UC cnt=4821
   text 02443644 d=0,0
   tblO 02441244 r=3 a=8940,UC c=0,0 cnt=4822
    tbl 02417FF0 r=3 a=8940,UC c=UC,UC cnt=4823
     rowG 024181E4 r=3 a=UC,UC c=UC,UC cnt=4824
      row 02418324 r=3 a=UC,UC c=UC,UC cnt=4825

The major difference between them is: in the bug case the reflow reason for tblO 
is incr_reflow!!

This looks to me like a rather serious problem, which could be the root of 
several editor - dom - table bugs.
Attached file reference testcase
Keywords: testcase
sorry the debug stuff is at bug 103925
I have a fix
Assignee: karnaze → bernd.mielke
Attached patch patch (obsolete) — Splinter Review
Comment on attachment 56490 [details] [diff] [review]
patch

r=karnaze
Attachment #56490 - Flags: review+
Comment on attachment 56490 [details] [diff] [review]
patch

sr=attinasi
Attachment #56490 - Flags: superreview+
Whiteboard: PATCH
Attachment #56490 - Attachment is obsolete: true
Comment on attachment 57426 [details] [diff] [review]
patch including also tablerowgroup- and rowframe

looks reasonable to me - sr=attinasi (karnaze will know more about the
table-specific impacts)
Attachment #57426 - Flags: superreview+
Comment on attachment 57426 [details] [diff] [review]
patch including also tablerowgroup- and rowframe

r=karnaze
Attachment #57426 - Flags: review+
fix checked in
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: