Backed out changeset da35ab16d9fa to change commit message.

This commit is contained in:
Scott Johnson 2012-08-01 20:35:01 -05:00
Родитель b5f724a892
Коммит 5e2fa4e02d
4 изменённых файлов: 16 добавлений и 58 удалений

Просмотреть файл

@ -561,6 +561,7 @@ nsColumnSetFrame::ReflowChildren(nsHTMLReflowMetrics& aDesiredSize,
// columns might not fill the frame exactly, we need to account for the
// slop. Otherwise we'll waste time moving the columns by some tiny
// amount unnecessarily.
nscoord targetX = borderPadding.left;
if (RTL) {
nscoord availWidth = aReflowState.availableWidth;
if (aReflowState.ComputedWidth() != NS_INTRINSICSIZE) {
@ -568,6 +569,7 @@ nsColumnSetFrame::ReflowChildren(nsHTMLReflowMetrics& aDesiredSize,
}
if (availWidth != NS_INTRINSICSIZE) {
childOrigin.x += availWidth - aConfig.mColWidth;
targetX += aConfig.mExpectedWidthLeftOver;
#ifdef DEBUG_roc
printf("*** childOrigin.x = %d\n", childOrigin.x);
#endif
@ -816,6 +818,20 @@ nsColumnSetFrame::ReflowChildren(nsHTMLReflowMetrics& aDesiredSize,
}
}
// If we're doing RTL, we need to make sure our last column is at the left-hand side of the frame.
if (RTL && childOrigin.x != targetX) {
overflowRects.Clear();
contentRect = nsRect(0, 0, 0, 0);
PRInt32 deltaX = targetX - childOrigin.x;
#ifdef DEBUG_roc
printf("*** CHILDORIGIN.x = %d, targetX = %d, DELTAX = %d\n", childOrigin.x, targetX, deltaX);
#endif
for (child = mFrames.FirstChild(); child; child = child->GetNextSibling()) {
MoveChildTo(this, child, child->GetPosition() + nsPoint(deltaX, 0));
ConsiderChildOverflow(overflowRects, child);
contentRect.UnionRect(contentRect, child->GetRect());
}
}
aColData.mMaxHeight = contentBottom;
contentRect.height = NS_MAX(contentRect.height, contentBottom);
mLastFrameStatus = aStatus;

Просмотреть файл

@ -1,26 +0,0 @@
<!doctype html>
<style>
* {
margin: 0 0;
padding: 0 0;
}
/* cosmetics */
table {
border: 1px solid;
width: 100%;
}
td {
width: 25%;
}
</style>
The first column should be aligned with the right side of the block and the second column should be to its direct left.
<table cellspacing=0 cellpadding=0 style="direction:rtl; text-align:right;">
<tr>
<td>1st column</td>
<td>2nd column</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

Просмотреть файл

@ -1,31 +0,0 @@
<!doctype html>
<style>
* {
margin: 0 0;
padding: 0 0;
}
div {
column-gap: 0;
-moz-column-gap: 0;
column-count: 4;
-moz-column-count: 4;
-webkit-column-count: 4;
-o-column-count: 4;
-ms-column-count: 4;
}
/* cosmetics */
div {
border: 1px solid;
}
td {
width: 25%;
}
</style>
The first column should be aligned with the right side of the block and the second column should be to its direct left.
<div style="direction:rtl; text-align:right;">
<p>1st column</p>
<p>2nd column</p>
</div>

Просмотреть файл

@ -16,7 +16,6 @@
== column-balancing-002.html column-balancing-002.ref.html
== column-balancing-003.html column-balancing-000.ref.html
== column-balancing-004.html column-balancing-004.ref.html
== column-box-alignment-rtl.html column-box-alignment-rtl-ref.html
HTTP(..) == columnfill-balance.html columnfill-balance-ref.html
HTTP(..) == columnfill-auto.html columnfill-auto-ref.html
== columnrule-basic.html columnrule-basic-ref.html