[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
hyatt at apple.com
hyatt at apple.com
Wed Dec 22 13:44:44 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 230b280e9b601c852c29c409a954ec299c2335ad
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Sep 24 19:14:27 2010 +0000
https://bugs.webkit.org/show_bug.cgi?id=46489, rename the lineWidth and left/RightOffset methods
to reflect that they will be logical.
Reviewed by Sam Weinig.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::determineHorizontalPosition):
(WebCore::RenderBlock::leftSelectionOffset):
(WebCore::RenderBlock::rightSelectionOffset):
(WebCore::RenderBlock::positionNewFloats):
(WebCore::RenderBlock::logicalLeftOffsetForContent):
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::logicalRightOffsetForContent):
(WebCore::RenderBlock::logicalRightOffsetForLine):
(WebCore::RenderBlock::availableLogicalWidthForLine):
(WebCore::RenderBlock::getClearDelta):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::logicalRightOffsetForLine):
(WebCore::RenderBlock::logicalLeftOffsetForLine):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
(WebCore::RenderBlock::layoutInlineChildren):
(WebCore::RenderBlock::skipTrailingWhitespace):
(WebCore::RenderBlock::skipLeadingWhitespace):
(WebCore::RenderBlock::fitBelowFloats):
(WebCore::RenderBlock::findNextLineBreak):
(WebCore::RenderBlock::checkLinesForTextOverflow):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::containingBlockWidthForContent):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::applyLineClamp):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::positionListMarker):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::computeLogicalWidth):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::selectionTop):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 047e484..3885dad 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,43 @@
+2010-09-24 David Hyatt <hyatt at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=46489, rename the lineWidth and left/RightOffset methods
+ to reflect that they will be logical.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::determineHorizontalPosition):
+ (WebCore::RenderBlock::leftSelectionOffset):
+ (WebCore::RenderBlock::rightSelectionOffset):
+ (WebCore::RenderBlock::positionNewFloats):
+ (WebCore::RenderBlock::logicalLeftOffsetForContent):
+ (WebCore::RenderBlock::logicalLeftOffsetForLine):
+ (WebCore::RenderBlock::logicalRightOffsetForContent):
+ (WebCore::RenderBlock::logicalRightOffsetForLine):
+ (WebCore::RenderBlock::availableLogicalWidthForLine):
+ (WebCore::RenderBlock::getClearDelta):
+ * rendering/RenderBlock.h:
+ (WebCore::RenderBlock::logicalRightOffsetForLine):
+ (WebCore::RenderBlock::logicalLeftOffsetForLine):
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
+ (WebCore::RenderBlock::layoutInlineChildren):
+ (WebCore::RenderBlock::skipTrailingWhitespace):
+ (WebCore::RenderBlock::skipLeadingWhitespace):
+ (WebCore::RenderBlock::fitBelowFloats):
+ (WebCore::RenderBlock::findNextLineBreak):
+ (WebCore::RenderBlock::checkLinesForTextOverflow):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::containingBlockWidthForContent):
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::applyLineClamp):
+ * rendering/RenderListItem.cpp:
+ (WebCore::RenderListItem::positionListMarker):
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::computeLogicalWidth):
+ * rendering/RootInlineBox.cpp:
+ (WebCore::RootInlineBox::selectionTop):
+
2010-09-24 Abhishek Arya <inferno at chromium.org>
Reviewed by Simon Fraser.
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index e30a0a2..5180b51 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -1649,7 +1649,7 @@ void RenderBlock::determineHorizontalPosition(RenderBox* child)
// Some objects (e.g., tables, horizontal rules, overflow:auto blocks) avoid floats. They need
// to shift over as necessary to dodge any floats that might get in the way.
if (child->avoidsFloats()) {
- int leftOff = leftOffset(height(), false);
+ int leftOff = logicalLeftOffsetForLine(height(), false);
if (style()->textAlign() != WEBKIT_CENTER && child->style()->marginLeft().type() != Auto) {
if (child->marginLeft() < 0)
leftOff += child->marginLeft();
@@ -1661,7 +1661,7 @@ void RenderBlock::determineHorizontalPosition(RenderBox* child)
// width computation will take into account the delta between |leftOff| and |xPos|
// so that we can just pass the content width in directly to the |computeInlineDirectionMargins|
// function.
- child->computeInlineDirectionMargins(child->style()->marginLeft(), child->style()->marginRight(), lineWidth(child->y(), false));
+ child->computeInlineDirectionMargins(child->style()->marginLeft(), child->style()->marginRight(), availableLogicalWidthForLine(child->y(), false));
chPos = leftOff + child->marginLeft();
}
}
@@ -1671,7 +1671,7 @@ void RenderBlock::determineHorizontalPosition(RenderBox* child)
xPos += availableWidth();
int chPos = xPos - (child->width() + child->marginRight());
if (child->avoidsFloats()) {
- int rightOff = rightOffset(height(), false);
+ int rightOff = logicalRightOffsetForLine(height(), false);
if (style()->textAlign() != WEBKIT_CENTER && child->style()->marginRight().type() != Auto) {
if (child->marginRight() < 0)
rightOff -= child->marginRight();
@@ -1682,7 +1682,7 @@ void RenderBlock::determineHorizontalPosition(RenderBox* child)
// width computation will take into account the delta between |rightOff| and |xPos|
// so that we can just pass the content width in directly to the |computeInlineDirectionMargins|
// function.
- child->computeInlineDirectionMargins(child->style()->marginLeft(), child->style()->marginRight(), lineWidth(child->y(), false));
+ child->computeInlineDirectionMargins(child->style()->marginLeft(), child->style()->marginRight(), availableLogicalWidthForLine(child->y(), false));
chPos = rightOff - child->marginRight() - child->width();
}
}
@@ -2807,7 +2807,7 @@ void RenderBlock::getHorizontalSelectionGapInfo(SelectionState state, bool& left
int RenderBlock::leftSelectionOffset(RenderBlock* rootBlock, int yPos)
{
- int left = leftOffset(yPos, false);
+ int left = logicalLeftOffsetForLine(yPos, false);
if (left == borderLeft() + paddingLeft()) {
if (rootBlock != this)
// The border can potentially be further extended by our containingBlock().
@@ -2827,7 +2827,7 @@ int RenderBlock::leftSelectionOffset(RenderBlock* rootBlock, int yPos)
int RenderBlock::rightSelectionOffset(RenderBlock* rootBlock, int yPos)
{
- int right = rightOffset(yPos, false);
+ int right = logicalRightOffsetForLine(yPos, false);
if (right == (contentWidth() + (borderLeft() + paddingLeft()))) {
if (rootBlock != this)
// The border can potentially be further extended by our containingBlock().
@@ -3008,8 +3008,8 @@ bool RenderBlock::positionNewFloats()
RenderBox* o = f->m_renderer;
- int ro = rightOffset(); // Constant part of right offset.
- int lo = leftOffset(); // Constant part of left offset.
+ int ro = logicalRightOffsetForContent(); // Constant part of right offset.
+ int lo = logicalLeftOffsetForContent(); // Constant part of left offset.
int fwidth = f->m_width; // The width we look for.
if (ro - lo < fwidth)
fwidth = ro - lo; // Never look for more than what will be available.
@@ -3024,10 +3024,10 @@ bool RenderBlock::positionNewFloats()
if (o->style()->floating() == FLEFT) {
int heightRemainingLeft = 1;
int heightRemainingRight = 1;
- int fx = leftRelOffset(y, lo, false, &heightRemainingLeft);
- while (rightRelOffset(y, ro, false, &heightRemainingRight)-fx < fwidth) {
+ int fx = logicalLeftOffsetForLine(y, lo, false, &heightRemainingLeft);
+ while (logicalRightOffsetForLine(y, ro, false, &heightRemainingRight)-fx < fwidth) {
y += min(heightRemainingLeft, heightRemainingRight);
- fx = leftRelOffset(y, lo, false, &heightRemainingLeft);
+ fx = logicalLeftOffsetForLine(y, lo, false, &heightRemainingLeft);
}
fx = max(0, fx);
f->m_left = fx;
@@ -3035,10 +3035,10 @@ bool RenderBlock::positionNewFloats()
} else {
int heightRemainingLeft = 1;
int heightRemainingRight = 1;
- int fx = rightRelOffset(y, ro, false, &heightRemainingRight);
- while (fx - leftRelOffset(y, lo, false, &heightRemainingLeft) < fwidth) {
+ int fx = logicalRightOffsetForLine(y, ro, false, &heightRemainingRight);
+ while (fx - logicalLeftOffsetForLine(y, lo, false, &heightRemainingLeft) < fwidth) {
y += min(heightRemainingLeft, heightRemainingRight);
- fx = rightRelOffset(y, ro, false, &heightRemainingRight);
+ fx = logicalRightOffsetForLine(y, ro, false, &heightRemainingRight);
}
f->m_left = fx - f->m_width;
o->setLocation(fx - o->marginRight() - o->width(), y + o->marginTop());
@@ -3201,12 +3201,12 @@ HashSet<RenderBox*>* RenderBlock::percentHeightDescendants() const
return gPercentHeightDescendantsMap ? gPercentHeightDescendantsMap->get(this) : 0;
}
-int RenderBlock::leftOffset() const
+int RenderBlock::logicalLeftOffsetForContent() const
{
return borderLeft() + paddingLeft();
}
-int RenderBlock::leftRelOffset(int y, int fixedOffset, bool applyTextIndent, int* heightRemaining) const
+int RenderBlock::logicalLeftOffsetForLine(int y, int fixedOffset, bool applyTextIndent, int* heightRemaining) const
{
int left = fixedOffset;
if (m_floatingObjects) {
@@ -3234,12 +3234,12 @@ int RenderBlock::leftRelOffset(int y, int fixedOffset, bool applyTextIndent, int
return left;
}
-int RenderBlock::rightOffset() const
+int RenderBlock::logicalRightOffsetForContent() const
{
return borderLeft() + paddingLeft() + availableWidth();
}
-int RenderBlock::rightRelOffset(int y, int fixedOffset, bool applyTextIndent, int* heightRemaining) const
+int RenderBlock::logicalRightOffsetForLine(int y, int fixedOffset, bool applyTextIndent, int* heightRemaining) const
{
int right = fixedOffset;
@@ -3269,9 +3269,9 @@ int RenderBlock::rightRelOffset(int y, int fixedOffset, bool applyTextIndent, in
}
int
-RenderBlock::lineWidth(int y, bool firstLine) const
+RenderBlock::availableLogicalWidthForLine(int position, bool firstLine) const
{
- int result = rightOffset(y, firstLine) - leftOffset(y, firstLine);
+ int result = logicalRightOffsetForLine(position, firstLine) - logicalLeftOffsetForLine(position, firstLine);
return (result < 0) ? 0 : result;
}
@@ -3938,7 +3938,7 @@ int RenderBlock::getClearDelta(RenderBox* child, int yPos)
int y = yPos;
while (true) {
- int widthAtY = lineWidth(y, false);
+ int widthAtY = availableLogicalWidthForLine(y, false);
if (widthAtY == availableWidth)
return y - yPos;
diff --git a/WebCore/rendering/RenderBlock.h b/WebCore/rendering/RenderBlock.h
index bddb037..87cae1d 100644
--- a/WebCore/rendering/RenderBlock.h
+++ b/WebCore/rendering/RenderBlock.h
@@ -102,15 +102,14 @@ public:
bool containsFloats() { return m_floatingObjects && !m_floatingObjects->isEmpty(); }
bool containsFloat(RenderObject*);
- int lineWidth(int y, bool firstLine) const;
+ int availableLogicalWidthForLine(int position, bool firstLine) const;
+ int logicalRightOffsetForLine(int position, bool firstLine) const { return logicalRightOffsetForLine(position, logicalRightOffsetForContent(), firstLine); }
+ int logicalLeftOffsetForLine(int position, bool firstLine) const { return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(), firstLine); }
virtual int lowestPosition(bool includeOverflowInterior = true, bool includeSelf = true) const;
virtual int rightmostPosition(bool includeOverflowInterior = true, bool includeSelf = true) const;
virtual int leftmostPosition(bool includeOverflowInterior = true, bool includeSelf = true) const;
-
- int rightOffset(int y, bool firstLine) const { return rightRelOffset(y, rightOffset(), firstLine); }
- int leftOffset(int y, bool firstLine) const { return leftRelOffset(y, leftOffset(), firstLine); }
-
+
virtual VisiblePosition positionForPoint(const IntPoint&);
// Block flows subclass availableWidth to handle multi column layout (shrinking the width available to children when laying out.)
@@ -222,8 +221,10 @@ protected:
virtual void paint(PaintInfo&, int tx, int ty);
virtual void paintObject(PaintInfo&, int tx, int ty);
- int rightRelOffset(int y, int fixedOffset, bool applyTextIndent = true, int* heightRemaining = 0) const;
- int leftRelOffset(int y, int fixedOffset, bool applyTextIndent = true, int* heightRemaining = 0) const;
+ int logicalRightOffsetForContent() const;
+ int logicalLeftOffsetForContent() const;
+ int logicalRightOffsetForLine(int position, int fixedOffset, bool applyTextIndent = true, int* logicalHeightRemaining = 0) const;
+ int logicalLeftOffsetForLine(int position, int fixedOffset, bool applyTextIndent = true, int* logicalHeightRemaining = 0) const;
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
@@ -409,8 +410,6 @@ private:
inline int leftBottom();
inline int rightBottom();
- int rightOffset() const;
- int leftOffset() const;
virtual bool hitTestColumns(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
virtual bool hitTestContents(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
bool hitTestFloats(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty);
diff --git a/WebCore/rendering/RenderBlockLineLayout.cpp b/WebCore/rendering/RenderBlockLineLayout.cpp
index da24d9c..81788db 100644
--- a/WebCore/rendering/RenderBlockLineLayout.cpp
+++ b/WebCore/rendering/RenderBlockLineLayout.cpp
@@ -323,7 +323,7 @@ RootInlineBox* RenderBlock::constructLine(unsigned runCount, BidiRun* firstRun,
void RenderBlock::computeInlineDirectionPositionsForLine(RootInlineBox* lineBox, bool firstLine, BidiRun* firstRun, BidiRun* trailingSpaceRun, bool reachedEnd, GlyphOverflowAndFallbackFontsMap& textBoxDataMap)
{
// First determine our total width.
- int availableWidth = lineWidth(height(), firstLine);
+ int availableWidth = availableLogicalWidthForLine(height(), firstLine);
int totWidth = lineBox->getFlowSpacingLogicalWidth();
bool needsWordSpacing = false;
unsigned numSpaces = 0;
@@ -384,7 +384,7 @@ void RenderBlock::computeInlineDirectionPositionsForLine(RootInlineBox* lineBox,
// we now examine our text-align property in order to determine where to position the
// objects horizontally. The total width of the line can be increased if we end up
// justifying text.
- int x = leftOffset(height(), firstLine);
+ int x = logicalLeftOffsetForLine(height(), firstLine);
switch (textAlign) {
case LEFT:
case WEBKIT_LEFT:
@@ -802,12 +802,12 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i
int adjustment = 0;
adjustLinePositionForPagination(lineBox, adjustment);
if (adjustment) {
- int oldLineWidth = lineWidth(oldHeight, firstLine);
+ int oldLineWidth = availableLogicalWidthForLine(oldHeight, firstLine);
lineBox->adjustPosition(0, adjustment);
if (useRepaintBounds) // This can only be a positive adjustment, so no need to update repaintTop.
repaintBottom = max(repaintBottom, lineBox->bottomVisibleOverflow());
- if (lineWidth(oldHeight + adjustment, firstLine) != oldLineWidth) {
+ if (availableLogicalWidthForLine(oldHeight + adjustment, firstLine) != oldLineWidth) {
// We have to delete this line, remove all floats that got added, and let line layout re-run.
lineBox->deleteLine(renderArena());
removeFloatingObjectsBelow(lastFloatFromPreviousLine, oldHeight);
@@ -1279,14 +1279,14 @@ void RenderBlock::skipTrailingWhitespace(InlineIterator& iterator, bool isLineEm
// A relative positioned inline encloses us. In this case, we also have to determine our
// position as though we were an inline. Set |staticX| and |staticY| on the relative positioned
// inline so that we can obtain the value later.
- toRenderInline(c)->layer()->setStaticX(style()->direction() == LTR ? leftOffset(height(), false) : rightOffset(height(), false));
+ toRenderInline(c)->layer()->setStaticX(style()->direction() == LTR ? logicalLeftOffsetForLine(height(), false) : logicalRightOffsetForLine(height(), false));
toRenderInline(c)->layer()->setStaticY(height());
}
RenderBox* box = toRenderBox(object);
if (box->style()->hasStaticX()) {
if (box->style()->isOriginalDisplayInlineType())
- box->layer()->setStaticX(style()->direction() == LTR ? leftOffset(height(), false) : width() - rightOffset(height(), false));
+ box->layer()->setStaticX(style()->direction() == LTR ? logicalLeftOffsetForLine(height(), false) : width() - logicalRightOffsetForLine(height(), false));
else
box->layer()->setStaticX(style()->direction() == LTR ? borderLeft() + paddingLeft() : borderRight() + paddingRight());
}
@@ -1301,12 +1301,12 @@ void RenderBlock::skipTrailingWhitespace(InlineIterator& iterator, bool isLineEm
int RenderBlock::skipLeadingWhitespace(InlineBidiResolver& resolver, bool firstLine, bool isLineEmpty, bool previousLineBrokeCleanly,
FloatingObject* lastFloatFromPreviousLine)
{
- int availableWidth = lineWidth(height(), firstLine);
+ int availableWidth = availableLogicalWidthForLine(height(), firstLine);
while (!resolver.position().atEnd() && !requiresLineBox(resolver.position(), isLineEmpty, previousLineBrokeCleanly)) {
RenderObject* object = resolver.position().obj;
if (object->isFloating()) {
positionNewFloatOnLine(insertFloatingObject(toRenderBox(object)), lastFloatFromPreviousLine);
- availableWidth = lineWidth(height(), firstLine);
+ availableWidth = availableLogicalWidthForLine(height(), firstLine);
} else if (object->isPositioned()) {
// FIXME: The math here is actually not really right. It's a best-guess approximation that
// will work for the common cases
@@ -1315,14 +1315,14 @@ int RenderBlock::skipLeadingWhitespace(InlineBidiResolver& resolver, bool firstL
// A relative positioned inline encloses us. In this case, we also have to determine our
// position as though we were an inline. Set |staticX| and |staticY| on the relative positioned
// inline so that we can obtain the value later.
- toRenderInline(c)->layer()->setStaticX(style()->direction() == LTR ? leftOffset(height(), firstLine) : rightOffset(height(), firstLine));
+ toRenderInline(c)->layer()->setStaticX(style()->direction() == LTR ? logicalLeftOffsetForLine(height(), firstLine) : logicalRightOffsetForLine(height(), firstLine));
toRenderInline(c)->layer()->setStaticY(height());
}
RenderBox* box = toRenderBox(object);
if (box->style()->hasStaticX()) {
if (box->style()->isOriginalDisplayInlineType())
- box->layer()->setStaticX(style()->direction() == LTR ? leftOffset(height(), firstLine) : width() - rightOffset(height(), firstLine));
+ box->layer()->setStaticX(style()->direction() == LTR ? logicalLeftOffsetForLine(height(), firstLine) : width() - logicalRightOffsetForLine(height(), firstLine));
else
box->layer()->setStaticX(style()->direction() == LTR ? borderLeft() + paddingLeft() : borderRight() + paddingRight());
}
@@ -1365,7 +1365,7 @@ void RenderBlock::fitBelowFloats(int widthToFit, bool firstLine, int& availableW
if (!floatBottom)
break;
- newLineWidth = lineWidth(floatBottom, firstLine);
+ newLineWidth = availableLogicalWidthForLine(floatBottom, firstLine);
lastFloatBottom = floatBottom;
if (newLineWidth >= widthToFit)
break;
@@ -1515,7 +1515,7 @@ InlineIterator RenderBlock::findNextLineBreak(InlineBidiResolver& resolver, bool
// it after moving to next line (in newLine() func)
if (floatsFitOnLine && floatBox->width() + floatBox->marginLeft() + floatBox->marginRight() + w + tmpW <= width) {
positionNewFloatOnLine(f, lastFloatFromPreviousLine);
- width = lineWidth(height(), firstLine);
+ width = availableLogicalWidthForLine(height(), firstLine);
} else
floatsFitOnLine = false;
} else if (o->isPositioned()) {
@@ -2102,8 +2102,8 @@ void RenderBlock::checkLinesForTextOverflow()
// Include the scrollbar for overflow blocks, which means we want to use "contentWidth()"
bool ltr = style()->direction() == LTR;
for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) {
- int blockRightEdge = rightOffset(curr->y(), curr == firstRootBox());
- int blockLeftEdge = leftOffset(curr->y(), curr == firstRootBox());
+ int blockRightEdge = logicalRightOffsetForLine(curr->y(), curr == firstRootBox());
+ int blockLeftEdge = logicalLeftOffsetForLine(curr->y(), curr == firstRootBox());
int lineBoxEdge = ltr ? curr->x() + curr->logicalWidth() : curr->x();
if ((ltr && lineBoxEdge > blockRightEdge) || (!ltr && lineBoxEdge < blockLeftEdge)) {
// This line spills out of our box in the appropriate direction. Now we need to see if the line
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index 83937a8..d89865f 100644
--- a/WebCore/rendering/RenderBox.cpp
+++ b/WebCore/rendering/RenderBox.cpp
@@ -1039,7 +1039,7 @@ int RenderBox::containingBlockWidthForContent() const
{
RenderBlock* cb = containingBlock();
if (shrinkToAvoidFloats())
- return cb->lineWidth(y(), false);
+ return cb->availableLogicalWidthForLine(y(), false);
return cb->availableWidth();
}
diff --git a/WebCore/rendering/RenderFlexibleBox.cpp b/WebCore/rendering/RenderFlexibleBox.cpp
index 5ebe177..9f07a36 100644
--- a/WebCore/rendering/RenderFlexibleBox.cpp
+++ b/WebCore/rendering/RenderFlexibleBox.cpp
@@ -1010,8 +1010,8 @@ void RenderFlexibleBox::applyLineClamp(FlexBoxIterator& iterator, bool relayoutC
continue;
int ltr = true;
- int blockRightEdge = destBlock->rightOffset(lastVisibleLine->y(), false);
- int blockLeftEdge = destBlock->leftOffset(lastVisibleLine->y(), false);
+ int blockRightEdge = destBlock->logicalRightOffsetForLine(lastVisibleLine->y(), false);
+ int blockLeftEdge = destBlock->logicalLeftOffsetForLine(lastVisibleLine->y(), false);
int blockEdge = ltr ? blockRightEdge : blockLeftEdge;
if (!lastVisibleLine->canAccommodateEllipsis(ltr, blockEdge,
diff --git a/WebCore/rendering/RenderListItem.cpp b/WebCore/rendering/RenderListItem.cpp
index 525abe7..9119f84 100644
--- a/WebCore/rendering/RenderListItem.cpp
+++ b/WebCore/rendering/RenderListItem.cpp
@@ -262,7 +262,7 @@ void RenderListItem::positionListMarker()
// and really shouldn't keep propagating overflow up. This won't really break anything other than repainting
// not being as tight as it could be though.
if (style()->direction() == LTR) {
- int leftLineOffset = leftRelOffset(yOffset, leftOffset(yOffset, false), false);
+ int leftLineOffset = logicalLeftOffsetForLine(yOffset, logicalLeftOffsetForLine(yOffset, false), false);
markerXPos = leftLineOffset - xOffset - paddingLeft() - borderLeft() + m_marker->marginLeft();
m_marker->inlineBoxWrapper()->adjustPosition(markerXPos - markerOldX, 0);
for (InlineFlowBox* box = m_marker->inlineBoxWrapper()->parent(); box; box = box->parent()) {
@@ -273,7 +273,7 @@ void RenderListItem::positionListMarker()
}
}
} else {
- int rightLineOffset = rightRelOffset(yOffset, rightOffset(yOffset, false), false);
+ int rightLineOffset = logicalRightOffsetForLine(yOffset, logicalRightOffsetForLine(yOffset, false), false);
markerXPos = rightLineOffset - xOffset + paddingRight() + borderRight() + m_marker->marginLeft();
m_marker->inlineBoxWrapper()->adjustPosition(markerXPos - markerOldX, 0);
for (InlineFlowBox* box = m_marker->inlineBoxWrapper()->parent(); box; box = box->parent()) {
diff --git a/WebCore/rendering/RenderTable.cpp b/WebCore/rendering/RenderTable.cpp
index 0c81343..51a02de 100644
--- a/WebCore/rendering/RenderTable.cpp
+++ b/WebCore/rendering/RenderTable.cpp
@@ -210,7 +210,7 @@ void RenderTable::computeLogicalWidth()
} else {
// An auto width table should shrink to fit within the line width if necessary in order to
// avoid overlapping floats.
- availableWidth = cb->lineWidth(y(), false);
+ availableWidth = cb->availableLogicalWidthForLine(y(), false);
// Subtract out any fixed margins from our available width for auto width tables.
int marginTotal = 0;
diff --git a/WebCore/rendering/RootInlineBox.cpp b/WebCore/rendering/RootInlineBox.cpp
index baa8635..52586c5 100644
--- a/WebCore/rendering/RootInlineBox.cpp
+++ b/WebCore/rendering/RootInlineBox.cpp
@@ -353,10 +353,10 @@ int RootInlineBox::selectionTop() const
// This line has actually been moved further down, probably from a large line-height, but possibly because the
// line was forced to clear floats. If so, let's check the offsets, and only be willing to use the previous
// line's bottom overflow if the offsets are greater on both sides.
- int prevLeft = block()->leftOffset(prevBottom, !prevRootBox());
- int prevRight = block()->rightOffset(prevBottom, !prevRootBox());
- int newLeft = block()->leftOffset(selectionTop, !prevRootBox());
- int newRight = block()->rightOffset(selectionTop, !prevRootBox());
+ int prevLeft = block()->logicalLeftOffsetForLine(prevBottom, !prevRootBox());
+ int prevRight = block()->logicalRightOffsetForLine(prevBottom, !prevRootBox());
+ int newLeft = block()->logicalLeftOffsetForLine(selectionTop, !prevRootBox());
+ int newRight = block()->logicalRightOffsetForLine(selectionTop, !prevRootBox());
if (prevLeft > newLeft || prevRight < newRight)
return selectionTop;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list