Closed Bug 300030 (reflow-refactor) Opened 19 years ago Closed 18 years ago

Refactor intrinsic width computation out of nsIFrame::Reflow

Categories

(Core :: Layout, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: dbaron, Assigned: dbaron)

References

(Depends on 31 open bugs, Blocks 3 open bugs, Regressed 1 open bug, )

Details

(Whiteboard: [patch])

Attachments

(2 files)

This bug describes a design change that I've been talking about for a
while (see various posts to mozilla-layout).  Many bugs likely to be
fixed by this change have "[reflow-refactor]" in the Status Whiteboard.
I've been working on the changes on various REFLOW_{YYYYMMDD}_BRANCH
branches.

The basic idea to make two closely related changes at the same time:
 1. Change intrinsic width computation so that it happens in separate
    methods on nsIFrame.  (Currently preferred with calculation using
    the nsIFrame API can happen in two different ways as well:  having
    only one codepath reduces incremental layout ("{inc}") bugs.)
 2. Change the way we handle incremental layout to use dirty bits on the
    frames rather than the reflow tree (which is essentially out-of-line
    dirty bits) and a complicated system of reflow reasons that often
    leads to weird incremental layout ("{inc}") bugs.

I hope to add more details of the new design here in the near future.
Much of it is still open to change; at this point the branch is close to
compiling and probably a ways from working, so the cost of changing
things is still relatively low.
Alias: reflow-refactor
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla1.9alpha
What have you decided to do about the intrinsic width of scrollframes?
Currently, we do a full reflow of the scrolled content to see if we need a
horizontal scrollbar, which helps determine the intrinsic width.
http://wiki.mozilla.org/Gecko:Reflow_Refactoring has been around for a while; it's been in the URL field but I should mention it in a comment.
For the record, I've discussed landing plans with bzbarsky and roc, and they're comfortable with this landing without complete review.  I know bzbarsky has been looking at it a good bit (including having written almost all of the form control changes).
Attachment #247927 - Attachment is patch: false
Attachment #247927 - Attachment mime type: text/plain → application/x-gzip
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
diffstat says:
 201 files changed, 8726 insertions(+), 18253 deletions(-)

tinderbox numbers from Firefox tinderbox:

Linux argo-vm Dep Nightly:
  Z:14.08MB, Zdiff:-53276 (+57545/-110821)
balsa-trunk:
  RLk and Lk unchanged
  MH down from 13.1MB to 13.0MB
  A down from 486K to 485K
Linux bl-bldlnx01 Dep argo-vm test perf:
  Tp: 3 test mean fell from 704.3333 to 682.6667, 3%, p-value = 0.01854
  Tp2: 3 test mean fell from 530.8917 to 507.2333, 4.5%, p-value = 0.01977
  Tdhtml: 3 test mean fell from 1300.667 to 1290.667, 0.75%, p-value = 0.00748
Blocks: 348482
Blocks: 348299
Blocks: 152368
Blocks: 324318
Blocks: 61902
Blocks: 329407
Blocks: 337268
Blocks: 274556
Blocks: 277431
Blocks: 331052
Blocks: 338222
Blocks: 332978
Blocks: 282377
Blocks: 105030
Blocks: 338856
Blocks: 271924
Blocks: 336767
Blocks: 334792
Blocks: 322443
Blocks: 243302
Blocks: 257552
Blocks: 261176
Blocks: 273410
Blocks: 274794
Blocks: 274931
Blocks: 325940
Blocks: 277108
Blocks: 298883
Blocks: 304445
Blocks: 304686
Blocks: 305405
Blocks: 235593
Blocks: 218862
Blocks: 275179
Blocks: 268499
Depends on: 363240
Blocks: 336450
Blocks: 299250
Blocks: 307387
Blocks: acid2
Blocks: 313195
Depends on: 363248
Blocks: 324955
Blocks: 348516
Blocks: 328040
Blocks: 272613
Blocks: 220982
Blocks: 293676
Depends on: 363276
Depends on: 363285
Blocks: 305301
Blocks: 285832
Blocks: 299694
Blocks: 219499
Blocks: 222402
Blocks: 275345
Blocks: 195770
Blocks: 148621
Depends on: 363253
Blocks: 353566
Blocks: 223999
Blocks: 129346
Blocks: 210669
Depends on: 359769
Blocks: 185388
Blocks: 139550
Depends on: 363329
Depends on: 134706
Depends on: 225548
Depends on: 363333
Blocks: 251856
Blocks: 320196
Blocks: 267396
Blocks: 302805
Depends on: 363367
Blocks: 307763
Blocks: 313750
Depends on: 363382
Depends on: 362210
Depends on: 363388
Depends on: 363389
Depends on: 363391
Depends on: 363374
Depends on: 363423
Blocks: 97777
Depends on: 363443
Depends on: 363466
Blocks: 290743
Depends on: 363524
Depends on: 363528
Depends on: 363437
Depends on: 363154
Depends on: 363675
Depends on: 363696
Depends on: 363707
Depends on: 363722
Depends on: 363732
Depends on: 363729
Depends on: 363759
Depends on: 358729
Blocks: 358729
No longer depends on: 358729
Blocks: 363805
Depends on: 363807
No longer blocks: 363805
Depends on: 363805
Blocks: 363786
Depends on: 363858
Depends on: 363882
Depends on: 363933
Depends on: 364014
Blocks: 348991
Blocks: 331204
Blocks: 271364
Depends on: 364066
Depends on: 364079
Blocks: 292124
Blocks: 206516
Blocks: 337469
Depends on: 364220
Blocks: 231226
Blocks: 360598
Blocks: 348499
Depends on: 364314
Depends on: 364434
Depends on: 364427
Blocks: 362882
Depends on: 364510
This was some detailed pageload test data that I did on Windows a few days before the branch landed.  (I should probably try to get the equivalent out of the tinderbox logs.)  It showed that the pageload improvements varied significantly between pages.
Depends on: 364680
Depends on: 364933
Depends on: 365040
Depends on: 365208
Blocks: 253701
Depends on: 365294
Depends on: 364762
Depends on: 365478
Blocks: 337401
Blocks: 130767
Depends on: 365832
Depends on: 365837
Blocks: 244932
Blocks: 267353
Blocks: 246179
Depends on: 366112
Depends on: 366205
Depends on: 366320
Depends on: 367042
Depends on: 366952
Depends on: 367360
Depends on: 367442
Blocks: 346774
Blocks: 353140
Blocks: 340799
Blocks: 323499
Blocks: 331325
Blocks: 322512
Blocks: 292527
Blocks: 323192
Blocks: 281001
Blocks: 273681
Blocks: 338702
Depends on: 368137
Depends on: 368155
Depends on: 368199
Depends on: 368504
Depends on: 368553
Depends on: 368554
Blocks: 343510
Depends on: 368568
Depends on: 368600
Depends on: 332551
Blocks: 332551
No longer depends on: 332551
Blocks: 249982
Depends on: 368752
Depends on: 368898
Depends on: 366791
Depends on: 369850
Depends on: 370491
Depends on: 368621
Depends on: 363496
Depends on: 370525
Depends on: 370558
No longer depends on: 370491
Depends on: 370703
Depends on: 370248
Depends on: 370872
Depends on: 368603
Blocks: 124903
Depends on: 371829
Depends on: 372048
Blocks: 243266
Depends on: 372498
No longer blocks: 246179
Depends on: 373295
Depends on: 373327
Depends on: 373467
Depends on: 373533
Depends on: 373383
Depends on: 373611
Blocks: 298011
Depends on: 373960
Depends on: 374038
Depends on: 375827
Blocks: 365175
Blocks: 271747
Blocks: 260049
Blocks: 244686
Blocks: 254750
Depends on: 373400
No longer depends on: 373400
Blocks: 206212
Depends on: 377711
Blocks: 242981
Depends on: 379407
Blocks: 323886
Blocks: 189367
Blocks: 103582
Depends on: 380516
Depends on: 380861
Blocks: 271927
Blocks: 317561
Blocks: 218473
Depends on: 381783
Depends on: 382325
Depends on: 355648
Depends on: 383373
Depends on: 376944
Depends on: 385579
Depends on: 385704
Blocks: 167408
No longer depends on: 370248
Blocks: 142631
Depends on: 390875
Depends on: 391148
Blocks: 265614
Blocks: 249390
Depends on: 393490
Depends on: 393528
Blocks: 393528
No longer depends on: 393528
Depends on: 393655
Depends on: 394154
Depends on: 400171
No longer blocks: 393528
Depends on: 393528
Blocks: 265796
Depends on: 400675
Depends on: 400207
Blocks: 316057
Depends on: 402642
Depends on: 384322
Depends on: 403656
Depends on: 404123
Depends on: 410233
Blocks: 243037
Depends on: 412572
Depends on: 403669
Depends on: 413028
Depends on: 413361
Depends on: 414251
Depends on: 415166
Depends on: 416634
Depends on: 418574
Blocks: 201293
Depends on: 418766
Depends on: 422589
Depends on: 422249
Depends on: 425972
Depends on: 428278
No longer depends on: elsevier
Depends on: 430608
Depends on: 431403
Depends on: 434230
Depends on: 434626
Depends on: 442043
Depends on: 445142
Depends on: 443119
Depends on: 453967
Blocks: 295717
Blocks: 360422
Depends on: 422089
Blocks: 349004
Blocks: 348999
Depends on: 469001
Depends on: 433724
Blocks: 328257
Blocks: 157681
Depends on: 497344
Blocks: 836899
Depends on: 850015
Depends on: 979834
Depends on: 1160635
Depends on: 1165595
Depends on: 1196274
Regressions: 1547684

Since I occasionally want to find it and it takes me a few minutes to dig up, I figure it's worth noting that the in gecko-dev, the landing of this branch was 31f18988

Regressions: 1647508
You need to log in before you can comment on or make changes to this bug.