Commit 4355d20
Julien Chaffraix
Stop abusing RenderTableSection::needsRecalcCells logic
https://bugs.webkit.org/show_bug.cgi?id=71420
Reviewed by Darin Adler.
Source/WebCore:
Change covered by existing tests like fast/repaint/table-extra-bottom-grow.html
and fast/table/row-height-recalc* (among others).
Cell recalculation is very expensive and should only be called when the section's structure
changed in a way that requires a safe update to its structure (like removing a row as our
column split may not be appropriate anymore).
The current code would abuse cell recalculation to actually reset the logical height on the
RowStruct. This change makes it do the right thing.
* rendering/RenderTableCell.h:
* rendering/RenderTableRow.h:
Removed styleWillChange override as it was unneeded.
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::styleDidChange):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::styleDidChange):
Move the code from styleWillChange to styleDidChange.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::rowLogicalHeightChanged):
This function just reset the height on the |RowStruct| which is the
only part of recalcCells that we would need.
(WebCore::RenderTableSection::rowIndexForRenderer):
Added this function to find out which index a column has (strangely
RenderTableRow does not have this information).
* rendering/RenderTableSection.h: Added the 2 previous functions.
LayoutTests:
* platform/chromium-linux/fast/repaint/table-extra-bottom-grow-expected.png:
Update this test as this is a progression: we are not over-repainting the table
anymore.
* platform/chromium/test_expectations.txt:
* platform/efl/Skipped:
* platform/mac/Skipped:
* platform/qt/test_expectations.txt:
Skipped the test here as it needs a rebaseline.
Canonical link: https://commits.webkit.org/87802@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99212 268f45cc-cd09-0410-ab3c-d52691b4dbfc1 parent 3227c42 commit 4355d20
13 files changed
Lines changed: 97 additions & 23 deletions
File tree
- LayoutTests
- platform
- chromium-linux/fast/repaint
- chromium
- efl
- mac
- qt
- Source/WebCore
- rendering
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
1 | 18 | | |
2 | 19 | | |
3 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3886 | 3886 | | |
3887 | 3887 | | |
3888 | 3888 | | |
3889 | | - | |
| 3889 | + | |
| 3890 | + | |
| 3891 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1923 | 1923 | | |
1924 | 1924 | | |
1925 | 1925 | | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
1 | 39 | | |
2 | 40 | | |
3 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | 313 | | |
324 | 314 | | |
| 315 | + | |
| 316 | + | |
325 | 317 | | |
326 | 318 | | |
327 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
328 | 323 | | |
329 | 324 | | |
330 | 325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | 156 | | |
158 | 157 | | |
159 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 56 | | |
67 | 57 | | |
68 | 58 | | |
| |||
73 | 63 | | |
74 | 64 | | |
75 | 65 | | |
| 66 | + | |
| 67 | + | |
76 | 68 | | |
77 | 69 | | |
78 | 70 | | |
79 | 71 | | |
80 | 72 | | |
81 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
82 | 77 | | |
83 | 78 | | |
84 | 79 | | |
| |||
0 commit comments