Changeset 100473 in webkit
- Timestamp:
- Nov 16, 2011 11:11:56 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r100471 r100473 1 2011-11-08 Robert Hogan <robert@webkit.org> 2 3 CSS 2.1 failure: border-collapse-offset-002.htm fails 4 https://bugs.webkit.org/show_bug.cgi?id=71705 5 6 Table captions now use the width of the table rather than the width of the table minus 7 the borders. This allows captions to center accurately but unfortunately a lot of mozilla 8 table tests need to be rebaselined as many of them use captions for explaining the purpose 9 of individual test files! 10 11 Add border-collapse-offset-002.htm which now renders correctly. 12 13 Affected tables/mozilla tests are rebaselined in a follow-up patch. 14 15 Reviewed by Antti Koivisto. 16 17 * css2.1/20110323/border-collapse-offset-002.htm: Added. 18 * platform/chromium-linux-x86/css2.1/20110323/border-collapse-offset-002-expected.png: Added. 19 * platform/chromium-linux-x86/css2.1/20110323/border-collapse-offset-002-expected.txt: Added. 20 * platform/chromium-linux/fast/dom/HTMLTableElement/colSpan-expected.png: 21 * platform/chromium-linux/fast/dom/HTMLTableElement/createCaption-expected.png: 22 * platform/chromium-win/fast/css/bidi-override-in-anonymous-block-expected.txt: 23 * platform/chromium-win/fast/dom/HTMLTableElement/colSpan-expected.txt: 24 * platform/chromium-win/fast/dom/HTMLTableElement/createCaption-expected.txt: 25 * platform/mac/fast/repaint/table-section-repaint-expected.txt: 26 1 27 2011-11-16 Sergey Glazunov <serg.glazunov@gmail.com> 2 28 -
trunk/LayoutTests/platform/chromium-win/fast/css/bidi-override-in-anonymous-block-expected.txt
r81820 r100473 180 180 text run at (0,0) width 389: "The following 2 tables should be identical, ignorning whitespaces:" 181 181 RenderTable {TABLE} at (1,1008) size 80x72 [border: (1px solid #808080)] 182 RenderBlock {CAPTION} at (0,0) size 78x20183 RenderText {#text} at ( -2,0) size 80x19184 text run at ( -2,0) width 80: "NormalTable"182 RenderBlock {CAPTION} at (0,0) size 80x20 183 RenderText {#text} at (0,0) size 80x19 184 text run at (0,0) width 80: "NormalTable" 185 185 RenderTableSection {TBODY} at (1,21) size 78x50 186 186 RenderTableRow {TR} at (0,2) size 78x22 … … 199 199 text run at (13,1) width 24: "opq" 200 200 RenderTable {DIV} at (1,1081) size 135x62 [border: (1px solid #000000)] 201 RenderBlock {DIV} at (0,0) size 13 3x20202 RenderText {#text} at ( -2,0) size 135x19203 text run at ( -2,0) width 135: "AnonymousTableRow"201 RenderBlock {DIV} at (0,0) size 135x20 202 RenderText {#text} at (0,0) size 135x19 203 text run at (0,0) width 135: "AnonymousTableRow" 204 204 RenderTableSection (anonymous) at (1,21) size 133x40 205 205 RenderTableRow {DIV} at (0,0) size 133x20 -
trunk/LayoutTests/platform/chromium-win/fast/dom/HTMLTableElement/colSpan-expected.txt
r56267 r100473 28 28 RenderBR {BR} at (0,0) size 0x19 29 29 RenderTable {TABLE} at (0,238) size 255x76 [border: (1px outset #808080)] 30 RenderBlock {CAPTION} at (0,0) size 25 3x2031 RenderText {#text} at (2 6,0) size 201x1932 text run at (2 6,0) width 201: "Testing Default and Regular Input"30 RenderBlock {CAPTION} at (0,0) size 255x20 31 RenderText {#text} at (27,0) size 201x19 32 text run at (27,0) width 201: "Testing Default and Regular Input" 33 33 RenderTableSection {TBODY} at (1,21) size 253x54 34 34 RenderTableRow {TR} at (0,2) size 253x24 … … 67 67 RenderBR {BR} at (0,0) size 0x19 68 68 RenderTable {TABLE} at (0,334) size 189x76 [border: (1px outset #808080)] 69 RenderBlock {CAPTION} at (0,0) size 18 7x2070 RenderText {#text} at (1 4,0) size 159x1971 text run at (1 4,0) width 159: "Testing Zero Special Case"69 RenderBlock {CAPTION} at (0,0) size 189x20 70 RenderText {#text} at (15,0) size 159x19 71 text run at (15,0) width 159: "Testing Zero Special Case" 72 72 RenderTableSection {TBODY} at (1,21) size 187x54 73 73 RenderTableRow {TR} at (0,2) size 187x24 -
trunk/LayoutTests/platform/chromium-win/fast/dom/HTMLTableElement/createCaption-expected.txt
r78929 r100473 32 32 RenderBlock {HR} at (0,168) size 784x2 [border: (1px inset #000000)] 33 33 RenderTable {TABLE} at (0,178) size 104x102 [border: (1px outset #808080)] 34 RenderBlock {CAPTION} at (0,0) size 10 2x2034 RenderBlock {CAPTION} at (0,0) size 104x20 35 35 RenderInline {B} at (0,0) size 40x19 36 RenderText {#text} at (3 1,0) size 40x1937 text run at (3 1,0) width 40: "Fruity"36 RenderText {#text} at (32,0) size 40x19 37 text run at (32,0) width 40: "Fruity" 38 38 RenderTableSection {TBODY} at (1,21) size 102x80 39 39 RenderTableRow {TR} at (0,2) size 102x24 … … 61 61 RenderBR {BR} at (0,0) size 0x19 62 62 RenderTable {TABLE} at (0,300) size 129x102 [border: (1px outset #808080)] 63 RenderBlock {CAPTION} at (0,0) size 12 7x2063 RenderBlock {CAPTION} at (0,0) size 129x20 64 64 RenderInline {B} at (0,0) size 77x19 65 RenderText {#text} at (2 5,0) size 77x1966 text run at (2 5,0) width 77: "Vegetabley"65 RenderText {#text} at (26,0) size 77x19 66 text run at (26,0) width 77: "Vegetabley" 67 67 RenderTableSection {TBODY} at (1,21) size 127x80 68 68 RenderTableRow {TR} at (0,2) size 127x24 -
trunk/LayoutTests/platform/mac/fast/repaint/table-section-repaint-expected.txt
r30635 r100473 37 37 RenderBlock (relative positioned) {DIV} at (0,300) size 90x90 38 38 RenderTable {TABLE} at (0,0) size 60x83 [border: (4px solid #008000)] 39 RenderBlock {CAPTION} at (2 1,0) size 10x1539 RenderBlock {CAPTION} at (25,0) size 10x15 40 40 RenderBlock {DIV} at (0,0) size 10x15 41 41 RenderTableSection {TBODY} at (4,19) size 52x60 -
trunk/Source/WebCore/CMakeLists.txt
r100311 r100473 1283 1283 rendering/RenderSummary.cpp 1284 1284 rendering/RenderTable.cpp 1285 rendering/RenderTableCaption.cpp 1285 1286 rendering/RenderTableCell.cpp 1286 1287 rendering/RenderTableCol.cpp -
trunk/Source/WebCore/ChangeLog
r100470 r100473 1 2011-11-08 Robert Hogan <robert@webkit.org> 2 3 CSS 2.1 failure: border-collapse-offset-002.htm fails 4 https://bugs.webkit.org/show_bug.cgi?id=71705 5 6 Table captions are implemented as children of the table but have a special 7 requirement to expand to the full width of the table rather than just the 'available' 8 width, i.e. the full width minus padding and borders. 9 10 To accomodate this create a RenderTableCaption object that reimplements containingBlockLogicalWidthForContent() 11 to return the full width of the containing block (i.e. the table) rather than the available width. 12 13 Reviewed by Antti Koivisto. 14 15 * CMakeLists.txt: Add RenderTableCaption.[cpp|h] 16 * GNUmakefile.list.am: Add RenderTableCaption.[cpp|h] 17 * Target.pri: Add RenderTableCaption.[cpp|h] 18 * WebCore.gypi: Add RenderTableCaption.[cpp|h] 19 * rendering/RenderBlock.cpp: 20 (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): Use RenderTableCaption 21 * rendering/RenderObject.cpp: 22 (WebCore::RenderObject::createObject): Add RenderTableCaption.[cpp|h] 23 (WebCore::RenderObject::addChild): ditto 24 * rendering/RenderObject.h: 25 (WebCore::RenderObject::isTableCaption): 26 * rendering/RenderTable.cpp: 27 (WebCore::RenderTable::addChild): 28 * rendering/RenderTable.h: 29 * rendering/RenderTableCaption.cpp: Added. 30 (WebCore::RenderTableCaption::RenderTableCaption): Implement RenderTableCaption 31 (WebCore::RenderTableCaption::~RenderTableCaption): 32 (WebCore::RenderTableCaption::containingBlockLogicalWidthForContent): Return the containing block's full width rather than it's available width. 33 * rendering/RenderTableCaption.h: Added. 34 (WebCore::RenderTableCaption::isTableCaption): 35 (WebCore::toRenderTableCaption): 36 1 37 2011-11-16 Antaryami Pandia <antaryami.pandia@motorola.com> 2 38 -
trunk/Source/WebCore/GNUmakefile.list.am
r100416 r100473 3179 3179 Source/WebCore/rendering/RenderSummary.cpp \ 3180 3180 Source/WebCore/rendering/RenderSummary.h \ 3181 Source/WebCore/rendering/RenderTableCaption.cpp \ 3182 Source/WebCore/rendering/RenderTableCaption.h \ 3181 3183 Source/WebCore/rendering/RenderTableCell.cpp \ 3182 3184 Source/WebCore/rendering/RenderTableCell.h \ -
trunk/Source/WebCore/Target.pri
r100441 r100473 1226 1226 rendering/RenderSummary.cpp \ 1227 1227 rendering/RenderTable.cpp \ 1228 rendering/RenderTableCaption.cpp \ 1228 1229 rendering/RenderTableCell.cpp \ 1229 1230 rendering/RenderTableCol.cpp \ … … 2341 2342 rendering/RenderSlider.h \ 2342 2343 rendering/RenderSummary.h \ 2344 rendering/RenderTableCaption.h \ 2343 2345 rendering/RenderTableCell.h \ 2344 2346 rendering/RenderTableCol.h \ -
trunk/Source/WebCore/WebCore.gypi
r100416 r100473 4664 4664 'rendering/RenderTable.cpp', 4665 4665 'rendering/RenderTable.h', 4666 'rendering/RenderTableCaption.cpp', 4667 'rendering/RenderTableCaption.h', 4666 4668 'rendering/RenderTableCell.cpp', 4667 4669 'rendering/RenderTableCell.h', -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r99613 r100473 695 695 ASSERT(beforeChildAnonymousContainer->isTable()); 696 696 if ((newChild->isTableCol() && newChild->style()->display() == TABLE_COLUMN_GROUP) 697 || (newChild->is RenderBlock() && newChild->style()->display() == TABLE_CAPTION)697 || (newChild->isTableCaption()) 698 698 || newChild->isTableSection() 699 699 || newChild->isTableRow() -
trunk/Source/WebCore/rendering/RenderObject.cpp
r100389 r100473 55 55 #include "RenderRuby.h" 56 56 #include "RenderRubyText.h" 57 #include "RenderTableCaption.h" 57 58 #include "RenderTableCell.h" 58 59 #include "RenderTableCol.h" … … 165 166 return new (arena) RenderTableCell(node); 166 167 case TABLE_CAPTION: 167 return new (arena) Render Block(node);168 return new (arena) RenderTableCaption(node); 168 169 case BOX: 169 170 case INLINE_BOX: … … 294 295 if (newChild->isTableCol() && newChild->style()->display() == TABLE_COLUMN_GROUP) 295 296 needsTable = !isTable(); 296 else if (newChild->is RenderBlock() && newChild->style()->display() == TABLE_CAPTION)297 else if (newChild->isTableCaption()) 297 298 needsTable = !isTable(); 298 299 else if (newChild->isTableSection()) -
trunk/Source/WebCore/rendering/RenderObject.h
r100198 r100473 328 328 virtual bool isTableCell() const { return false; } 329 329 virtual bool isTableCol() const { return false; } 330 virtual bool isTableCaption() const { return false; } 330 331 virtual bool isTableRow() const { return false; } 331 332 virtual bool isTableSection() const { return false; } -
trunk/Source/WebCore/rendering/RenderTable.cpp
r100386 r100473 37 37 #include "LayoutRepainter.h" 38 38 #include "RenderLayer.h" 39 #include "RenderTableCaption.h" 39 40 #include "RenderTableCell.h" 40 41 #include "RenderTableCol.h" … … 116 117 bool wrapInAnonymousSection = !child->isPositioned(); 117 118 118 if (child->is RenderBlock() && child->style()->display() == TABLE_CAPTION) {119 m_captions.append(toRender Block(child));119 if (child->isTableCaption()) { 120 m_captions.append(toRenderTableCaption(child)); 120 121 setNeedsSectionRecalc(); 121 122 wrapInAnonymousSection = false; -
trunk/Source/WebCore/rendering/RenderTable.h
r100386 r100473 34 34 35 35 class RenderTableCol; 36 class RenderTableCaption; 36 37 class RenderTableCell; 37 38 class RenderTableSection; … … 253 254 mutable Vector<ColumnStruct> m_columns; 254 255 255 mutable Vector<Render Block*> m_captions;256 mutable Vector<RenderTableCaption*> m_captions; 256 257 mutable RenderTableSection* m_head; 257 258 mutable RenderTableSection* m_foot;
Note: See TracChangeset
for help on using the changeset viewer.