Diff
Modified: trunk/LayoutTests/ChangeLog (96821 => 96822)
--- trunk/LayoutTests/ChangeLog 2011-10-06 16:57:25 UTC (rev 96821)
+++ trunk/LayoutTests/ChangeLog 2011-10-06 16:58:22 UTC (rev 96822)
@@ -1,3 +1,16 @@
+2011-10-06 Konstantin Scheglov <[email protected]>
+
+ REGRESSION (r95852?): Disappearing Border on bugs.webkit.org attachments <table>
+ https://bugs.webkit.org/show_bug.cgi?id=69296
+
+ Reviewed by David Hyatt.
+
+ Collapsed borders should not disappear.
+
+ * fast/table/border-collapsing/cached-69296-expected.png: Added.
+ * fast/table/border-collapsing/cached-69296-expected.txt: Added.
+ * fast/table/border-collapsing/cached-69296.html: Added.
+
2011-10-06 Mark Pilgrim <[email protected]>
Test how media element TimeRange methods react to too few arguments
Added: trunk/LayoutTests/fast/table/border-collapsing/cached-69296-expected.png (0 => 96822)
--- trunk/LayoutTests/fast/table/border-collapsing/cached-69296-expected.png (rev 0)
+++ trunk/LayoutTests/fast/table/border-collapsing/cached-69296-expected.png 2011-10-06 16:58:22 UTC (rev 96822)
@@ -0,0 +1,4 @@
+\x89PNG
+
+
+IHDR X ' )tEXtchecksum e889fe034170de567b6880865ee5a3ea\xA95\xD1 IDATx\x9C\xED\xD9\xC1m\xC30A:P)*\x81\xBD\xB8i\x95\xE0^\x94\xA4\x95;3\xF7\xBC\xE3\x82|<\x9F\xCF @\xE7\xE7\xEE \xDFF` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @l9s\xFCz\xBD\xAA\xFCA\xEB\xBA\xDE= >ҩ\xC0clۖ\xEC\xB8Ӽ\xC3\xE6\x9CwO \x80O\xE5\x8B &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b \xB6\xDC=\xE0\xBF{\x8C\xC7\xE1\xDB}\xEC\xE1 \xA0\xE2 &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b \xB6\xDC=\xE0\xBF\xDB\xC7~\xF7 \xE6 &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b\xCB\xC9\xFB9g\xB2\xE3"\xE6 \xEFw6\xB0\xB6mKv\a\xCEi\xDEa\xE2 \xF3E X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X \xB1\xE5\xE4\xFD\x9C3\xD9q\xF3 \x80\xF7;X\xEB\xBAV; \xBE\x86/B \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88\xFDcK"ׇ=xt IEND\xAEB`\x82
\ No newline at end of file
Added: trunk/LayoutTests/fast/table/border-collapsing/cached-69296-expected.txt (0 => 96822)
--- trunk/LayoutTests/fast/table/border-collapsing/cached-69296-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/table/border-collapsing/cached-69296-expected.txt 2011-10-06 16:58:22 UTC (rev 96822)
@@ -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 (20,20) size 760x560
+ RenderTable {TABLE} at (0,0) size 160x101 [border: none]
+ RenderTableSection {TBODY} at (0,0) size 159x100
+ RenderTableRow {TR} at (0,0) size 159x50
+ RenderTableCell {TD} at (0,0) size 53x3 [border: (1px solid #333333)] [r=0 c=0 rs=1 cs=1]
+ RenderTableCell {TD} at (53,23) size 53x3 [border: (1px solid #333333)] [r=0 c=1 rs=1 cs=1]
+ RenderTableCell {TD} at (106,13) size 53x23 [border: (1px solid #333333)] [r=0 c=2 rs=1 cs=1]
+ RenderBlock {DIV} at (2,2) size 50x20
+ RenderBlock {DIV} at (0,0) size 20x20 [bgcolor=#00FF00]
+ RenderTableRow {TR} at (0,50) size 159x50
+ RenderTableCell {TD} at (0,73) size 53x3 [border: (1px solid #333333)] [r=1 c=0 rs=1 cs=1]
+ RenderTableCell {TD} at (53,73) size 53x3 [border: (1px solid #333333)] [r=1 c=1 rs=1 cs=1]
+ RenderTableCell {TD} at (106,73) size 53x3 [border: (1px solid #333333)] [r=1 c=2 rs=1 cs=1]
Added: trunk/LayoutTests/fast/table/border-collapsing/cached-69296.html (0 => 96822)
--- trunk/LayoutTests/fast/table/border-collapsing/cached-69296.html (rev 0)
+++ trunk/LayoutTests/fast/table/border-collapsing/cached-69296.html 2011-10-06 16:58:22 UTC (rev 96822)
@@ -0,0 +1,60 @@
+<!--
+Test for bug69296.
+Collapsed borders should not disappear.
+-->
+<html>
+ <head>
+ <style>
+ BODY {
+ margin: 20px;
+ }
+ TABLE {
+ border-collapse: collapse;
+ }
+ TD {
+ width: 50px;
+ height: 50px;
+ border: 1px solid #333333;
+ }
+ #row1:hover {
+ background-color: #ddd;
+ color: #111;
+ }
+ </style>
+ <head>
+ <script type="text/_javascript_">
+ function test() {
+ document.body.offsetTop;
+ if (window.layoutTestController) {
+ layoutTestController.display();
+ }
+ if (window.eventSender) {
+ row = document.getElementById('row1');
+ rowRect = row.getBoundingClientRect();
+ x = rowRect.left + 75;
+ y = rowRect.top;
+ eventSender.mouseMoveTo(x, y + 1);
+ eventSender.mouseMoveTo(x, y - 1);
+ }
+ }
+ </script>
+ </head>
+ <body _onload_="test()">
+ <table>
+ <tr id="row1">
+ <td valign="top"/>
+ <td/>
+ <td>
+ <div>
+ <div style="width: 20px; height: 20px; background: lime;"/>
+ </div>
+ </td>
+ </tr>
+ <tr id="row2">
+ <td/>
+ <td/>
+ <td/>
+ </tr>
+ </table>
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (96821 => 96822)
--- trunk/Source/WebCore/ChangeLog 2011-10-06 16:57:25 UTC (rev 96821)
+++ trunk/Source/WebCore/ChangeLog 2011-10-06 16:58:22 UTC (rev 96822)
@@ -1,3 +1,28 @@
+2011-10-06 Konstantin Scheglov <[email protected]>
+
+ REGRESSION (r95852?): Disappearing Border on bugs.webkit.org attachments <table>
+ https://bugs.webkit.org/show_bug.cgi?id=69296
+
+ Reviewed by David Hyatt.
+
+ Test: fast/table/border-collapsing/cached-69296.html
+
+ Remember BorderValue in CollapsedBorderValue by value.
+ See https://bugs.webkit.org/show_bug.cgi?id=69296#c7 for motivation.
+
+ * rendering/style/CollapsedBorderValue.h:
+ (WebCore::CollapsedBorderValue::CollapsedBorderValue):
+ (WebCore::CollapsedBorderValue::width):
+ (WebCore::CollapsedBorderValue::style):
+ (WebCore::CollapsedBorderValue::exists):
+ (WebCore::CollapsedBorderValue::isTransparent):
+ (WebCore::CollapsedBorderValue::operator==):
+ * rendering/RenderTableCell.cpp:
+ (WebCore::RenderTableCell::collapsedStartBorder):
+ (WebCore::RenderTableCell::collapsedEndBorder):
+ (WebCore::RenderTableCell::collapsedBeforeBorder):
+ (WebCore::RenderTableCell::collapsedAfterBorder):
+
2011-10-06 Gavin Peters <[email protected]>
save resource zeroing stacks in ScriptElement for debugging
Modified: trunk/Source/WebCore/rendering/RenderTableCell.cpp (96821 => 96822)
--- trunk/Source/WebCore/rendering/RenderTableCell.cpp 2011-10-06 16:57:25 UTC (rev 96821)
+++ trunk/Source/WebCore/rendering/RenderTableCell.cpp 2011-10-06 16:58:22 UTC (rev 96822)
@@ -397,22 +397,22 @@
// (1) Our start border.
int start = CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderStartColor, table->style()->direction(), table->style()->writingMode());
int end = CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderEndColor, table->style()->direction(), table->style()->writingMode());
- CollapsedBorderValue result(&style()->borderStart(), style()->visitedDependentColor(start), BCELL);
+ CollapsedBorderValue result(style()->borderStart(), style()->visitedDependentColor(start), BCELL);
// (2) The end border of the preceding cell.
if (RenderTableCell* prevCell = table->cellBefore(this)) {
- CollapsedBorderValue prevCellBorder = CollapsedBorderValue(&prevCell->style()->borderEnd(), prevCell->style()->visitedDependentColor(end), BCELL);
+ CollapsedBorderValue prevCellBorder = CollapsedBorderValue(prevCell->style()->borderEnd(), prevCell->style()->visitedDependentColor(end), BCELL);
result = chooseBorder(prevCellBorder, result);
if (!result.exists())
return result;
} else if (isStartColumn) {
// (3) Our row's start border.
- result = chooseBorder(result, CollapsedBorderValue(&parent()->style()->borderStart(), parent()->style()->visitedDependentColor(start), BROW));
+ result = chooseBorder(result, CollapsedBorderValue(parent()->style()->borderStart(), parent()->style()->visitedDependentColor(start), BROW));
if (!result.exists())
return result;
// (4) Our row group's start border.
- result = chooseBorder(result, CollapsedBorderValue(§ion()->style()->borderStart(), section()->style()->visitedDependentColor(start), BROWGROUP));
+ result = chooseBorder(result, CollapsedBorderValue(section()->style()->borderStart(), section()->style()->visitedDependentColor(start), BROWGROUP));
if (!result.exists())
return result;
}
@@ -422,11 +422,11 @@
bool endColEdge;
RenderTableCol* colElt = table->colElement(col(), &startColEdge, &endColEdge);
if (colElt && startColEdge) {
- result = chooseBorder(result, CollapsedBorderValue(&colElt->style()->borderStart(), colElt->style()->visitedDependentColor(start), BCOL));
+ result = chooseBorder(result, CollapsedBorderValue(colElt->style()->borderStart(), colElt->style()->visitedDependentColor(start), BCOL));
if (!result.exists())
return result;
if (colElt->parent()->isTableCol() && !colElt->previousSibling()) {
- result = chooseBorder(result, CollapsedBorderValue(&colElt->parent()->style()->borderStart(), colElt->parent()->style()->visitedDependentColor(start), BCOLGROUP));
+ result = chooseBorder(result, CollapsedBorderValue(colElt->parent()->style()->borderStart(), colElt->parent()->style()->visitedDependentColor(start), BCOLGROUP));
if (!result.exists())
return result;
}
@@ -436,14 +436,14 @@
if (!isStartColumn) {
colElt = table->colElement(col() -1, &startColEdge, &endColEdge);
if (colElt && endColEdge) {
- CollapsedBorderValue endBorder = CollapsedBorderValue(&colElt->style()->borderEnd(), colElt->style()->visitedDependentColor(end), BCOL);
+ CollapsedBorderValue endBorder = CollapsedBorderValue(colElt->style()->borderEnd(), colElt->style()->visitedDependentColor(end), BCOL);
result = chooseBorder(endBorder, result);
if (!result.exists())
return result;
}
} else {
// (7) The table's start border.
- result = chooseBorder(result, CollapsedBorderValue(&table->style()->borderStart(), table->style()->visitedDependentColor(start), BTABLE));
+ result = chooseBorder(result, CollapsedBorderValue(table->style()->borderStart(), table->style()->visitedDependentColor(start), BTABLE));
if (!result.exists())
return result;
}
@@ -460,25 +460,25 @@
// (1) Our end border.
int start = CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderStartColor, table->style()->direction(), table->style()->writingMode());
int end = CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderEndColor, table->style()->direction(), table->style()->writingMode());
- CollapsedBorderValue result = CollapsedBorderValue(&style()->borderEnd(), style()->visitedDependentColor(end), BCELL);
+ CollapsedBorderValue result = CollapsedBorderValue(style()->borderEnd(), style()->visitedDependentColor(end), BCELL);
// (2) The start border of the following cell.
if (!isEndColumn) {
RenderTableCell* nextCell = table->cellAfter(this);
if (nextCell && nextCell->style()) {
- CollapsedBorderValue startBorder = CollapsedBorderValue(&nextCell->style()->borderStart(), nextCell->style()->visitedDependentColor(start), BCELL);
+ CollapsedBorderValue startBorder = CollapsedBorderValue(nextCell->style()->borderStart(), nextCell->style()->visitedDependentColor(start), BCELL);
result = chooseBorder(result, startBorder);
if (!result.exists())
return result;
}
} else {
// (3) Our row's end border.
- result = chooseBorder(result, CollapsedBorderValue(&parent()->style()->borderEnd(), parent()->style()->visitedDependentColor(end), BROW));
+ result = chooseBorder(result, CollapsedBorderValue(parent()->style()->borderEnd(), parent()->style()->visitedDependentColor(end), BROW));
if (!result.exists())
return result;
// (4) Our row group's end border.
- result = chooseBorder(result, CollapsedBorderValue(§ion()->style()->borderEnd(), section()->style()->visitedDependentColor(end), BROWGROUP));
+ result = chooseBorder(result, CollapsedBorderValue(section()->style()->borderEnd(), section()->style()->visitedDependentColor(end), BROWGROUP));
if (!result.exists())
return result;
}
@@ -488,11 +488,11 @@
bool endColEdge;
RenderTableCol* colElt = table->colElement(col() + colSpan() - 1, &startColEdge, &endColEdge);
if (colElt && endColEdge) {
- result = chooseBorder(result, CollapsedBorderValue(&colElt->style()->borderEnd(), colElt->style()->visitedDependentColor(end), BCOL));
+ result = chooseBorder(result, CollapsedBorderValue(colElt->style()->borderEnd(), colElt->style()->visitedDependentColor(end), BCOL));
if (!result.exists())
return result;
if (colElt->parent()->isTableCol() && !colElt->nextSibling()) {
- result = chooseBorder(result, CollapsedBorderValue(&colElt->parent()->style()->borderEnd(), colElt->parent()->style()->visitedDependentColor(end), BCOLGROUP));
+ result = chooseBorder(result, CollapsedBorderValue(colElt->parent()->style()->borderEnd(), colElt->parent()->style()->visitedDependentColor(end), BCOLGROUP));
if (!result.exists())
return result;
}
@@ -502,14 +502,14 @@
if (!isEndColumn) {
colElt = table->colElement(col() + colSpan(), &startColEdge, &endColEdge);
if (colElt && startColEdge) {
- CollapsedBorderValue startBorder = CollapsedBorderValue(&colElt->style()->borderStart(), colElt->style()->visitedDependentColor(start), BCOL);
+ CollapsedBorderValue startBorder = CollapsedBorderValue(colElt->style()->borderStart(), colElt->style()->visitedDependentColor(start), BCOL);
result = chooseBorder(result, startBorder);
if (!result.exists())
return result;
}
} else {
// (7) The table's end border.
- result = chooseBorder(result, CollapsedBorderValue(&table->style()->borderEnd(), table->style()->visitedDependentColor(end), BTABLE));
+ result = chooseBorder(result, CollapsedBorderValue(table->style()->borderEnd(), table->style()->visitedDependentColor(end), BTABLE));
if (!result.exists())
return result;
}
@@ -525,18 +525,18 @@
// (1) Our before border.
int before = CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderBeforeColor, table->style()->direction(), table->style()->writingMode());
int after = CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderAfterColor, table->style()->direction(), table->style()->writingMode());
- CollapsedBorderValue result = CollapsedBorderValue(&style()->borderBefore(), style()->visitedDependentColor(before), BCELL);
+ CollapsedBorderValue result = CollapsedBorderValue(style()->borderBefore(), style()->visitedDependentColor(before), BCELL);
RenderTableCell* prevCell = table->cellAbove(this);
if (prevCell) {
// (2) A before cell's after border.
- result = chooseBorder(CollapsedBorderValue(&prevCell->style()->borderAfter(), prevCell->style()->visitedDependentColor(after), BCELL), result);
+ result = chooseBorder(CollapsedBorderValue(prevCell->style()->borderAfter(), prevCell->style()->visitedDependentColor(after), BCELL), result);
if (!result.exists())
return result;
}
// (3) Our row's before border.
- result = chooseBorder(result, CollapsedBorderValue(&parent()->style()->borderBefore(), parent()->style()->visitedDependentColor(before), BROW));
+ result = chooseBorder(result, CollapsedBorderValue(parent()->style()->borderBefore(), parent()->style()->visitedDependentColor(before), BROW));
if (!result.exists())
return result;
@@ -549,7 +549,7 @@
prevRow = prevCell->section()->lastChild();
if (prevRow) {
- result = chooseBorder(CollapsedBorderValue(&prevRow->style()->borderAfter(), prevRow->style()->visitedDependentColor(after), BROW), result);
+ result = chooseBorder(CollapsedBorderValue(prevRow->style()->borderAfter(), prevRow->style()->visitedDependentColor(after), BROW), result);
if (!result.exists())
return result;
}
@@ -559,14 +559,14 @@
RenderTableSection* currSection = section();
if (!row()) {
// (5) Our row group's before border.
- result = chooseBorder(result, CollapsedBorderValue(&currSection->style()->borderBefore(), currSection->style()->visitedDependentColor(before), BROWGROUP));
+ result = chooseBorder(result, CollapsedBorderValue(currSection->style()->borderBefore(), currSection->style()->visitedDependentColor(before), BROWGROUP));
if (!result.exists())
return result;
// (6) Previous row group's after border.
currSection = table->sectionAbove(currSection);
if (currSection) {
- result = chooseBorder(CollapsedBorderValue(&currSection->style()->borderAfter(), currSection->style()->visitedDependentColor(after), BROWGROUP), result);
+ result = chooseBorder(CollapsedBorderValue(currSection->style()->borderAfter(), currSection->style()->visitedDependentColor(after), BROWGROUP), result);
if (!result.exists())
return result;
}
@@ -576,18 +576,18 @@
// (8) Our column and column group's before borders.
RenderTableCol* colElt = table->colElement(col());
if (colElt) {
- result = chooseBorder(result, CollapsedBorderValue(&colElt->style()->borderBefore(), colElt->style()->visitedDependentColor(before), BCOL));
+ result = chooseBorder(result, CollapsedBorderValue(colElt->style()->borderBefore(), colElt->style()->visitedDependentColor(before), BCOL));
if (!result.exists())
return result;
if (colElt->parent()->isTableCol()) {
- result = chooseBorder(result, CollapsedBorderValue(&colElt->parent()->style()->borderBefore(), colElt->parent()->style()->visitedDependentColor(before), BCOLGROUP));
+ result = chooseBorder(result, CollapsedBorderValue(colElt->parent()->style()->borderBefore(), colElt->parent()->style()->visitedDependentColor(before), BCOLGROUP));
if (!result.exists())
return result;
}
}
// (9) The table's before border.
- result = chooseBorder(result, CollapsedBorderValue(&table->style()->borderBefore(), table->style()->visitedDependentColor(before), BTABLE));
+ result = chooseBorder(result, CollapsedBorderValue(table->style()->borderBefore(), table->style()->visitedDependentColor(before), BTABLE));
if (!result.exists())
return result;
}
@@ -603,24 +603,24 @@
// (1) Our after border.
int before = CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderBeforeColor, table->style()->direction(), table->style()->writingMode());
int after = CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderAfterColor, table->style()->direction(), table->style()->writingMode());
- CollapsedBorderValue result = CollapsedBorderValue(&style()->borderAfter(), style()->visitedDependentColor(after), BCELL);
+ CollapsedBorderValue result = CollapsedBorderValue(style()->borderAfter(), style()->visitedDependentColor(after), BCELL);
RenderTableCell* nextCell = table->cellBelow(this);
if (nextCell) {
// (2) An after cell's before border.
- result = chooseBorder(result, CollapsedBorderValue(&nextCell->style()->borderBefore(), nextCell->style()->visitedDependentColor(before), BCELL));
+ result = chooseBorder(result, CollapsedBorderValue(nextCell->style()->borderBefore(), nextCell->style()->visitedDependentColor(before), BCELL));
if (!result.exists())
return result;
}
// (3) Our row's after border. (FIXME: Deal with rowspan!)
- result = chooseBorder(result, CollapsedBorderValue(&parent()->style()->borderAfter(), parent()->style()->visitedDependentColor(after), BROW));
+ result = chooseBorder(result, CollapsedBorderValue(parent()->style()->borderAfter(), parent()->style()->visitedDependentColor(after), BROW));
if (!result.exists())
return result;
// (4) The next row's before border.
if (nextCell) {
- result = chooseBorder(result, CollapsedBorderValue(&nextCell->parent()->style()->borderBefore(), nextCell->parent()->style()->visitedDependentColor(before), BROW));
+ result = chooseBorder(result, CollapsedBorderValue(nextCell->parent()->style()->borderBefore(), nextCell->parent()->style()->visitedDependentColor(before), BROW));
if (!result.exists())
return result;
}
@@ -629,14 +629,14 @@
RenderTableSection* currSection = section();
if (row() + rowSpan() >= currSection->numRows()) {
// (5) Our row group's after border.
- result = chooseBorder(result, CollapsedBorderValue(&currSection->style()->borderAfter(), currSection->style()->visitedDependentColor(after), BROWGROUP));
+ result = chooseBorder(result, CollapsedBorderValue(currSection->style()->borderAfter(), currSection->style()->visitedDependentColor(after), BROWGROUP));
if (!result.exists())
return result;
// (6) Following row group's before border.
currSection = table->sectionBelow(currSection);
if (currSection) {
- result = chooseBorder(result, CollapsedBorderValue(&currSection->style()->borderBefore(), currSection->style()->visitedDependentColor(before), BROWGROUP));
+ result = chooseBorder(result, CollapsedBorderValue(currSection->style()->borderBefore(), currSection->style()->visitedDependentColor(before), BROWGROUP));
if (!result.exists())
return result;
}
@@ -646,17 +646,17 @@
// (8) Our column and column group's after borders.
RenderTableCol* colElt = table->colElement(col());
if (colElt) {
- result = chooseBorder(result, CollapsedBorderValue(&colElt->style()->borderAfter(), colElt->style()->visitedDependentColor(after), BCOL));
+ result = chooseBorder(result, CollapsedBorderValue(colElt->style()->borderAfter(), colElt->style()->visitedDependentColor(after), BCOL));
if (!result.exists()) return result;
if (colElt->parent()->isTableCol()) {
- result = chooseBorder(result, CollapsedBorderValue(&colElt->parent()->style()->borderAfter(), colElt->parent()->style()->visitedDependentColor(after), BCOLGROUP));
+ result = chooseBorder(result, CollapsedBorderValue(colElt->parent()->style()->borderAfter(), colElt->parent()->style()->visitedDependentColor(after), BCOLGROUP));
if (!result.exists())
return result;
}
}
// (9) The table's after border.
- result = chooseBorder(result, CollapsedBorderValue(&table->style()->borderAfter(), table->style()->visitedDependentColor(after), BTABLE));
+ result = chooseBorder(result, CollapsedBorderValue(table->style()->borderAfter(), table->style()->visitedDependentColor(after), BTABLE));
if (!result.exists())
return result;
}
Modified: trunk/Source/WebCore/rendering/style/CollapsedBorderValue.h (96821 => 96822)
--- trunk/Source/WebCore/rendering/style/CollapsedBorderValue.h 2011-10-06 16:57:25 UTC (rev 96821)
+++ trunk/Source/WebCore/rendering/style/CollapsedBorderValue.h 2011-10-06 16:58:22 UTC (rev 96822)
@@ -30,41 +30,35 @@
namespace WebCore {
class CollapsedBorderValue {
-friend class RenderStyle;
public:
CollapsedBorderValue()
- : m_border(0)
- , m_precedence(BOFF)
+ : m_precedence(BOFF)
{
}
- CollapsedBorderValue(const BorderValue* b, Color c, EBorderPrecedence p)
+ CollapsedBorderValue(const BorderValue& b, Color c, EBorderPrecedence p)
: m_border(b)
, m_borderColor(c)
, m_precedence(p)
{
}
- int width() const { return m_border && m_border->nonZero() ? m_border->width() : 0; }
- EBorderStyle style() const { return m_border ? m_border->style() : BHIDDEN; }
- bool exists() const { return m_border; }
+ int width() const { return m_border.nonZero() ? m_border.width() : 0; }
+ EBorderStyle style() const { return m_border.style(); }
+ bool exists() const { return m_precedence != BOFF; }
const Color& color() const { return m_borderColor; }
- bool isTransparent() const { return m_border ? m_border->isTransparent() : true; }
+ bool isTransparent() const { return m_border.isTransparent(); }
EBorderPrecedence precedence() const { return m_precedence; }
bool operator==(const CollapsedBorderValue& o) const
{
- if (!m_border)
- return !o.m_border;
- if (!o.m_border)
- return false;
- return *m_border == *o.m_border && m_borderColor == o.m_borderColor && m_precedence == o.m_precedence;
+ return m_border == o.m_border && m_borderColor == o.m_borderColor && m_precedence == o.m_precedence;
}
private:
- const BorderValue* m_border;
+ BorderValue m_border;
Color m_borderColor;
- EBorderPrecedence m_precedence;
+ EBorderPrecedence m_precedence;
};
} // namespace WebCore