From 38e74af0e552ae8ed393565de552720bb36bb000 Mon Sep 17 00:00:00 2001 From: "jchaffraix@webkit.org" Date: Fri, 23 Sep 2011 19:56:21 +0000 Subject: [PATCH] Redrawing dirty parts of a large table is very slow https://bugs.webkit.org/show_bug.cgi?id=64546 Patch by Konstantin Scheglov on 2011-09-23 Reviewed by David Hyatt. Source/WebCore: Move CollapsedBorderValues into RenderTable.h. Calculate collapsed borders only once and re-use during paintObject(). Invalidate cache when cell, row, row group, col, col group or table border is changed. Tests: fast/table/border-collapsing/cached-cell-append.html fast/table/border-collapsing/cached-cell-remove.html fast/table/border-collapsing/cached-change-cell-border-color.html fast/table/border-collapsing/cached-change-cell-border-width.html fast/table/border-collapsing/cached-change-col-border-color.html fast/table/border-collapsing/cached-change-col-border-width.html fast/table/border-collapsing/cached-change-colgroup-border-color.html fast/table/border-collapsing/cached-change-colgroup-border-width.html fast/table/border-collapsing/cached-change-row-border-color.html fast/table/border-collapsing/cached-change-row-border-width.html fast/table/border-collapsing/cached-change-table-border-color.html fast/table/border-collapsing/cached-change-table-border-width.html fast/table/border-collapsing/cached-change-tbody-border-color.html fast/table/border-collapsing/cached-change-tbody-border-width.html * rendering/RenderTable.cpp: (WebCore::RenderTable::RenderTable): (WebCore::RenderTable::styleDidChange): Invalidate cache on border change. (WebCore::RenderTable::layout): Invalidate cache if layout changed. (WebCore::RenderTable::recalcCollapsedBorders): Ensures that cache is valid. (WebCore::RenderTable::paintObject): Use cached collapsed borders. * rendering/RenderTable.h: (WebCore::RenderTable::invalidateCollapsedBorders): Accessor to mark cache invalid. (WebCore::RenderTable::currentBorderValue): Rename to use word "value". * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::styleDidChange): If border changed, invalidate cache. Rename to use word "value". (WebCore::addBorderStyle): (WebCore::RenderTableCell::collectBorderValues): (WebCore::compareBorderValuesForQSort): (WebCore::RenderTableCell::sortBorderValues): (WebCore::RenderTableCell::paintCollapsedBorder): * rendering/RenderTableCell.h: If border changed, invalidate cache. * rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::styleDidChange): * rendering/RenderTableCol.h: * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::styleDidChange): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::styleDidChange): LayoutTests: Tests for invalidating collapsed borders cache. * fast/table/border-collapsing/cached-cell-append-expected.png: Added. * fast/table/border-collapsing/cached-cell-append-expected.txt: Added. * fast/table/border-collapsing/cached-cell-append.html: Added. * fast/table/border-collapsing/cached-cell-remove-expected.png: Added. * fast/table/border-collapsing/cached-cell-remove-expected.txt: Added. * fast/table/border-collapsing/cached-cell-remove.html: Added. * fast/table/border-collapsing/cached-change-cell-border-color-expected.png: Added. * fast/table/border-collapsing/cached-change-cell-border-color-expected.txt: Added. * fast/table/border-collapsing/cached-change-cell-border-color.html: Added. * fast/table/border-collapsing/cached-change-cell-border-width-expected.png: Added. * fast/table/border-collapsing/cached-change-cell-border-width-expected.txt: Added. * fast/table/border-collapsing/cached-change-cell-border-width.html: Added. * fast/table/border-collapsing/cached-change-col-border-color-expected.png: Added. * fast/table/border-collapsing/cached-change-col-border-color-expected.txt: Added. * fast/table/border-collapsing/cached-change-col-border-color.html: Added. * fast/table/border-collapsing/cached-change-col-border-width-expected.png: Added. * fast/table/border-collapsing/cached-change-col-border-width-expected.txt: Added. * fast/table/border-collapsing/cached-change-col-border-width.html: Added. * fast/table/border-collapsing/cached-change-colgroup-border-color-expected.png: Added. * fast/table/border-collapsing/cached-change-colgroup-border-color-expected.txt: Added. * fast/table/border-collapsing/cached-change-colgroup-border-color.html: Added. * fast/table/border-collapsing/cached-change-colgroup-border-width-expected.png: Added. * fast/table/border-collapsing/cached-change-colgroup-border-width-expected.txt: Added. * fast/table/border-collapsing/cached-change-colgroup-border-width.html: Added. * fast/table/border-collapsing/cached-change-row-border-color-expected.png: Added. * fast/table/border-collapsing/cached-change-row-border-color-expected.txt: Added. * fast/table/border-collapsing/cached-change-row-border-color.html: Added. * fast/table/border-collapsing/cached-change-row-border-width-expected.png: Added. * fast/table/border-collapsing/cached-change-row-border-width-expected.txt: Added. * fast/table/border-collapsing/cached-change-row-border-width.html: Added. * fast/table/border-collapsing/cached-change-table-border-color-expected.png: Added. * fast/table/border-collapsing/cached-change-table-border-color-expected.txt: Added. * fast/table/border-collapsing/cached-change-table-border-color.html: Added. * fast/table/border-collapsing/cached-change-table-border-width-expected.png: Added. * fast/table/border-collapsing/cached-change-table-border-width-expected.txt: Added. * fast/table/border-collapsing/cached-change-table-border-width.html: Added. * fast/table/border-collapsing/cached-change-tbody-border-color-expected.png: Added. * fast/table/border-collapsing/cached-change-tbody-border-color-expected.txt: Added. * fast/table/border-collapsing/cached-change-tbody-border-color.html: Added. * fast/table/border-collapsing/cached-change-tbody-border-width-expected.png: Added. * fast/table/border-collapsing/cached-change-tbody-border-width-expected.txt: Added. * fast/table/border-collapsing/cached-change-tbody-border-width.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95852 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/ChangeLog | 52 +++++++++++++++++++ .../cached-cell-append-expected.png | Bin 0 -> 2927 bytes .../cached-cell-append-expected.txt | 10 ++++ .../border-collapsing/cached-cell-append.html | 30 +++++++++++ .../cached-cell-remove-expected.png | Bin 0 -> 2924 bytes .../cached-cell-remove-expected.txt | 10 ++++ .../border-collapsing/cached-cell-remove.html | 29 +++++++++++ .../cached-change-cell-border-color-expected.png | Bin 0 -> 2916 bytes .../cached-change-cell-border-color-expected.txt | 10 ++++ .../cached-change-cell-border-color.html | 27 ++++++++++ .../cached-change-cell-border-width-expected.png | Bin 0 -> 2936 bytes .../cached-change-cell-border-width-expected.txt | 10 ++++ .../cached-change-cell-border-width.html | 27 ++++++++++ ...cached-change-cell-sl-border-color-expected.png | Bin 0 -> 2946 bytes ...cached-change-cell-sl-border-color-expected.txt | 13 +++++ .../cached-change-cell-sl-border-color.html | 34 +++++++++++++ .../cached-change-col-border-color-expected.png | Bin 0 -> 2938 bytes .../cached-change-col-border-color-expected.txt | 16 ++++++ .../cached-change-col-border-color.html | 37 ++++++++++++++ .../cached-change-col-border-width-expected.png | Bin 0 -> 2936 bytes .../cached-change-col-border-width-expected.txt | 16 ++++++ .../cached-change-col-border-width.html | 37 ++++++++++++++ ...ached-change-colgroup-border-color-expected.png | Bin 0 -> 2967 bytes ...ached-change-colgroup-border-color-expected.txt | 20 ++++++++ .../cached-change-colgroup-border-color.html | 42 ++++++++++++++++ ...ached-change-colgroup-border-width-expected.png | Bin 0 -> 2952 bytes ...ached-change-colgroup-border-width-expected.txt | 20 ++++++++ .../cached-change-colgroup-border-width.html | 42 ++++++++++++++++ .../cached-change-row-border-color-expected.png | Bin 0 -> 2911 bytes .../cached-change-row-border-color-expected.txt | 11 +++++ .../cached-change-row-border-color.html | 29 +++++++++++ .../cached-change-row-border-width-expected.png | Bin 0 -> 2922 bytes .../cached-change-row-border-width-expected.txt | 11 +++++ .../cached-change-row-border-width.html | 29 +++++++++++ .../cached-change-table-border-color-expected.png | Bin 0 -> 2884 bytes .../cached-change-table-border-color-expected.txt | 9 ++++ .../cached-change-table-border-color.html | 26 ++++++++++ .../cached-change-table-border-width-expected.png | Bin 0 -> 2888 bytes .../cached-change-table-border-width-expected.txt | 9 ++++ .../cached-change-table-border-width.html | 26 ++++++++++ .../cached-change-tbody-border-color-expected.png | Bin 0 -> 2969 bytes .../cached-change-tbody-border-color-expected.txt | 17 +++++++ .../cached-change-tbody-border-color.html | 39 +++++++++++++++ .../cached-change-tbody-border-width-expected.png | Bin 0 -> 2942 bytes .../cached-change-tbody-border-width-expected.txt | 17 +++++++ .../cached-change-tbody-border-width.html | 39 +++++++++++++++ .../table/border-collapsing/resources/cached.css | 14 ++++++ Source/WebCore/ChangeLog | 55 +++++++++++++++++++++ Source/WebCore/rendering/RenderTable.cpp | 43 +++++++++++----- Source/WebCore/rendering/RenderTable.h | 13 ++++- Source/WebCore/rendering/RenderTableCell.cpp | 38 ++++++++------ Source/WebCore/rendering/RenderTableCell.h | 5 +- Source/WebCore/rendering/RenderTableCol.cpp | 12 +++++ Source/WebCore/rendering/RenderTableCol.h | 2 + Source/WebCore/rendering/RenderTableRow.cpp | 7 +++ Source/WebCore/rendering/RenderTableSection.cpp | 5 ++ 56 files changed, 905 insertions(+), 33 deletions(-) create mode 100644 LayoutTests/fast/table/border-collapsing/cached-cell-append-expected.png create mode 100644 LayoutTests/fast/table/border-collapsing/cached-cell-append-expected.txt create mode 100644 LayoutTests/fast/table/border-collapsing/cached-cell-append.html create mode 100644 LayoutTests/fast/table/border-collapsing/cached-cell-remove-expected.png create mode 100644 LayoutTests/fast/table/border-collapsing/cached-cell-remove-expected.txt create mode 100644 LayoutTests/fast/table/border-collapsing/cached-cell-remove.html create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-cell-border-color-expected.png create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-cell-border-color-expected.txt create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-cell-border-color.html create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-cell-border-width-expected.png create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-cell-border-width-expected.txt create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-cell-border-width.html create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-cell-sl-border-color-expected.png create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-cell-sl-border-color-expected.txt create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-cell-sl-border-color.html create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-col-border-color-expected.png create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-col-border-color-expected.txt create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-col-border-color.html create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-col-border-width-expected.png create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-col-border-width-expected.txt create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-col-border-width.html create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-color-expected.png create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-color-expected.txt create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-color.html create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-width-expected.png create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-width-expected.txt create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-width.html create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-row-border-color-expected.png create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-row-border-color-expected.txt create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-row-border-color.html create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-row-border-width-expected.png create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-row-border-width-expected.txt create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-row-border-width.html create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-table-border-color-expected.png create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-table-border-color-expected.txt create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-table-border-color.html create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-table-border-width-expected.png create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-table-border-width-expected.txt create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-table-border-width.html create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-color-expected.png create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-color-expected.txt create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-color.html create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-width-expected.png create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-width-expected.txt create mode 100644 LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-width.html create mode 100644 LayoutTests/fast/table/border-collapsing/resources/cached.css diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 8f4ee23..33b3c7e 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,55 @@ +2011-09-23 Konstantin Scheglov + + Redrawing dirty parts of a large table is very slow + https://bugs.webkit.org/show_bug.cgi?id=64546 + + Reviewed by David Hyatt. + + Tests for invalidating collapsed borders cache. + + * fast/table/border-collapsing/cached-cell-append-expected.png: Added. + * fast/table/border-collapsing/cached-cell-append-expected.txt: Added. + * fast/table/border-collapsing/cached-cell-append.html: Added. + * fast/table/border-collapsing/cached-cell-remove-expected.png: Added. + * fast/table/border-collapsing/cached-cell-remove-expected.txt: Added. + * fast/table/border-collapsing/cached-cell-remove.html: Added. + * fast/table/border-collapsing/cached-change-cell-border-color-expected.png: Added. + * fast/table/border-collapsing/cached-change-cell-border-color-expected.txt: Added. + * fast/table/border-collapsing/cached-change-cell-border-color.html: Added. + * fast/table/border-collapsing/cached-change-cell-border-width-expected.png: Added. + * fast/table/border-collapsing/cached-change-cell-border-width-expected.txt: Added. + * fast/table/border-collapsing/cached-change-cell-border-width.html: Added. + * fast/table/border-collapsing/cached-change-col-border-color-expected.png: Added. + * fast/table/border-collapsing/cached-change-col-border-color-expected.txt: Added. + * fast/table/border-collapsing/cached-change-col-border-color.html: Added. + * fast/table/border-collapsing/cached-change-col-border-width-expected.png: Added. + * fast/table/border-collapsing/cached-change-col-border-width-expected.txt: Added. + * fast/table/border-collapsing/cached-change-col-border-width.html: Added. + * fast/table/border-collapsing/cached-change-colgroup-border-color-expected.png: Added. + * fast/table/border-collapsing/cached-change-colgroup-border-color-expected.txt: Added. + * fast/table/border-collapsing/cached-change-colgroup-border-color.html: Added. + * fast/table/border-collapsing/cached-change-colgroup-border-width-expected.png: Added. + * fast/table/border-collapsing/cached-change-colgroup-border-width-expected.txt: Added. + * fast/table/border-collapsing/cached-change-colgroup-border-width.html: Added. + * fast/table/border-collapsing/cached-change-row-border-color-expected.png: Added. + * fast/table/border-collapsing/cached-change-row-border-color-expected.txt: Added. + * fast/table/border-collapsing/cached-change-row-border-color.html: Added. + * fast/table/border-collapsing/cached-change-row-border-width-expected.png: Added. + * fast/table/border-collapsing/cached-change-row-border-width-expected.txt: Added. + * fast/table/border-collapsing/cached-change-row-border-width.html: Added. + * fast/table/border-collapsing/cached-change-table-border-color-expected.png: Added. + * fast/table/border-collapsing/cached-change-table-border-color-expected.txt: Added. + * fast/table/border-collapsing/cached-change-table-border-color.html: Added. + * fast/table/border-collapsing/cached-change-table-border-width-expected.png: Added. + * fast/table/border-collapsing/cached-change-table-border-width-expected.txt: Added. + * fast/table/border-collapsing/cached-change-table-border-width.html: Added. + * fast/table/border-collapsing/cached-change-tbody-border-color-expected.png: Added. + * fast/table/border-collapsing/cached-change-tbody-border-color-expected.txt: Added. + * fast/table/border-collapsing/cached-change-tbody-border-color.html: Added. + * fast/table/border-collapsing/cached-change-tbody-border-width-expected.png: Added. + * fast/table/border-collapsing/cached-change-tbody-border-width-expected.txt: Added. + * fast/table/border-collapsing/cached-change-tbody-border-width.html: Added. + 2011-09-23 Jochen Eisinger Clarify wording in cross origin XSL tests and enable on all platforms diff --git a/LayoutTests/fast/table/border-collapsing/cached-cell-append-expected.png b/LayoutTests/fast/table/border-collapsing/cached-cell-append-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..21b49d88ff299bd108b52f48f08148c55f079c04 GIT binary patch literal 2927 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i0*Z)=h^hlA%@Ws$lH`okD+sjv*Cu-rh3IJ8U4p z;As3oeyRGe>8F?6N^gZ7oy718{R{!MN+oTy7=FVTu&cG1Sdw_|dgHwm0VFm`{ z#^0B3AAgkC{_*_cJr67@%_rC1UoXeVP_h1M+=gQ_{xUF}j@I44z@YcN#`VX}zE1O& zdFvS-c+cTllYCEpwh1?bfvmO@Hghp;8vG(R{+@AvYKOH1YL4cgzJCtbf@bh^^>bP0l+XkKhZKz= literal 0 HcmV?d00001 diff --git a/LayoutTests/fast/table/border-collapsing/cached-cell-append-expected.txt b/LayoutTests/fast/table/border-collapsing/cached-cell-append-expected.txt new file mode 100644 index 0000000..36d3ed1 --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-cell-append-expected.txt @@ -0,0 +1,10 @@ +layer at (0,0) size 800x600 + RenderView at (0,0) size 800x600 +layer at (0,0) size 800x600 + RenderBlock {HTML} at (0,0) size 800x600 + RenderBody {BODY} at (8,8) size 784x584 + RenderTable {TABLE} at (0,0) size 115x54 [border: (2px solid #0000FF)] + RenderTableSection {TBODY} at (2,2) size 112x50 + RenderTableRow {TR} at (0,0) size 112x50 + RenderTableCell {TD} at (0,22) size 56x6 [border: (2px solid #00FF00)] [r=0 c=0 rs=1 cs=1] + RenderTableCell {TD} at (56,23) size 56x4 [border: (1px none #000000) (3px solid #FFFF00)] [r=0 c=1 rs=1 cs=1] diff --git a/LayoutTests/fast/table/border-collapsing/cached-cell-append.html b/LayoutTests/fast/table/border-collapsing/cached-cell-append.html new file mode 100644 index 0000000..fcd29f9 --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-cell-append.html @@ -0,0 +1,30 @@ + + + + + + + + + + + +
+
+ + + diff --git a/LayoutTests/fast/table/border-collapsing/cached-cell-remove-expected.png b/LayoutTests/fast/table/border-collapsing/cached-cell-remove-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..df561beb7db2ae193484ed5af0cca462fdc7af0d GIT binary patch literal 2924 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i0*Z)=h^hlA%@Ws$lH`ok;s77q2yCV0cj@W6QwsAdf|i!NDhik>Lm?LvDRt zMV;OMqT}b^CfipXs?E7w_JxIE$A;;RrIy8VdmmWuW@2ghf3Q=4L7{BE_!{H={B!@8 z@-lGj6^&T_cTXnYQznKveZq=3&BwHHP>a0zcy9i)8TTjt42F%Yqm0o&7)=SIxnMLGjOK#T kTripoMsooTa=~vV{uJSpe4LSSz~(c9r>mdKI;Vst0M7u@r~m)} literal 0 HcmV?d00001 diff --git a/LayoutTests/fast/table/border-collapsing/cached-cell-remove-expected.txt b/LayoutTests/fast/table/border-collapsing/cached-cell-remove-expected.txt new file mode 100644 index 0000000..9dddee3 --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-cell-remove-expected.txt @@ -0,0 +1,10 @@ +layer at (0,0) size 800x600 + RenderView at (0,0) size 800x600 +layer at (0,0) size 800x600 + RenderBlock {HTML} at (0,0) size 800x600 + RenderBody {BODY} at (8,8) size 784x584 + RenderTable {TABLE} at (0,0) size 113x54 [border: (2px solid #0000FF)] + RenderTableSection {TBODY} at (2,2) size 110x50 + RenderTableRow {TR} at (0,0) size 110x50 + RenderTableCell {TD} at (0,22) size 55x6 [border: (2px solid #00FF00)] [r=0 c=0 rs=1 cs=1] + RenderTableCell {TD} at (55,23) size 55x4 [border: (1px none #000000)] [r=0 c=1 rs=1 cs=1] diff --git a/LayoutTests/fast/table/border-collapsing/cached-cell-remove.html b/LayoutTests/fast/table/border-collapsing/cached-cell-remove.html new file mode 100644 index 0000000..8489cf9 --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-cell-remove.html @@ -0,0 +1,29 @@ + + + + + + + + + + + +
+ + +
+ + + diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-color-expected.png b/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-color-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..3dda69f7e834301849590a091f5391231214f7b1 GIT binary patch literal 2916 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i0*Z)=h^hlA%@Ws$lH`ok#1EWN9Q`6)W69WsQ6vL!M%alZmM9Yx**>@NixW0M1IEGZrd3(n&@34UY zgQL+0`I+i&>r1l4*;*20Pk!>z77f>X$8c`zH3o(SpG&_0?Fm=jz`&5i#Lb|fhQTPS z{+9Ur=D*^;Bfq{a6K5#cv%K+Z-?q!<3&Ud>9|&6rGBF&{+j`LIbKQ$Sw@n!qY|`HF z?(x4@mj814D!*_rF!0aeV8mrKre%X$WV@~XS;Kf+c7_9~Z@AW!Z_IV~XJB~X!oe_M z_Z7D6wTppKCXuWc%EU0CNQs4^gHwm0Va5TbQO0N>jHZOqTripoMsvYvE*Q-Pqq%?v cx!^BT${)d#XE%k50-Li8p00i_>zopr0L@A~)&Kwi literal 0 HcmV?d00001 diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-color-expected.txt b/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-color-expected.txt new file mode 100644 index 0000000..30d2e33 --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-color-expected.txt @@ -0,0 +1,10 @@ +layer at (0,0) size 800x600 + RenderView at (0,0) size 800x600 +layer at (0,0) size 800x600 + RenderBlock {HTML} at (0,0) size 800x600 + RenderBody {BODY} at (8,8) size 784x584 + RenderTable {TABLE} at (0,0) size 114x54 [border: (2px solid #0000FF)] + RenderTableSection {TBODY} at (2,2) size 111x50 + RenderTableRow {TR} at (0,0) size 111x50 + RenderTableCell {TD} at (0,22) size 56x6 [border: (2px solid #00FF00)] [r=0 c=0 rs=1 cs=1] + RenderTableCell {TD} at (56,23) size 55x4 [border: (1px solid #000000)] [r=0 c=1 rs=1 cs=1] diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-color.html b/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-color.html new file mode 100644 index 0000000..797c81d --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-color.html @@ -0,0 +1,27 @@ + + + + + + + + + + + +
+ +
+ + + diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-width-expected.png b/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-width-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..96d398aa28d91b8bcec3be60cd01fea71f3d5d56 GIT binary patch literal 2936 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i0*Z)=h^hlA%@Ws$lH`oka|`3-q(pP$lvGm_3rmYM!z8n$G>fDpBjbXaS34OPxVb!C978JRyuEcW_ppHg zgQHPFe^KYVpv(h|Jt@g2ukid3`my7=)A60Tw;31~d@lV0v}d(o1OtO%BP)Y|FfwD~ z?aS-?k3T+J9CPq*oqZJx!vooQ?AIic`+lCY{Ff*H`=T-fL(j%bT?OYh%QHMsy2h!) z&@lN&q3e&rZ^HQ;fA=vpcvos}@cX^z + + + + + + + + + + +
+ +
+ + + diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-cell-sl-border-color-expected.png b/LayoutTests/fast/table/border-collapsing/cached-change-cell-sl-border-color-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..2f8de1942ac9788f7988b4fc02d4ace7063cc4ee GIT binary patch literal 2946 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i0*Z)=h^hlA%@Ws$lH`ok~aEo}lIEGZrd3)E<@34aa z!@<}i@^95Ah0n4MQc&WZZ4vtE?6k5zU4N1DxwqLE80K!j%FMtpr}qF8LkFi0L&FRV z#*N=wrKk6wu0J=?;@HLyUuy4*&*NjT>090SwdYxk?Lq%PtF;;SFljq6G~8HuFF{t@ zyyfw4-iJ?rnyq6vpnq2+BD?0Fs&e0{8-w>Aw3=48F719eILLP9-hL&?z~FbZOMu#LrMl-w4Wwd98V$_Rz@%>3G@7DD nQ`BgR8qEcxxqz5l@QqXIiKeCz! + + + + + + + + + + +
+ +
A
+
+ + + \ No newline at end of file diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-col-border-color-expected.png b/LayoutTests/fast/table/border-collapsing/cached-change-col-border-color-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..dadbdcf66f734fe0d54711bff03638cfba2fcd72 GIT binary patch literal 2938 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i0*Z)=h^hlA%@Ws$lH`okblSDIPGgBiI6C+bIlceM%ps0nBp;4-#;az6f;L`-Fo)#dEbb9GmfrkwNd#OZ`LsTYUet2P7~aD1F1T zrt|dEWibp5JLkL-S7bQA!y?Au;FG|}aAe3ca&CUUxT81x{>S{=7ugvY{v?6I;ce80 zZ7a(cRbDq`crZ&Rf`P%Xk(EI}cvvu^ztx(>RkJc2=#1FFz>s7uzUI6EPcFj&7Qd|t zxwo(IGZY9W$6jBY&%j_YHCPwuWn+P1;qT!Qd!xP>HW_g=Do3MoI8`j8>3K9g(>gu> aX0&}+b!z7^lVo6Hn!(f6&t;ucLK6Vt8{``R literal 0 HcmV?d00001 diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-col-border-color-expected.txt b/LayoutTests/fast/table/border-collapsing/cached-change-col-border-color-expected.txt new file mode 100644 index 0000000..304fa87 --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-change-col-border-color-expected.txt @@ -0,0 +1,16 @@ +layer at (0,0) size 800x600 + RenderView at (0,0) size 800x600 +layer at (0,0) size 800x600 + RenderBlock {HTML} at (0,0) size 800x600 + RenderBody {BODY} at (8,8) size 784x584 + RenderTable {TABLE} at (0,0) size 113x104 [border: (2px solid #0000FF)] + RenderTableCol {COLGROUP} at (0,0) size 0x0 + RenderTableCol {COL} at (0,0) size 0x0 [border: (4px solid #FFFF00)] + RenderTableCol {COL} at (0,0) size 0x0 + RenderTableSection {TBODY} at (2,2) size 110x100 + RenderTableRow {TR} at (0,0) size 110x50 + RenderTableCell {TD} at (0,22) size 56x5 [border: (2px solid #00FF00)] [r=0 c=0 rs=1 cs=1] + RenderTableCell {TD} at (56,23) size 54x3 [border: (1px none #000000)] [r=0 c=1 rs=1 cs=1] + RenderTableRow {TR} at (0,50) size 110x50 + RenderTableCell {TD} at (0,72) size 56x5 [border: (1px none #000000)] [r=1 c=0 rs=1 cs=1] + RenderTableCell {TD} at (56,74) size 54x2 [border: none] [r=1 c=1 rs=1 cs=1] diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-col-border-color.html b/LayoutTests/fast/table/border-collapsing/cached-change-col-border-color.html new file mode 100644 index 0000000..481e9d0 --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-change-col-border-color.html @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ + + diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-col-border-width-expected.png b/LayoutTests/fast/table/border-collapsing/cached-change-col-border-width-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..f8b4a9fd02ec67ab6b7f7d9f402dde04d28dc619 GIT binary patch literal 2936 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i0*Z)=h^hlA%@Ws$lH`okOQS?Hv&1yR#Kh#(R8!-m6jL+HWW%K#?{pX#xVb!C978JRyuIm|cgR76 z)luzH-?NSaujfpTn;K#I)n;4nZU%-6KdpWi0id|Gr^nV5mzu2n;mY zs14sduP>4;Hw6a27=wdP0wco_mSMqIcic{T{az-91VwO!A7srgJA8zV!6$hlYxe!; zwG0jZ#@lkOf3q<(EY;Zr^!6F&;p6w=5rdgTe~DWM4fKC^UN literal 0 HcmV?d00001 diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-col-border-width-expected.txt b/LayoutTests/fast/table/border-collapsing/cached-change-col-border-width-expected.txt new file mode 100644 index 0000000..fd38e18 --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-change-col-border-width-expected.txt @@ -0,0 +1,16 @@ +layer at (0,0) size 800x600 + RenderView at (0,0) size 800x600 +layer at (0,0) size 800x600 + RenderBlock {HTML} at (0,0) size 800x600 + RenderBody {BODY} at (8,8) size 784x584 + RenderTable {TABLE} at (0,0) size 110x104 [border: (2px solid #0000FF)] + RenderTableCol {COLGROUP} at (0,0) size 0x0 + RenderTableCol {COL} at (0,0) size 0x0 [border: (4px solid #FFFF00)] + RenderTableCol {COL} at (0,0) size 0x0 + RenderTableSection {TBODY} at (2,2) size 107x100 + RenderTableRow {TR} at (0,0) size 107x50 + RenderTableCell {TD} at (0,23) size 54x4 [border: (2px solid #00FF00)] [r=0 c=0 rs=1 cs=1] + RenderTableCell {TD} at (54,23) size 53x3 [border: (1px none #000000)] [r=0 c=1 rs=1 cs=1] + RenderTableRow {TR} at (0,50) size 107x50 + RenderTableCell {TD} at (0,73) size 54x3 [border: (1px none #000000)] [r=1 c=0 rs=1 cs=1] + RenderTableCell {TD} at (54,74) size 53x2 [border: none] [r=1 c=1 rs=1 cs=1] diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-col-border-width.html b/LayoutTests/fast/table/border-collapsing/cached-change-col-border-width.html new file mode 100644 index 0000000..1602c27 --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-change-col-border-width.html @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ + + diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-color-expected.png b/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-color-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..91beb02d886949bf98d3e1482058d4be1e8c2540 GIT binary patch literal 2967 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i0*Z)=h^hlA%@Ws$lH`ok z%S3ZyBZJf=Q*$E|%f!UQWD_F`BO^-#^OTh2G=rJqm!C5*aBF(HIEGZrd3(#z>u`XC z+r{rov;|_Kce#95Sm#l|UC68}wo^^jvc1oV?f!>P%ZnqYF)}zjPkqnGz~HXDfq@~3 ziJL(|4TUlNcK`l;+vgVY<*%>SXJFV?puXW)#s5DyijG^ZspjADwrcM?TSf-Hqw0s= zp82`No?$`h_a@i8+EdKa4lp&`QEvP?CD!1WL~@_yv55H<4<&xFGWZ==cVcLmae#@T zgHvZXFk0w6Xlz{`CwD76RfRuClm} z)MZTphI5H}r;8qcy#D=}x8H-erSDl84v4*r*|3Cx;XwRPelZ3Ip9DsRBP^qg(LfkY s38T4SG#8BKg3(+snhORl7t}HQog&uc!=2U#Y-uxiy85}Sb4q9e06}uI!vFvP literal 0 HcmV?d00001 diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-color-expected.txt b/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-color-expected.txt new file mode 100644 index 0000000..035c63e --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-color-expected.txt @@ -0,0 +1,20 @@ +layer at (0,0) size 800x600 + RenderView at (0,0) size 800x600 +layer at (0,0) size 800x600 + RenderBlock {HTML} at (0,0) size 800x600 + RenderBody {BODY} at (8,8) size 784x584 + RenderTable {TABLE} at (0,0) size 164x102 [border: (1px solid #0000FF)] + RenderTableCol {COLGROUP} at (0,0) size 0x0 [border: (4px solid #FFFF00)] + RenderTableCol {COL} at (0,0) size 0x0 + RenderTableCol {COL} at (0,0) size 0x0 + RenderTableCol {COLGROUP} at (0,0) size 0x0 + RenderTableCol {COL} at (0,0) size 0x0 + RenderTableSection {TBODY} at (1,1) size 162x100 + RenderTableRow {TR} at (0,0) size 162x50 + RenderTableCell {TD} at (0,22) size 55x5 [border: (2px solid #00FF00)] [r=0 c=0 rs=1 cs=1] + RenderTableCell {TD} at (55,23) size 55x4 [border: (2px none #000000)] [r=0 c=1 rs=1 cs=1] + RenderTableCell {TD} at (110,23) size 52x3 [border: (1px none #000000)] [r=0 c=2 rs=1 cs=1] + RenderTableRow {TR} at (0,50) size 162x50 + RenderTableCell {TD} at (0,72) size 55x5 [border: (1px none #000000)] [r=1 c=0 rs=1 cs=1] + RenderTableCell {TD} at (55,73) size 55x4 [border: none] [r=1 c=1 rs=1 cs=1] + RenderTableCell {TD} at (110,74) size 52x2 [r=1 c=2 rs=1 cs=1] diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-color.html b/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-color.html new file mode 100644 index 0000000..e5cd66a --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-color.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+ + + diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-width-expected.png b/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-width-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..f2c23a94ab1898322ecdcf9fc297d72862bdc8c5 GIT binary patch literal 2952 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i0*Z)=h^hlA%@Ws$lH`oks#(E!F=Kjf-blFe6AXOdZZhDKkV7ITxN!bbGNTDGcde!OJHO;!Xn1t;Df@D zi~slQ-@n37ebLds_r>pJWU%Px1}b{BFn(A{b3U;gMe@Z1A}4XaA0gaE`0vX;c%cwJHQ^D$t_lI6wAQ)U_LnJ-~7I+ z%+MfQD<1LsiYNnv`6Fo^hK3t=w!MAD3k-`#!z(O?M~sg8V%TKP(Wo4a%HdSmjHc(& f^h~4lywShufP}7_S&Ij-Y0cp2>gTe~DWM4fzQpD1 literal 0 HcmV?d00001 diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-width-expected.txt b/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-width-expected.txt new file mode 100644 index 0000000..d69b891 --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-width-expected.txt @@ -0,0 +1,20 @@ +layer at (0,0) size 800x600 + RenderView at (0,0) size 800x600 +layer at (0,0) size 800x600 + RenderBlock {HTML} at (0,0) size 800x600 + RenderBody {BODY} at (8,8) size 784x584 + RenderTable {TABLE} at (0,0) size 161x102 [border: (1px solid #0000FF)] + RenderTableCol {COLGROUP} at (0,0) size 0x0 [border: (4px solid #FFFF00)] + RenderTableCol {COL} at (0,0) size 0x0 + RenderTableCol {COL} at (0,0) size 0x0 + RenderTableCol {COLGROUP} at (0,0) size 0x0 + RenderTableCol {COL} at (0,0) size 0x0 + RenderTableSection {TBODY} at (1,1) size 159x100 + RenderTableRow {TR} at (0,0) size 159x50 + RenderTableCell {TD} at (0,22) size 53x5 [border: (2px solid #00FF00)] [r=0 c=0 rs=1 cs=1] + RenderTableCell {TD} at (53,23) size 54x4 [border: (2px none #000000)] [r=0 c=1 rs=1 cs=1] + RenderTableCell {TD} at (107,23) size 52x3 [border: (1px none #000000)] [r=0 c=2 rs=1 cs=1] + RenderTableRow {TR} at (0,50) size 159x50 + RenderTableCell {TD} at (0,72) size 53x5 [border: (1px none #000000)] [r=1 c=0 rs=1 cs=1] + RenderTableCell {TD} at (53,73) size 54x4 [border: none] [r=1 c=1 rs=1 cs=1] + RenderTableCell {TD} at (107,74) size 52x2 [r=1 c=2 rs=1 cs=1] diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-width.html b/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-width.html new file mode 100644 index 0000000..9ca49be --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-width.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+ + + diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-row-border-color-expected.png b/LayoutTests/fast/table/border-collapsing/cached-change-row-border-color-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..bb9b9b81e6d0768221e08c6a9f13e85bf6307e10 GIT binary patch literal 2911 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i0*Z)=h^hlA%@Ws$lH`ok>%I} zn0rC?x_gPArnq7&w|Zkub#Dc~C{wQC({vS+XLF<(80Pk0WoBTQ(|dr4p@UP0p^r1rw+e_IvS^=af++z8ciFc iX=5~P4C`EQmtn#hw;ujm^MFlG1_n=8KbLh*2~7YX{5o_1 literal 0 HcmV?d00001 diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-row-border-color-expected.txt b/LayoutTests/fast/table/border-collapsing/cached-change-row-border-color-expected.txt new file mode 100644 index 0000000..47c6a57 --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-change-row-border-color-expected.txt @@ -0,0 +1,11 @@ +layer at (0,0) size 800x600 + RenderView at (0,0) size 800x600 +layer at (0,0) size 800x600 + RenderBlock {HTML} at (0,0) size 800x600 + RenderBody {BODY} at (8,8) size 784x584 + RenderTable {TABLE} at (0,0) size 60x103 [border: (2px solid #0000FF)] + RenderTableSection {TBODY} at (2,2) size 56x100 + RenderTableRow {TR} at (0,0) size 56x50 [border: (4px solid #FFFF00)] + RenderTableCell {TD} at (0,22) size 56x6 [border: (2px solid #00FF00)] [r=0 c=0 rs=1 cs=1] + RenderTableRow {TR} at (0,50) size 56x50 + RenderTableCell {TD} at (0,73) size 56x4 [border: (2px none #000000)] [r=1 c=0 rs=1 cs=1] diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-row-border-color.html b/LayoutTests/fast/table/border-collapsing/cached-change-row-border-color.html new file mode 100644 index 0000000..bc1893d --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-change-row-border-color.html @@ -0,0 +1,29 @@ + + + + + + + + + + + + + +
+
+
+ + + diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-row-border-width-expected.png b/LayoutTests/fast/table/border-collapsing/cached-change-row-border-width-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..ca29d8324e14146765006be80804ff4ad5de6049 GIT binary patch literal 2922 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i0*Z)=h^hlA%@Ws$lH`ok06oZL!>E{_3xc+#$IEGZrd3(z-t2sc# zA+Wx%f0s*nCi~JUPC{PQ!fWRomhZ5tIDGo@MxE0v3=YrVzF=fvSm&0&$Z&*3jKRSN zh4E~5`S#rEk23We*S)@|%)n5ybNfN5|F0Mr=5+YCFfbT4vN8w=M=&sKylua;e!G2b z*ZmK#MHvc$%z$EW$sx_y_>=v8&vJi8h5|(tPi?Gj-0FYX?%2P=!dss$6&Vh6-arXC z%&;7aBF~QZAFnto!N73+qsE4Be^Zkg7-HH{VtzmdKI;Vst04NgMLjV8( literal 0 HcmV?d00001 diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-row-border-width-expected.txt b/LayoutTests/fast/table/border-collapsing/cached-change-row-border-width-expected.txt new file mode 100644 index 0000000..af723c6 --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-change-row-border-width-expected.txt @@ -0,0 +1,11 @@ +layer at (0,0) size 800x600 + RenderView at (0,0) size 800x600 +layer at (0,0) size 800x600 + RenderBlock {HTML} at (0,0) size 800x600 + RenderBody {BODY} at (8,8) size 784x584 + RenderTable {TABLE} at (0,0) size 56x103 [border: (2px solid #0000FF)] + RenderTableSection {TBODY} at (1,2) size 54x100 + RenderTableRow {TR} at (0,0) size 54x50 [border: (4px solid #FFFF00)] + RenderTableCell {TD} at (0,23) size 54x4 [border: (2px solid #00FF00)] [r=0 c=0 rs=1 cs=1] + RenderTableRow {TR} at (0,50) size 54x50 + RenderTableCell {TD} at (0,73) size 54x3 [border: (2px none #000000)] [r=1 c=0 rs=1 cs=1] diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-row-border-width.html b/LayoutTests/fast/table/border-collapsing/cached-change-row-border-width.html new file mode 100644 index 0000000..112f84c --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-change-row-border-width.html @@ -0,0 +1,29 @@ + + + + + + + + + + + + + +
+
+
+ + + diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-table-border-color-expected.png b/LayoutTests/fast/table/border-collapsing/cached-change-table-border-color-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..7667602f6da852b1b958019155d796b1be097825 GIT binary patch literal 2884 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i0*Z)=h^hlA%@Ws$lH`ok%l({Ke4pDI(hK3mjm>4=ZM;W7mFq#rZbHQjX7|jKv lxnMLGjOGGb + + + + + + + + + + +
+
+ + + diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-table-border-width-expected.png b/LayoutTests/fast/table/border-collapsing/cached-change-table-border-width-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..3aa711a8b91d856253faa5125b0a0c13357b479c GIT binary patch literal 2888 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i0*Z)=h^hlA%@Ws$lH`okel4A@ET(>-3978JRyuD?}b;v=) zHPC(2@xsnsr*1?HPndy0E@lG*LlP4=gMu1}G5ddlZS?i{^FNMARO>S^R2*f6$-tEi zRmQeGpD#-6pU22hAftyIEE^4<->GJ1IIwU>0wco_7BL0~pHaqWAdIGj(OfW^3r2In kXf7Dd1*5ruCb{4p<4f*?_O2gXflXruPgg&ebxsLQ0Hupn?f?J) literal 0 HcmV?d00001 diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-table-border-width-expected.txt b/LayoutTests/fast/table/border-collapsing/cached-change-table-border-width-expected.txt new file mode 100644 index 0000000..b66d816 --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-change-table-border-width-expected.txt @@ -0,0 +1,9 @@ +layer at (0,0) size 800x600 + RenderView at (0,0) size 800x600 +layer at (0,0) size 800x600 + RenderBlock {HTML} at (0,0) size 800x600 + RenderBody {BODY} at (8,8) size 784x584 + RenderTable {TABLE} at (0,0) size 58x54 [border: (2px solid #0000FF)] + RenderTableSection {TBODY} at (2,2) size 54x50 + RenderTableRow {TR} at (0,0) size 54x50 + RenderTableCell {TD} at (0,23) size 54x4 [border: (2px solid #00FF00)] [r=0 c=0 rs=1 cs=1] diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-table-border-width.html b/LayoutTests/fast/table/border-collapsing/cached-change-table-border-width.html new file mode 100644 index 0000000..ac764fb --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-change-table-border-width.html @@ -0,0 +1,26 @@ + + + + + + + + + + + +
+
+ + + diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-color-expected.png b/LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-color-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..9253c485ec9277d4e977a2bfbbadeff00ba4c5ba GIT binary patch literal 2969 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i0*Z)=h^hlA%@Ws$lH`ok9g)6B^0r3?%&Y;3C-7!F+I z&|zqpae#@TgA;=>ciq2FU(1h6?mu?=^I~xZhS|jjf$C!SC!9TV=J@>cwPiB*e!srG z80d2ALXgbe9SOC&b9O&spB9<+?329yoJcua28J6`xy2Y9d=eNLj<5_1hTnIasI;3^ z>2fPw)tAcv~RjhFkO3Lj13qZJTIx!{Izopr0I + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-width-expected.png b/LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-width-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..b9b7757137bd58ae28540d24584661f7dc0e0f5f GIT binary patch literal 2942 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i0*Z)=h^hlA%@Ws$lH`okvjDc%Vm_9R1R>M?#@`j^_F*@%+`In=O0_JF)++szM7qZ;f-4YBf}9EF$M=8 z491&p4_BW*udn|8#*M%4<{x8tP+xeEiJ^m2hoND{0U)FHkMx@F*VeE9G12mwMDpK@ zm7iZRG8{;a*}%Y%#Kg^@pf)TRWz|29$b4>*Wnj2n0P?==zJ#?K{cbQaY~U4#g#`Ad=+J2kVcE=Z_;Z_kIg7vQ~GSi-95Dp-&eOYFf1=ZNee^T<8a5{-B(wA zt~d>tEgr8v5cPVCBm=|m52A|LG6!aM85O}=ii`%!Xt3a_VMf!&XxbP}8>6{^lw9zv mP$oQ|f#F6MH-24jM5{lFDefz|GZ)yPX7F_Nb6Mw<&;$T0+NIe5 literal 0 HcmV?d00001 diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-width-expected.txt b/LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-width-expected.txt new file mode 100644 index 0000000..e101ac5 --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-width-expected.txt @@ -0,0 +1,17 @@ +layer at (0,0) size 800x600 + RenderView at (0,0) size 800x600 +layer at (0,0) size 800x600 + RenderBlock {HTML} at (0,0) size 800x600 + RenderBody {BODY} at (8,8) size 784x584 + RenderTable {TABLE} at (0,0) size 109x153 [border: (2px solid #0000FF)] + RenderTableSection {TBODY} at (1,2) size 107x100 [border: (4px solid #FFFF00)] + RenderTableRow {TR} at (0,0) size 107x50 + RenderTableCell {TD} at (0,23) size 54x4 [border: (2px solid #00FF00)] [r=0 c=0 rs=1 cs=1] + RenderTableCell {TD} at (54,23) size 53x3 [border: (2px none #000000)] [r=0 c=1 rs=1 cs=1] + RenderTableRow {TR} at (0,50) size 107x50 + RenderTableCell {TD} at (0,73) size 54x3 [border: (1px none #000000)] [r=1 c=0 rs=1 cs=1] + RenderTableCell {TD} at (54,74) size 53x2 [border: none] [r=1 c=1 rs=1 cs=1] + RenderTableSection {TBODY} at (1,102) size 107x50 + RenderTableRow {TR} at (0,0) size 107x50 + RenderTableCell {TD} at (0,23) size 54x3 [border: (2px none #000000)] [r=0 c=0 rs=1 cs=1] + RenderTableCell {TD} at (54,23) size 53x3 [border: (2px none #000000)] [r=0 c=1 rs=1 cs=1] diff --git a/LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-width.html b/LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-width.html new file mode 100644 index 0000000..69cc44c --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-width.html @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + diff --git a/LayoutTests/fast/table/border-collapsing/resources/cached.css b/LayoutTests/fast/table/border-collapsing/resources/cached.css new file mode 100644 index 0000000..069d13e --- /dev/null +++ b/LayoutTests/fast/table/border-collapsing/resources/cached.css @@ -0,0 +1,14 @@ +TD { + width: 50px; + height: 50px; +} + +DIV#blockDiv { + display: block; + background: yellow; + position: absolute; + width: 20px; + height: 20px; + left: 80px; + top: 20px; +} \ No newline at end of file diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 0dcc028..aa0bebe 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,58 @@ +2011-09-23 Konstantin Scheglov + + Redrawing dirty parts of a large table is very slow + https://bugs.webkit.org/show_bug.cgi?id=64546 + + Reviewed by David Hyatt. + + Move CollapsedBorderValues into RenderTable.h. + Calculate collapsed borders only once and re-use during paintObject(). + Invalidate cache when cell, row, row group, col, col group or table border is changed. + + Tests: fast/table/border-collapsing/cached-cell-append.html + fast/table/border-collapsing/cached-cell-remove.html + fast/table/border-collapsing/cached-change-cell-border-color.html + fast/table/border-collapsing/cached-change-cell-border-width.html + fast/table/border-collapsing/cached-change-col-border-color.html + fast/table/border-collapsing/cached-change-col-border-width.html + fast/table/border-collapsing/cached-change-colgroup-border-color.html + fast/table/border-collapsing/cached-change-colgroup-border-width.html + fast/table/border-collapsing/cached-change-row-border-color.html + fast/table/border-collapsing/cached-change-row-border-width.html + fast/table/border-collapsing/cached-change-table-border-color.html + fast/table/border-collapsing/cached-change-table-border-width.html + fast/table/border-collapsing/cached-change-tbody-border-color.html + fast/table/border-collapsing/cached-change-tbody-border-width.html + + * rendering/RenderTable.cpp: + (WebCore::RenderTable::RenderTable): + (WebCore::RenderTable::styleDidChange): Invalidate cache on border change. + (WebCore::RenderTable::layout): Invalidate cache if layout changed. + (WebCore::RenderTable::recalcCollapsedBorders): Ensures that cache is valid. + (WebCore::RenderTable::paintObject): Use cached collapsed borders. + * rendering/RenderTable.h: + (WebCore::RenderTable::invalidateCollapsedBorders): Accessor to mark cache invalid. + (WebCore::RenderTable::currentBorderValue): Rename to use word "value". + * rendering/RenderTableCell.cpp: + (WebCore::RenderTableCell::styleDidChange): If border changed, invalidate cache. + + Rename to use word "value". + (WebCore::addBorderStyle): + (WebCore::RenderTableCell::collectBorderValues): + (WebCore::compareBorderValuesForQSort): + (WebCore::RenderTableCell::sortBorderValues): + (WebCore::RenderTableCell::paintCollapsedBorder): + * rendering/RenderTableCell.h: + + If border changed, invalidate cache. + * rendering/RenderTableCol.cpp: + (WebCore::RenderTableCol::styleDidChange): + * rendering/RenderTableCol.h: + * rendering/RenderTableRow.cpp: + (WebCore::RenderTableRow::styleDidChange): + * rendering/RenderTableSection.cpp: + (WebCore::RenderTableSection::styleDidChange): + 2011-09-23 Mark Hahnenberg Add static version of JSCell::visitChildren diff --git a/Source/WebCore/rendering/RenderTable.cpp b/Source/WebCore/rendering/RenderTable.cpp index 3c29a48..2ccd795 100644 --- a/Source/WebCore/rendering/RenderTable.cpp +++ b/Source/WebCore/rendering/RenderTable.cpp @@ -54,8 +54,9 @@ RenderTable::RenderTable(Node* node) , m_foot(0) , m_firstBody(0) , m_currentBorder(0) + , m_collapsedBordersValid(false) , m_hasColElements(false) - , m_needsSectionRecalc(0) + , m_needsSectionRecalc(false) , m_hSpacing(0) , m_vSpacing(0) , m_borderStart(0) @@ -91,6 +92,10 @@ void RenderTable::styleDidChange(StyleDifference diff, const RenderStyle* oldSty else m_tableLayout = adoptPtr(new AutoTableLayout(this)); } + + // If border was changed, invalidate collapsed borders cache. + if (!needsLayout() && oldStyle && oldStyle->border() != style()->border()) + invalidateCollapsedBorders(); } static inline void resetSectionPointerIfNotBefore(RenderTableSection*& ptr, RenderObject* before) @@ -396,6 +401,9 @@ void RenderTable::layout() updateLayerTransform(); + // Layout was changed, so probably borders too. + invalidateCollapsedBorders(); + computeOverflow(clientLogicalBottom()); statePusher.pop(); @@ -415,6 +423,22 @@ void RenderTable::layout() setNeedsLayout(false); } +// Collect all the unique border values that we want to paint in a sorted list. +void RenderTable::recalcCollapsedBorders() +{ + if (m_collapsedBordersValid) + return; + m_collapsedBordersValid = true; + m_collapsedBorders.clear(); + RenderObject* stop = nextInPreOrderAfterChildren(); + for (RenderObject* o = firstChild(); o && o != stop; o = o->nextInPreOrder()) { + if (o->isTableCell()) + toRenderTableCell(o)->collectBorderValues(m_collapsedBorders); + } + RenderTableCell::sortBorderValues(m_collapsedBorders); +} + + void RenderTable::addOverflowFromChildren() { // Add overflow from borders. @@ -505,20 +529,13 @@ void RenderTable::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffs } if (collapseBorders() && paintPhase == PaintPhaseChildBlockBackground && style()->visibility() == VISIBLE) { - // Collect all the unique border styles that we want to paint in a sorted list. Once we - // have all the styles sorted, we then do individual passes, painting each style of border - // from lowest precedence to highest precedence. + recalcCollapsedBorders(); + // Using our cached sorted styles, we then do individual passes, + // painting each style of border from lowest precedence to highest precedence. info.phase = PaintPhaseCollapsedTableBorders; - RenderTableCell::CollapsedBorderStyles borderStyles; - RenderObject* stop = nextInPreOrderAfterChildren(); - for (RenderObject* o = firstChild(); o && o != stop; o = o->nextInPreOrder()) { - if (o->isTableCell()) - toRenderTableCell(o)->collectBorderStyles(borderStyles); - } - RenderTableCell::sortBorderStyles(borderStyles); - size_t count = borderStyles.size(); + size_t count = m_collapsedBorders.size(); for (size_t i = 0; i < count; ++i) { - m_currentBorder = &borderStyles[i]; + m_currentBorder = &m_collapsedBorders[i]; for (RenderObject* child = firstChild(); child; child = child->nextSibling()) if (child->isTableSection()) { LayoutPoint childPoint = flipForWritingMode(toRenderTableSection(child), paintOffset, ParentToChildFlippingAdjustment); diff --git a/Source/WebCore/rendering/RenderTable.h b/Source/WebCore/rendering/RenderTable.h index 8279cea..f18b840 100644 --- a/Source/WebCore/rendering/RenderTable.h +++ b/Source/WebCore/rendering/RenderTable.h @@ -26,12 +26,12 @@ #define RenderTable_h #include "CSSPropertyNames.h" +#include "CollapsedBorderValue.h" #include "RenderBlock.h" #include namespace WebCore { -class CollapsedBorderValue; class RenderTableCol; class RenderTableCell; class RenderTableSection; @@ -200,7 +200,13 @@ public: RenderTableCell* cellBefore(const RenderTableCell*) const; RenderTableCell* cellAfter(const RenderTableCell*) const; - const CollapsedBorderValue* currentBorderStyle() const { return m_currentBorder; } + typedef Vector CollapsedBorderValues; + void invalidateCollapsedBorders() + { + m_collapsedBordersValid = false; + m_collapsedBorders.clear(); + } + const CollapsedBorderValue* currentBorderValue() const { return m_currentBorder; } bool hasSections() const { return m_head || m_foot || m_firstBody; } @@ -245,6 +251,7 @@ private: void subtractCaptionRect(LayoutRect&) const; + void recalcCollapsedBorders(); void recalcCaption(RenderBlock*) const; void recalcSections() const; void adjustLogicalHeightForCaption(); @@ -259,7 +266,9 @@ private: OwnPtr m_tableLayout; + CollapsedBorderValues m_collapsedBorders; const CollapsedBorderValue* m_currentBorder; + bool m_collapsedBordersValid : 1; mutable bool m_hasColElements : 1; mutable bool m_needsSectionRecalc : 1; diff --git a/Source/WebCore/rendering/RenderTableCell.cpp b/Source/WebCore/rendering/RenderTableCell.cpp index 86af6ff..f1e2742 100644 --- a/Source/WebCore/rendering/RenderTableCell.cpp +++ b/Source/WebCore/rendering/RenderTableCell.cpp @@ -317,6 +317,13 @@ void RenderTableCell::styleDidChange(StyleDifference diff, const RenderStyle* ol { RenderBlock::styleDidChange(diff, oldStyle); setHasBoxDecorations(true); + + // If border was changed, notify table. + if (parent()) { + RenderTable* table = this->table(); + if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout()&& oldStyle && oldStyle->border() != style()->border()) + table->invalidateCollapsedBorders(); + } } // The following rules apply for resolving conflicts and figuring out which border @@ -871,26 +878,27 @@ public: int m_count; }; -static void addBorderStyle(RenderTableCell::CollapsedBorderStyles& borderStyles, CollapsedBorderValue borderValue) +static void addBorderStyle(RenderTable::CollapsedBorderValues& borderValues, + CollapsedBorderValue borderValue) { if (!borderValue.exists()) return; - size_t count = borderStyles.size(); + size_t count = borderValues.size(); for (size_t i = 0; i < count; ++i) - if (borderStyles[i] == borderValue) + if (borderValues[i] == borderValue) return; - borderStyles.append(borderValue); + borderValues.append(borderValue); } -void RenderTableCell::collectBorderStyles(CollapsedBorderStyles& borderStyles) const +void RenderTableCell::collectBorderValues(RenderTable::CollapsedBorderValues& borderValues) const { - addBorderStyle(borderStyles, collapsedStartBorder()); - addBorderStyle(borderStyles, collapsedEndBorder()); - addBorderStyle(borderStyles, collapsedBeforeBorder()); - addBorderStyle(borderStyles, collapsedAfterBorder()); + addBorderStyle(borderValues, collapsedStartBorder()); + addBorderStyle(borderValues, collapsedEndBorder()); + addBorderStyle(borderValues, collapsedBeforeBorder()); + addBorderStyle(borderValues, collapsedAfterBorder()); } -static int compareBorderStylesForQSort(const void* pa, const void* pb) +static int compareBorderValuesForQSort(const void* pa, const void* pb) { const CollapsedBorderValue* a = static_cast(pa); const CollapsedBorderValue* b = static_cast(pb); @@ -899,15 +907,15 @@ static int compareBorderStylesForQSort(const void* pa, const void* pb) return compareBorders(*a, *b); } -void RenderTableCell::sortBorderStyles(CollapsedBorderStyles& borderStyles) +void RenderTableCell::sortBorderValues(RenderTable::CollapsedBorderValues& borderValues) { - qsort(borderStyles.data(), borderStyles.size(), sizeof(CollapsedBorderValue), - compareBorderStylesForQSort); + qsort(borderValues.data(), borderValues.size(), sizeof(CollapsedBorderValue), + compareBorderValuesForQSort); } void RenderTableCell::paintCollapsedBorder(GraphicsContext* graphicsContext, const LayoutRect& paintRect) { - if (!table()->currentBorderStyle() || graphicsContext->paintingDisabled()) + if (!table()->currentBorderValue() || graphicsContext->paintingDisabled()) return; CollapsedBorderValue leftVal = collapsedLeftBorder(); @@ -947,7 +955,7 @@ void RenderTableCell::paintCollapsedBorder(GraphicsContext* graphicsContext, con bool antialias = shouldAntialiasLines(graphicsContext); for (CollapsedBorder* border = borders.nextBorder(); border; border = borders.nextBorder()) { - if (border->borderValue == *table()->currentBorderStyle()) + if (border->borderValue == *table()->currentBorderValue()) drawLineForBoxSide(graphicsContext, border->x1, border->y1, border->x2, border->y2, border->side, border->borderValue.color(), border->style, 0, 0, antialias); } diff --git a/Source/WebCore/rendering/RenderTableCell.h b/Source/WebCore/rendering/RenderTableCell.h index 5b235d6..acae61a 100644 --- a/Source/WebCore/rendering/RenderTableCell.h +++ b/Source/WebCore/rendering/RenderTableCell.h @@ -86,9 +86,8 @@ public: CollapsedBorderValue collapsedTopBorder() const; CollapsedBorderValue collapsedBottomBorder() const; - typedef Vector CollapsedBorderStyles; - void collectBorderStyles(CollapsedBorderStyles&) const; - static void sortBorderStyles(CollapsedBorderStyles&); + void collectBorderValues(RenderTable::CollapsedBorderValues&) const; + static void sortBorderValues(RenderTable::CollapsedBorderValues&); virtual void updateFromElement(); diff --git a/Source/WebCore/rendering/RenderTableCol.cpp b/Source/WebCore/rendering/RenderTableCol.cpp index 8e99923..60cc5b9 100644 --- a/Source/WebCore/rendering/RenderTableCol.cpp +++ b/Source/WebCore/rendering/RenderTableCol.cpp @@ -44,6 +44,18 @@ RenderTableCol::RenderTableCol(Node* node) updateFromElement(); } +void RenderTableCol::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) +{ + RenderBox::styleDidChange(diff, oldStyle); + + // If border was changed, notify table. + if (parent()) { + RenderTable* table = this->table(); + if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout() && oldStyle && oldStyle->border() != style()->border()) + table->invalidateCollapsedBorders(); + } +} + void RenderTableCol::updateFromElement() { int oldSpan = m_span; diff --git a/Source/WebCore/rendering/RenderTableCol.h b/Source/WebCore/rendering/RenderTableCol.h index c8a0630..220482f 100644 --- a/Source/WebCore/rendering/RenderTableCol.h +++ b/Source/WebCore/rendering/RenderTableCol.h @@ -59,6 +59,8 @@ private: virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const; virtual void imageChanged(WrappedImagePtr, const IntRect* = 0); + virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); + RenderTable* table() const; RenderObjectChildList m_children; diff --git a/Source/WebCore/rendering/RenderTableRow.cpp b/Source/WebCore/rendering/RenderTableRow.cpp index e8b6272..d5264d1 100644 --- a/Source/WebCore/rendering/RenderTableRow.cpp +++ b/Source/WebCore/rendering/RenderTableRow.cpp @@ -78,6 +78,13 @@ void RenderTableRow::styleDidChange(StyleDifference diff, const RenderStyle* old if (parent()) updateBeforeAndAfterContent(); + + // If border was changed, notify table. + if (parent()) { + RenderTable* table = this->table(); + if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout() && oldStyle && oldStyle->border() != style()->border()) + table->invalidateCollapsedBorders(); + } } void RenderTableRow::addChild(RenderObject* child, RenderObject* beforeChild) diff --git a/Source/WebCore/rendering/RenderTableSection.cpp b/Source/WebCore/rendering/RenderTableSection.cpp index 0badb82..77d0752 100644 --- a/Source/WebCore/rendering/RenderTableSection.cpp +++ b/Source/WebCore/rendering/RenderTableSection.cpp @@ -81,6 +81,11 @@ void RenderTableSection::styleDidChange(StyleDifference diff, const RenderStyle* { RenderBox::styleDidChange(diff, oldStyle); propagateStyleToAnonymousChildren(); + + // If border was changed, notify table. + RenderTable* table = this->table(); + if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout() && oldStyle && oldStyle->border() != style()->border()) + table->invalidateCollapsedBorders(); } void RenderTableSection::willBeDestroyed() -- 2.7.4