зеркало из https://github.com/mozilla/gecko-dev.git
Bug 779566: Remove code from nsColumnSetFrame that aligns RTL columns to the left of the frame.
This commit is contained in:
Родитель
b0323e13a7
Коммит
b5f724a892
|
@ -561,7 +561,6 @@ 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) {
|
||||
|
@ -569,7 +568,6 @@ 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
|
||||
|
@ -818,20 +816,6 @@ 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;
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
<!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> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
|
@ -0,0 +1,31 @@
|
|||
<!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,6 +16,7 @@
|
|||
== 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
|
||||
|
|
Загрузка…
Ссылка в новой задаче