[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:45 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 39d2510a8d7fd66c668f6794b474e15525746814
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Sep 24 19:32:55 2010 +0000
https://bugs.webkit.org/show_bug.cgi?id=46496, rename containingBlockWidthForContent to
containingBlockLogicalWidthForContent.
Reviewed by Sam Weinig.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::localCaretRect):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::containingBlockLogicalWidthForContent):
(WebCore::RenderBox::computeLogicalWidth):
(WebCore::RenderBox::computeReplacedWidthUsing):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::relativePositionOffsetX):
(WebCore::RenderBoxModelObject::containingBlockLogicalWidthForContent):
* rendering/RenderBoxModelObject.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3885dad..e40d167 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,25 @@
Reviewed by Sam Weinig.
+ https://bugs.webkit.org/show_bug.cgi?id=46496, rename containingBlockWidthForContent to
+ containingBlockLogicalWidthForContent.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::localCaretRect):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::containingBlockLogicalWidthForContent):
+ (WebCore::RenderBox::computeLogicalWidth):
+ (WebCore::RenderBox::computeReplacedWidthUsing):
+ * rendering/RenderBox.h:
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::relativePositionOffsetX):
+ (WebCore::RenderBoxModelObject::containingBlockLogicalWidthForContent):
+ * rendering/RenderBoxModelObject.h:
+
+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.
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index 5180b51..a0b2605 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -5781,7 +5781,7 @@ IntRect RenderBlock::localCaretRect(InlineBox* inlineBox, int caretOffset, int*
// FIXME: why call localToAbsoluteForContent() twice here, too?
FloatPoint absRightPoint = localToAbsolute(FloatPoint(myRight, 0));
- int containerRight = containingBlock()->x() + containingBlockWidthForContent();
+ int containerRight = containingBlock()->x() + containingBlockLogicalWidthForContent();
FloatPoint absContainerPoint = localToAbsolute(FloatPoint(containerRight, 0));
*extraWidthToEndOfLine = absContainerPoint.x() - absRightPoint.x();
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index d89865f..892c821 100644
--- a/WebCore/rendering/RenderBox.cpp
+++ b/WebCore/rendering/RenderBox.cpp
@@ -1035,12 +1035,12 @@ IntRect RenderBox::clipRect(int tx, int ty)
return IntRect(clipX, clipY, clipWidth, clipHeight);
}
-int RenderBox::containingBlockWidthForContent() const
+int RenderBox::containingBlockLogicalWidthForContent() const
{
RenderBlock* cb = containingBlock();
if (shrinkToAvoidFloats())
return cb->availableLogicalWidthForLine(y(), false);
- return cb->availableWidth();
+ return cb->availableLogicalWidth();
}
void RenderBox::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState& transformState) const
@@ -1360,12 +1360,16 @@ void RenderBox::computeLogicalWidth()
// The parent box is flexing us, so it has increased or decreased our
// width. Use the width from the style context.
+ // FIXME: Account for block-flow in flexible boxes.
+ // https://bugs.webkit.org/show_bug.cgi?id=46418
if (hasOverrideSize() && parent()->style()->boxOrient() == HORIZONTAL
&& parent()->isFlexibleBox() && parent()->isFlexingChildren()) {
setWidth(overrideSize());
return;
}
+ // FIXME: Account for block-flow in flexible boxes.
+ // https://bugs.webkit.org/show_bug.cgi?id=46418
bool inVerticalBox = parent()->isFlexibleBox() && (parent()->style()->boxOrient() == VERTICAL);
bool stretching = (parent()->style()->boxAlign() == BSTRETCH);
bool treatAsReplaced = shouldComputeSizeAsReplaced() && (!inVerticalBox || !stretching);
@@ -1373,7 +1377,7 @@ void RenderBox::computeLogicalWidth()
Length w = (treatAsReplaced) ? Length(computeReplacedWidth(), Fixed) : style()->width();
RenderBlock* cb = containingBlock();
- int containerWidth = max(0, containingBlockWidthForContent());
+ int containerWidth = max(0, containingBlockLogicalWidthForContent());
Length marginLeft = style()->marginLeft();
Length marginRight = style()->marginRight();
@@ -1724,7 +1728,10 @@ int RenderBox::computeReplacedWidthUsing(Length width) const
case Fixed:
return computeContentBoxLogicalWidth(width.value());
case Percent: {
- const int cw = isPositioned() ? containingBlockWidthForPositioned(toRenderBoxModelObject(container())) : containingBlockWidthForContent();
+ // FIXME: containingBlockLogicalWidthForContent() is wrong if the replaced element's block-flow is perpendicular to the
+ // containing block's block-flow.
+ // https://bugs.webkit.org/show_bug.cgi?id=46496
+ const int cw = isPositioned() ? containingBlockWidthForPositioned(toRenderBoxModelObject(container())) : containingBlockLogicalWidthForContent();
if (cw > 0)
return computeContentBoxLogicalWidth(width.calcMinValue(cw));
}
diff --git a/WebCore/rendering/RenderBox.h b/WebCore/rendering/RenderBox.h
index 3952790..c849b3a 100644
--- a/WebCore/rendering/RenderBox.h
+++ b/WebCore/rendering/RenderBox.h
@@ -219,7 +219,7 @@ public:
virtual void repaintDuringLayoutIfMoved(const IntRect&);
- virtual int containingBlockWidthForContent() const;
+ virtual int containingBlockLogicalWidthForContent() const;
virtual void computeLogicalWidth();
virtual void computeLogicalHeight();
diff --git a/WebCore/rendering/RenderBoxModelObject.cpp b/WebCore/rendering/RenderBoxModelObject.cpp
index 5faa73f..bbb9c2c 100644
--- a/WebCore/rendering/RenderBoxModelObject.cpp
+++ b/WebCore/rendering/RenderBoxModelObject.cpp
@@ -320,7 +320,7 @@ int RenderBoxModelObject::relativePositionOffsetX() const
{
// Objects that shrink to avoid floats normally use available line width when computing containing block width. However
// in the case of relative positioning using percentages, we can't do this. The offset should always be resolved using the
- // available width of the containing block. Therefore we don't use containingBlockWidthForContent() here, but instead explicitly
+ // available width of the containing block. Therefore we don't use containingBlockLogicalWidthForContent() here, but instead explicitly
// call availableWidth on our containing block.
if (!style()->left().isAuto()) {
RenderBlock* cb = containingBlock();
@@ -1781,9 +1781,9 @@ void RenderBoxModelObject::paintBoxShadow(GraphicsContext* context, int tx, int
}
}
-int RenderBoxModelObject::containingBlockWidthForContent() const
+int RenderBoxModelObject::containingBlockLogicalWidthForContent() const
{
- return containingBlock()->availableWidth();
+ return containingBlock()->availableLogicalWidth();
}
} // namespace WebCore
diff --git a/WebCore/rendering/RenderBoxModelObject.h b/WebCore/rendering/RenderBoxModelObject.h
index 72d784e..83c9367 100644
--- a/WebCore/rendering/RenderBoxModelObject.h
+++ b/WebCore/rendering/RenderBoxModelObject.h
@@ -101,7 +101,7 @@ public:
bool hasHorizontalBordersPaddingOrMargin() const { return hasHorizontalBordersOrPadding() || marginLeft() != 0 || marginRight() != 0; }
bool hasHorizontalBordersOrPadding() const { return borderLeft() != 0 || borderRight() != 0 || paddingLeft() != 0 || paddingRight() != 0; }
- virtual int containingBlockWidthForContent() const;
+ virtual int containingBlockLogicalWidthForContent() const;
virtual void childBecameNonInline(RenderObject* /*child*/) { }
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list