Title: [105808] branches/chromium/963
Revision
105808
Author
[email protected]
Date
2012-01-24 14:23:32 -0800 (Tue, 24 Jan 2012)

Log Message

Merge 100473 - CSS 2.1 failure: border-collapse-offset-002.htm fails
BUG=109094

Modified Paths

Added Paths

Diff

Copied: branches/chromium/963/LayoutTests/css2.1/20110323/border-collapse-offset-002.htm (from rev 100473, trunk/LayoutTests/css2.1/20110323/border-collapse-offset-002.htm) (0 => 105808)


--- branches/chromium/963/LayoutTests/css2.1/20110323/border-collapse-offset-002.htm	                        (rev 0)
+++ branches/chromium/963/LayoutTests/css2.1/20110323/border-collapse-offset-002.htm	2012-01-24 22:23:32 UTC (rev 105808)
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html><head>
+    <title>CSS Test: border collapse</title>
+    <link rel="author" title="Bernd Mielke" href=""
+    <link rel="help" href=""
+    <link rel="match" href=""
+    <meta name="flags" content="">
+<style type="text/css">
+td {width: 100px; text-align:center}
+caption {border:solid 4px green}
+
+</style>
+</head>
+
+<body>
+
+<table style="border-collapse:collapse;"><caption>caption</caption>
+  <tbody><tr><td style="border:solid 4px orange; height:30px">cell 1</td></tr>
+</tbody></table>
+
+
+
+</body></html>
\ No newline at end of file

Modified: branches/chromium/963/LayoutTests/platform/chromium-linux/fast/dom/HTMLTableElement/colSpan-expected.png


(Binary files differ)

Modified: branches/chromium/963/LayoutTests/platform/chromium-linux/fast/dom/HTMLTableElement/createCaption-expected.png


(Binary files differ)

Copied: branches/chromium/963/LayoutTests/platform/chromium-linux-x86/css2.1/20110323/border-collapse-offset-002-expected.png (from rev 100473, trunk/LayoutTests/platform/chromium-linux-x86/css2.1/20110323/border-collapse-offset-002-expected.png)


(Binary files differ)

Copied: branches/chromium/963/LayoutTests/platform/chromium-linux-x86/css2.1/20110323/border-collapse-offset-002-expected.txt (from rev 100473, trunk/LayoutTests/platform/chromium-linux-x86/css2.1/20110323/border-collapse-offset-002-expected.txt) (0 => 105808)


--- branches/chromium/963/LayoutTests/platform/chromium-linux-x86/css2.1/20110323/border-collapse-offset-002-expected.txt	                        (rev 0)
+++ branches/chromium/963/LayoutTests/platform/chromium-linux-x86/css2.1/20110323/border-collapse-offset-002-expected.txt	2012-01-24 22:23:32 UTC (rev 105808)
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x84
+  RenderBlock {HTML} at (0,0) size 800x84
+    RenderBody {BODY} at (8,8) size 784x68
+      RenderTable {TABLE} at (0,0) size 110x68 [border: (2px none #808080)]
+        RenderBlock {CAPTION} at (0,0) size 110x28 [border: (4px solid #008000)]
+          RenderText {#text} at (33,4) size 44x19
+            text run at (33,4) width 44: "caption"
+        RenderTableSection {TBODY} at (2,30) size 106x36
+          RenderTableRow {TR} at (0,0) size 106x36
+            RenderTableCell {TD} at (0,5) size 106x26 [border: (2px solid #FFA500)] [r=0 c=0 rs=1 cs=1]
+              RenderText {#text} at (37,3) size 32x19
+                text run at (37,3) width 32: "cell 1"

Modified: branches/chromium/963/LayoutTests/platform/chromium-win/fast/css/bidi-override-in-anonymous-block-expected.txt (105807 => 105808)


--- branches/chromium/963/LayoutTests/platform/chromium-win/fast/css/bidi-override-in-anonymous-block-expected.txt	2012-01-24 22:17:26 UTC (rev 105807)
+++ branches/chromium/963/LayoutTests/platform/chromium-win/fast/css/bidi-override-in-anonymous-block-expected.txt	2012-01-24 22:23:32 UTC (rev 105808)
@@ -179,9 +179,9 @@
         RenderText {#text} at (0,0) size 389x19
           text run at (0,0) width 389: "The following 2 tables should be identical, ignorning whitespaces:"
       RenderTable {TABLE} at (1,1008) size 80x72 [border: (1px solid #808080)]
-        RenderBlock {CAPTION} at (0,0) size 78x20
-          RenderText {#text} at (-2,0) size 80x19
-            text run at (-2,0) width 80: "NormalTable"
+        RenderBlock {CAPTION} at (0,0) size 80x20
+          RenderText {#text} at (0,0) size 80x19
+            text run at (0,0) width 80: "NormalTable"
         RenderTableSection {TBODY} at (1,21) size 78x50
           RenderTableRow {TR} at (0,2) size 78x22
             RenderTableCell {TD} at (42,2) size 34x22 [r=0 c=0 rs=1 cs=1]
@@ -198,9 +198,9 @@
               RenderText {#text} at (13,1) size 24x19
                 text run at (13,1) width 24: "opq"
       RenderTable {DIV} at (1,1081) size 135x62 [border: (1px solid #000000)]
-        RenderBlock {DIV} at (0,0) size 133x20
-          RenderText {#text} at (-2,0) size 135x19
-            text run at (-2,0) width 135: "AnonymousTableRow"
+        RenderBlock {DIV} at (0,0) size 135x20
+          RenderText {#text} at (0,0) size 135x19
+            text run at (0,0) width 135: "AnonymousTableRow"
         RenderTableSection (anonymous) at (1,21) size 133x40
           RenderTableRow {DIV} at (0,0) size 133x20
             RenderTableCell {DIV} at (70,0) size 63x20 [r=0 c=0 rs=1 cs=1]

Modified: branches/chromium/963/LayoutTests/platform/chromium-win/fast/dom/HTMLTableElement/colSpan-expected.txt (105807 => 105808)


--- branches/chromium/963/LayoutTests/platform/chromium-win/fast/dom/HTMLTableElement/colSpan-expected.txt	2012-01-24 22:17:26 UTC (rev 105807)
+++ branches/chromium/963/LayoutTests/platform/chromium-win/fast/dom/HTMLTableElement/colSpan-expected.txt	2012-01-24 22:23:32 UTC (rev 105808)
@@ -27,9 +27,9 @@
       RenderBlock (anonymous) at (0,218) size 784x20
         RenderBR {BR} at (0,0) size 0x19
       RenderTable {TABLE} at (0,238) size 255x76 [border: (1px outset #808080)]
-        RenderBlock {CAPTION} at (0,0) size 253x20
-          RenderText {#text} at (26,0) size 201x19
-            text run at (26,0) width 201: "Testing Default and Regular Input"
+        RenderBlock {CAPTION} at (0,0) size 255x20
+          RenderText {#text} at (27,0) size 201x19
+            text run at (27,0) width 201: "Testing Default and Regular Input"
         RenderTableSection {TBODY} at (1,21) size 253x54
           RenderTableRow {TR} at (0,2) size 253x24
             RenderTableCell {TD} at (2,2) size 31x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
@@ -66,9 +66,9 @@
       RenderBlock (anonymous) at (0,314) size 784x20
         RenderBR {BR} at (0,0) size 0x19
       RenderTable {TABLE} at (0,334) size 189x76 [border: (1px outset #808080)]
-        RenderBlock {CAPTION} at (0,0) size 187x20
-          RenderText {#text} at (14,0) size 159x19
-            text run at (14,0) width 159: "Testing Zero Special Case"
+        RenderBlock {CAPTION} at (0,0) size 189x20
+          RenderText {#text} at (15,0) size 159x19
+            text run at (15,0) width 159: "Testing Zero Special Case"
         RenderTableSection {TBODY} at (1,21) size 187x54
           RenderTableRow {TR} at (0,2) size 187x24
             RenderTableCell {TD} at (2,2) size 42x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]

Modified: branches/chromium/963/LayoutTests/platform/chromium-win/fast/dom/HTMLTableElement/createCaption-expected.txt (105807 => 105808)


--- branches/chromium/963/LayoutTests/platform/chromium-win/fast/dom/HTMLTableElement/createCaption-expected.txt	2012-01-24 22:17:26 UTC (rev 105807)
+++ branches/chromium/963/LayoutTests/platform/chromium-win/fast/dom/HTMLTableElement/createCaption-expected.txt	2012-01-24 22:23:32 UTC (rev 105808)
@@ -31,10 +31,10 @@
           text run at (0,20) width 549: "failure, the first table will have no caption, and the second table will have the caption Things."
       RenderBlock {HR} at (0,168) size 784x2 [border: (1px inset #000000)]
       RenderTable {TABLE} at (0,178) size 104x102 [border: (1px outset #808080)]
-        RenderBlock {CAPTION} at (0,0) size 102x20
+        RenderBlock {CAPTION} at (0,0) size 104x20
           RenderInline {B} at (0,0) size 40x19
-            RenderText {#text} at (31,0) size 40x19
-              text run at (31,0) width 40: "Fruity"
+            RenderText {#text} at (32,0) size 40x19
+              text run at (32,0) width 40: "Fruity"
         RenderTableSection {TBODY} at (1,21) size 102x80
           RenderTableRow {TR} at (0,2) size 102x24
             RenderTableCell {TH} at (2,2) size 49x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
@@ -60,10 +60,10 @@
       RenderBlock (anonymous) at (0,280) size 784x20
         RenderBR {BR} at (0,0) size 0x19
       RenderTable {TABLE} at (0,300) size 129x102 [border: (1px outset #808080)]
-        RenderBlock {CAPTION} at (0,0) size 127x20
+        RenderBlock {CAPTION} at (0,0) size 129x20
           RenderInline {B} at (0,0) size 77x19
-            RenderText {#text} at (25,0) size 77x19
-              text run at (25,0) width 77: "Vegetabley"
+            RenderText {#text} at (26,0) size 77x19
+              text run at (26,0) width 77: "Vegetabley"
         RenderTableSection {TBODY} at (1,21) size 127x80
           RenderTableRow {TR} at (0,2) size 127x24
             RenderTableCell {TH} at (2,2) size 72x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]

Modified: branches/chromium/963/LayoutTests/platform/mac/fast/repaint/table-section-repaint-expected.txt (105807 => 105808)


--- branches/chromium/963/LayoutTests/platform/mac/fast/repaint/table-section-repaint-expected.txt	2012-01-24 22:17:26 UTC (rev 105807)
+++ branches/chromium/963/LayoutTests/platform/mac/fast/repaint/table-section-repaint-expected.txt	2012-01-24 22:23:32 UTC (rev 105808)
@@ -36,7 +36,7 @@
 layer at (8,308) size 90x90
   RenderBlock (relative positioned) {DIV} at (0,300) size 90x90
     RenderTable {TABLE} at (0,0) size 60x83 [border: (4px solid #008000)]
-      RenderBlock {CAPTION} at (21,0) size 10x15
+      RenderBlock {CAPTION} at (25,0) size 10x15
         RenderBlock {DIV} at (0,0) size 10x15
       RenderTableSection {TBODY} at (4,19) size 52x60
         RenderTableRow {TR} at (0,0) size 52x30

Modified: branches/chromium/963/Source/WebCore/CMakeLists.txt (105807 => 105808)


--- branches/chromium/963/Source/WebCore/CMakeLists.txt	2012-01-24 22:17:26 UTC (rev 105807)
+++ branches/chromium/963/Source/WebCore/CMakeLists.txt	2012-01-24 22:23:32 UTC (rev 105808)
@@ -1283,6 +1283,7 @@
     rendering/RenderSlider.cpp
     rendering/RenderSummary.cpp
     rendering/RenderTable.cpp
+    rendering/RenderTableCaption.cpp
     rendering/RenderTableCell.cpp
     rendering/RenderTableCol.cpp
     rendering/RenderTableRow.cpp

Modified: branches/chromium/963/Source/WebCore/GNUmakefile.list.am (105807 => 105808)


--- branches/chromium/963/Source/WebCore/GNUmakefile.list.am	2012-01-24 22:17:26 UTC (rev 105807)
+++ branches/chromium/963/Source/WebCore/GNUmakefile.list.am	2012-01-24 22:23:32 UTC (rev 105808)
@@ -3169,6 +3169,8 @@
 	Source/WebCore/rendering/RenderSlider.h \
 	Source/WebCore/rendering/RenderSummary.cpp \
 	Source/WebCore/rendering/RenderSummary.h \
+	Source/WebCore/rendering/RenderTableCaption.cpp \
+	Source/WebCore/rendering/RenderTableCaption.h \
 	Source/WebCore/rendering/RenderTableCell.cpp \
 	Source/WebCore/rendering/RenderTableCell.h \
 	Source/WebCore/rendering/RenderTableCol.cpp \

Modified: branches/chromium/963/Source/WebCore/Target.pri (105807 => 105808)


--- branches/chromium/963/Source/WebCore/Target.pri	2012-01-24 22:17:26 UTC (rev 105807)
+++ branches/chromium/963/Source/WebCore/Target.pri	2012-01-24 22:23:32 UTC (rev 105808)
@@ -1221,6 +1221,7 @@
     rendering/RenderSlider.cpp \
     rendering/RenderSummary.cpp \
     rendering/RenderTable.cpp \
+    rendering/RenderTableCaption.cpp \
     rendering/RenderTableCell.cpp \
     rendering/RenderTableCol.cpp \
     rendering/RenderTableRow.cpp \
@@ -2330,6 +2331,7 @@
     rendering/RenderScrollbarTheme.h \
     rendering/RenderSlider.h \
     rendering/RenderSummary.h \
+    rendering/RenderTableCaption.h \
     rendering/RenderTableCell.h \
     rendering/RenderTableCol.h \
     rendering/RenderTable.h \

Modified: branches/chromium/963/Source/WebCore/WebCore.gypi (105807 => 105808)


--- branches/chromium/963/Source/WebCore/WebCore.gypi	2012-01-24 22:17:26 UTC (rev 105807)
+++ branches/chromium/963/Source/WebCore/WebCore.gypi	2012-01-24 22:23:32 UTC (rev 105808)
@@ -4688,6 +4688,8 @@
             'rendering/RenderSummary.h',
             'rendering/RenderTable.cpp',
             'rendering/RenderTable.h',
+            'rendering/RenderTableCaption.cpp',
+            'rendering/RenderTableCaption.h',
             'rendering/RenderTableCell.cpp',
             'rendering/RenderTableCell.h',
             'rendering/RenderTableCol.cpp',

Modified: branches/chromium/963/Source/WebCore/rendering/RenderBlock.cpp (105807 => 105808)


--- branches/chromium/963/Source/WebCore/rendering/RenderBlock.cpp	2012-01-24 22:17:26 UTC (rev 105807)
+++ branches/chromium/963/Source/WebCore/rendering/RenderBlock.cpp	2012-01-24 22:23:32 UTC (rev 105808)
@@ -709,7 +709,7 @@
 
         ASSERT(beforeChildAnonymousContainer->isTable());
         if ((newChild->isTableCol() && newChild->style()->display() == TABLE_COLUMN_GROUP)
-                || (newChild->isRenderBlock() && newChild->style()->display() == TABLE_CAPTION)
+                || (newChild->isTableCaption())
                 || newChild->isTableSection()
                 || newChild->isTableRow()
                 || newChild->isTableCell()) {

Modified: branches/chromium/963/Source/WebCore/rendering/RenderObject.cpp (105807 => 105808)


--- branches/chromium/963/Source/WebCore/rendering/RenderObject.cpp	2012-01-24 22:17:26 UTC (rev 105807)
+++ branches/chromium/963/Source/WebCore/rendering/RenderObject.cpp	2012-01-24 22:23:32 UTC (rev 105808)
@@ -54,6 +54,7 @@
 #include "RenderRegion.h"
 #include "RenderRuby.h"
 #include "RenderRubyText.h"
+#include "RenderTableCaption.h"
 #include "RenderTableCell.h"
 #include "RenderTableCol.h"
 #include "RenderTableRow.h"
@@ -165,7 +166,7 @@
     case TABLE_CELL:
         return new (arena) RenderTableCell(node);
     case TABLE_CAPTION:
-        return new (arena) RenderBlock(node);
+        return new (arena) RenderTableCaption(node);
     case BOX:
     case INLINE_BOX:
         return new (arena) RenderDeprecatedFlexibleBox(node);
@@ -304,7 +305,7 @@
 
     if (newChild->isTableCol() && newChild->style()->display() == TABLE_COLUMN_GROUP)
         needsTable = !isTable();
-    else if (newChild->isRenderBlock() && newChild->style()->display() == TABLE_CAPTION)
+    else if (newChild->isTableCaption())
         needsTable = !isTable();
     else if (newChild->isTableSection())
         needsTable = !isTable();

Modified: branches/chromium/963/Source/WebCore/rendering/RenderObject.h (105807 => 105808)


--- branches/chromium/963/Source/WebCore/rendering/RenderObject.h	2012-01-24 22:17:26 UTC (rev 105807)
+++ branches/chromium/963/Source/WebCore/rendering/RenderObject.h	2012-01-24 22:23:32 UTC (rev 105808)
@@ -327,6 +327,7 @@
     virtual bool isTable() const { return false; }
     virtual bool isTableCell() const { return false; }
     virtual bool isTableCol() const { return false; }
+    virtual bool isTableCaption() const { return false; }
     virtual bool isTableRow() const { return false; }
     virtual bool isTableSection() const { return false; }
     virtual bool isTextControl() const { return false; }

Modified: branches/chromium/963/Source/WebCore/rendering/RenderTable.cpp (105807 => 105808)


--- branches/chromium/963/Source/WebCore/rendering/RenderTable.cpp	2012-01-24 22:17:26 UTC (rev 105807)
+++ branches/chromium/963/Source/WebCore/rendering/RenderTable.cpp	2012-01-24 22:23:32 UTC (rev 105808)
@@ -36,6 +36,7 @@
 #include "HTMLNames.h"
 #include "LayoutRepainter.h"
 #include "RenderLayer.h"
+#include "RenderTableCaption.h"
 #include "RenderTableCell.h"
 #include "RenderTableCol.h"
 #include "RenderTableSection.h"
@@ -115,8 +116,8 @@
 
     bool wrapInAnonymousSection = !child->isPositioned();
 
-    if (child->isRenderBlock() && child->style()->display() == TABLE_CAPTION) {
-        m_captions.append(toRenderBlock(child));
+    if (child->isTableCaption()) {
+        m_captions.append(toRenderTableCaption(child));
         setNeedsSectionRecalc();
         wrapInAnonymousSection = false;
     } else if (child->isTableCol()) {

Modified: branches/chromium/963/Source/WebCore/rendering/RenderTable.h (105807 => 105808)


--- branches/chromium/963/Source/WebCore/rendering/RenderTable.h	2012-01-24 22:17:26 UTC (rev 105807)
+++ branches/chromium/963/Source/WebCore/rendering/RenderTable.h	2012-01-24 22:23:32 UTC (rev 105808)
@@ -33,6 +33,7 @@
 namespace WebCore {
 
 class RenderTableCol;
+class RenderTableCaption;
 class RenderTableCell;
 class RenderTableSection;
 class TableLayout;
@@ -252,7 +253,7 @@
     mutable Vector<LayoutUnit> m_columnPos;
     mutable Vector<ColumnStruct> m_columns;
 
-    mutable Vector<RenderBlock*> m_captions;
+    mutable Vector<RenderTableCaption*> m_captions;
     mutable RenderTableSection* m_head;
     mutable RenderTableSection* m_foot;
     mutable RenderTableSection* m_firstBody;

Copied: branches/chromium/963/Source/WebCore/rendering/RenderTableCaption.cpp (from rev 100473, trunk/Source/WebCore/rendering/RenderTableCaption.cpp) (0 => 105808)


--- branches/chromium/963/Source/WebCore/rendering/RenderTableCaption.cpp	                        (rev 0)
+++ branches/chromium/963/Source/WebCore/rendering/RenderTableCaption.cpp	2012-01-24 22:23:32 UTC (rev 105808)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2011 Robert Hogan <[email protected]>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "RenderTableCaption.h"
+
+using namespace std;
+
+namespace WebCore {
+
+RenderTableCaption::RenderTableCaption(Node* node)
+    : RenderBlock(node)
+{
+}
+
+RenderTableCaption::~RenderTableCaption()
+{
+}
+
+LayoutUnit RenderTableCaption::containingBlockLogicalWidthForContent() const
+{
+    RenderBlock* cb = containingBlock();
+    return cb->logicalWidth();
+}
+
+}

Copied: branches/chromium/963/Source/WebCore/rendering/RenderTableCaption.h (from rev 100473, trunk/Source/WebCore/rendering/RenderTableCaption.h) (0 => 105808)


--- branches/chromium/963/Source/WebCore/rendering/RenderTableCaption.h	                        (rev 0)
+++ branches/chromium/963/Source/WebCore/rendering/RenderTableCaption.h	2012-01-24 22:23:32 UTC (rev 105808)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2011 Robert Hogan <[email protected]>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef RenderTableCaption_h
+#define RenderTableCaption_h
+
+#include "RenderBlock.h"
+
+namespace WebCore {
+
+class RenderTableCaption : public RenderBlock {
+public:
+    explicit RenderTableCaption(Node*);
+    virtual ~RenderTableCaption();
+    
+    virtual LayoutUnit containingBlockLogicalWidthForContent() const;
+    virtual bool isTableCaption() const { return true; }
+};
+
+inline RenderTableCaption* toRenderTableCaption(RenderObject* object)
+{
+    ASSERT(!object || object->isTableCaption());
+    return static_cast<RenderTableCaption*>(object);
+}
+
+} // namespace WebCore
+
+#endif // RenderTableCaption_h
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to