Diff
Modified: trunk/Source/WebCore/ChangeLog (158854 => 158855)
--- trunk/Source/WebCore/ChangeLog 2013-11-07 18:05:55 UTC (rev 158854)
+++ trunk/Source/WebCore/ChangeLog 2013-11-07 18:11:43 UTC (rev 158855)
@@ -1,3 +1,53 @@
+2013-11-07 Bem Jones-Bey <[email protected]>
+
+ Refactor logical left/right offset for line methods
+ https://bugs.webkit.org/show_bug.cgi?id=123898
+
+ Reviewed by David Hyatt.
+
+ Simplify the logical left/right offset for line methods and their
+ implementation, including the ComputeFloatOffsetAdapter. This also
+ reduces the number of line offset methods in RenderBlock.
+
+ No new tests, no behavior change.
+
+ * rendering/FloatingObjects.cpp:
+ (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
+ (WebCore::ComputeFloatOffsetAdapter::offset): Add a method to return
+ the offset instead of using a confusing out parameter.
+ (WebCore::::shapeOffset): Method to return the offset modified by the
+ shape delta. Moving the computation to this method allowed for
+ simplification of the users of ComputeFloatOffsetAdapter.
+ (WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat): Added this
+ method so that ShapeOutsideFloatOffsetMode isn't needed. Returns the
+ offset based on the float margin box.
+ (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat): Ditto.
+ (WebCore::FloatingObjects::logicalLeftOffset): This now only returns
+ the offset based on the shape's contour.
+ (WebCore::FloatingObjects::logicalRightOffset): Ditto.
+ (WebCore::::heightRemaining): Rename to properly follow the getter
+ naming convention.
+ * rendering/FloatingObjects.h:
+ * rendering/RenderBlock.h:
+ (WebCore::RenderBlock::logicalRightOffsetForLine): Update to remove
+ use of ShapeOutsideFloatOffsetMode and heightRemaining.
+ (WebCore::RenderBlock::logicalLeftOffsetForLine): Ditto.
+ (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
+ (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::RenderBlockFlow::logicalLeftOffsetForPositioningFloat):
+ Positioning a float is the only case where the float margin box
+ should be used, and also the only case where heightRemaining is
+ needed. This handles that case.
+ (WebCore::RenderBlockFlow::logicalRightOffsetForPositioningFloat):
+ Ditto.
+ (WebCore::RenderBlockFlow::computeLogicalLocationForFloat): Update to
+ use logical(Left|Right)OffsetForPositioningFloatOnLine.
+ (WebCore::RenderBlockFlow::logicalLeftFloatOffsetForLine): Update to
+ remove use for ShapeOutsideFloatOffsetMode and heightRemaining.
+ (WebCore::RenderBlockFlow::logicalRightFloatOffsetForLine): Ditto.
+ * rendering/RenderBlockFlow.h:
+
2013-11-07 Alexandru Chiculita <[email protected]>
Web Inspector: CSS Regions: Removing a content node of a ContentFlow from the DOM will send a 0 nodeId
Modified: trunk/Source/WebCore/rendering/FloatingObjects.cpp (158854 => 158855)
--- trunk/Source/WebCore/rendering/FloatingObjects.cpp 2013-11-07 18:05:55 UTC (rev 158854)
+++ trunk/Source/WebCore/rendering/FloatingObjects.cpp 2013-11-07 18:11:43 UTC (rev 158855)
@@ -105,7 +105,7 @@
public:
typedef FloatingObjectInterval IntervalType;
- ComputeFloatOffsetAdapter(const RenderBlockFlow* renderer, int lineTop, int lineBottom, LayoutUnit& offset)
+ ComputeFloatOffsetAdapter(const RenderBlockFlow* renderer, int lineTop, int lineBottom, LayoutUnit offset)
: m_renderer(renderer)
, m_lineTop(lineTop)
, m_lineBottom(lineBottom)
@@ -118,23 +118,17 @@
int highValue() const { return m_lineBottom; }
void collectIfNeeded(const IntervalType&);
-#if ENABLE(CSS_SHAPES)
- // When computing the offset caused by the floats on a given line, if
- // the outermost float on that line has a shape-outside, the inline
- // content that butts up against that float must be positioned using
- // the contours of the shape, not the margin box of the float.
- const FloatingObject* outermostFloat() const { return m_outermostFloat; }
-#endif
+ LayoutUnit offset() const { return m_offset; }
+ LayoutUnit shapeOffset() const;
+ LayoutUnit heightRemaining() const;
- LayoutUnit getHeightRemaining() const;
-
private:
bool updateOffsetIfNeeded(const FloatingObject*);
const RenderBlockFlow* m_renderer;
int m_lineTop;
int m_lineBottom;
- LayoutUnit& m_offset;
+ LayoutUnit m_offset;
const FloatingObject* m_outermostFloat;
};
@@ -273,58 +267,80 @@
return m_placedFloatsTree;
}
-LayoutUnit FloatingObjects::logicalLeftOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit logicalHeight, ShapeOutsideFloatOffsetMode offsetMode, LayoutUnit *heightRemaining)
+static inline ShapeOutsideInfo* shapeInfoForFloat(const FloatingObject* floatingObject, const RenderBlockFlow* containingBlock, LayoutUnit lineTop, LayoutUnit lineBottom)
{
-#if !ENABLE(CSS_SHAPES)
- UNUSED_PARAM(offsetMode);
-#endif
+ if (floatingObject) {
+ if (ShapeOutsideInfo* shapeOutside = floatingObject->renderer().shapeOutsideInfo()) {
+ shapeOutside->updateDeltasForContainingBlockLine(containingBlock, floatingObject, lineTop, lineBottom - lineTop);
+ return shapeOutside;
+ }
+ }
- LayoutUnit offset = fixedOffset;
- ComputeFloatOffsetAdapter<FloatingObject::FloatLeft> adapter(m_renderer, roundToInt(logicalTop), roundToInt(logicalTop + logicalHeight), offset);
- placedFloatsTree().allOverlapsWithAdapter(adapter);
+ return 0;
+}
- if (heightRemaining)
- *heightRemaining = adapter.getHeightRemaining();
-
+template<>
+inline LayoutUnit ComputeFloatOffsetAdapter<FloatingObject::FloatLeft>::shapeOffset() const
+{
#if ENABLE(CSS_SHAPES)
- const FloatingObject* outermostFloat = adapter.outermostFloat();
- if (offsetMode == ShapeOutsideFloatShapeOffset && outermostFloat) {
- if (ShapeOutsideInfo* shapeOutside = outermostFloat->renderer().shapeOutsideInfo()) {
- shapeOutside->updateDeltasForContainingBlockLine(m_renderer, outermostFloat, logicalTop, logicalHeight);
- offset += shapeOutside->rightMarginBoxDelta();
- }
- }
+ if (ShapeOutsideInfo* shapeOutside = shapeInfoForFloat(m_outermostFloat, m_renderer, m_lineTop, m_lineBottom))
+ return m_offset + shapeOutside->rightMarginBoxDelta();
#endif
- return offset;
+ return m_offset;
}
-LayoutUnit FloatingObjects::logicalRightOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit logicalHeight, ShapeOutsideFloatOffsetMode offsetMode, LayoutUnit *heightRemaining)
+template<>
+inline LayoutUnit ComputeFloatOffsetAdapter<FloatingObject::FloatRight>::shapeOffset() const
{
-#if !ENABLE(CSS_SHAPES)
- UNUSED_PARAM(offsetMode);
+#if ENABLE(CSS_SHAPES)
+ if (ShapeOutsideInfo* shapeOutside = shapeInfoForFloat(m_outermostFloat, m_renderer, m_lineTop, m_lineBottom))
+ return m_offset + shapeOutside->leftMarginBoxDelta();
#endif
- LayoutUnit offset = fixedOffset;
- ComputeFloatOffsetAdapter<FloatingObject::FloatRight> adapter(m_renderer, roundToInt(logicalTop), roundToInt(logicalTop + logicalHeight), offset);
+ return m_offset;
+}
+
+LayoutUnit FloatingObjects::logicalLeftOffsetForPositioningFloat(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit *heightRemaining)
+{
+ int logicalTopAsInt = roundToInt(logicalTop);
+ ComputeFloatOffsetAdapter<FloatingObject::FloatLeft> adapter(m_renderer, logicalTopAsInt, logicalTopAsInt, fixedOffset);
placedFloatsTree().allOverlapsWithAdapter(adapter);
if (heightRemaining)
- *heightRemaining = adapter.getHeightRemaining();
+ *heightRemaining = adapter.heightRemaining();
-#if ENABLE(CSS_SHAPES)
- const FloatingObject* outermostFloat = adapter.outermostFloat();
- if (offsetMode == ShapeOutsideFloatShapeOffset && outermostFloat) {
- if (ShapeOutsideInfo* shapeOutside = outermostFloat->renderer().shapeOutsideInfo()) {
- shapeOutside->updateDeltasForContainingBlockLine(m_renderer, outermostFloat, logicalTop, logicalHeight);
- offset += shapeOutside->leftMarginBoxDelta();
- }
- }
-#endif
+ return adapter.offset();
+}
- return min(fixedOffset, offset);
+LayoutUnit FloatingObjects::logicalRightOffsetForPositioningFloat(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit *heightRemaining)
+{
+ int logicalTopAsInt = roundToInt(logicalTop);
+ ComputeFloatOffsetAdapter<FloatingObject::FloatRight> adapter(m_renderer, logicalTopAsInt, logicalTopAsInt, fixedOffset);
+ placedFloatsTree().allOverlapsWithAdapter(adapter);
+
+ if (heightRemaining)
+ *heightRemaining = adapter.heightRemaining();
+
+ return min(fixedOffset, adapter.offset());
}
+LayoutUnit FloatingObjects::logicalLeftOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit logicalHeight)
+{
+ ComputeFloatOffsetAdapter<FloatingObject::FloatLeft> adapter(m_renderer, roundToInt(logicalTop), roundToInt(logicalTop + logicalHeight), fixedOffset);
+ placedFloatsTree().allOverlapsWithAdapter(adapter);
+
+ return adapter.shapeOffset();
+}
+
+LayoutUnit FloatingObjects::logicalRightOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit logicalHeight)
+{
+ ComputeFloatOffsetAdapter<FloatingObject::FloatRight> adapter(m_renderer, roundToInt(logicalTop), roundToInt(logicalTop + logicalHeight), fixedOffset);
+ placedFloatsTree().allOverlapsWithAdapter(adapter);
+
+ return min(fixedOffset, adapter.shapeOffset());
+}
+
inline static bool rangesIntersect(int floatTop, int floatBottom, int objectTop, int objectBottom)
{
if (objectTop >= floatBottom || objectBottom < floatTop)
@@ -384,7 +400,7 @@
}
template <FloatingObject::Type FloatTypeValue>
-LayoutUnit ComputeFloatOffsetAdapter<FloatTypeValue>::getHeightRemaining() const
+LayoutUnit ComputeFloatOffsetAdapter<FloatTypeValue>::heightRemaining() const
{
return m_outermostFloat ? m_renderer->logicalBottomForFloat(m_outermostFloat) - m_lineTop : LayoutUnit(1);
}
Modified: trunk/Source/WebCore/rendering/FloatingObjects.h (158854 => 158855)
--- trunk/Source/WebCore/rendering/FloatingObjects.h 2013-11-07 18:05:55 UTC (rev 158854)
+++ trunk/Source/WebCore/rendering/FloatingObjects.h 2013-11-07 18:11:43 UTC (rev 158855)
@@ -33,6 +33,7 @@
class RenderBlockFlow;
class RenderBox;
+// FIXME this should be removed once RenderBlockFlow::nextFloatLogicalBottomBelow doesn't need it anymore. (Bug 123931)
enum ShapeOutsideFloatOffsetMode { ShapeOutsideFloatShapeOffset, ShapeOutsideFloatMarginBoxOffset };
class FloatingObject {
@@ -141,9 +142,13 @@
bool hasRightObjects() const { return m_rightObjectsCount > 0; }
const FloatingObjectSet& set() const { return m_set; }
void clearLineBoxTreePointers();
- LayoutUnit logicalLeftOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit logicalHeight, ShapeOutsideFloatOffsetMode = ShapeOutsideFloatShapeOffset, LayoutUnit* heightRemaining = 0);
- LayoutUnit logicalRightOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit logicalHeight, ShapeOutsideFloatOffsetMode = ShapeOutsideFloatShapeOffset, LayoutUnit* heightRemaining = 0);
+ LayoutUnit logicalLeftOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit logicalHeight);
+ LayoutUnit logicalRightOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit logicalHeight);
+
+ LayoutUnit logicalLeftOffsetForPositioningFloat(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit* heightRemaining);
+ LayoutUnit logicalRightOffsetForPositioningFloat(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit* heightRemaining);
+
private:
void computePlacedFloatsTree();
const FloatingObjectTree& placedFloatsTree();
Modified: trunk/Source/WebCore/rendering/RenderBlock.h (158854 => 158855)
--- trunk/Source/WebCore/rendering/RenderBlock.h 2013-11-07 18:05:55 UTC (rev 158854)
+++ trunk/Source/WebCore/rendering/RenderBlock.h 2013-11-07 18:11:43 UTC (rev 158855)
@@ -164,11 +164,11 @@
}
LayoutUnit logicalRightOffsetForLineInRegion(LayoutUnit position, bool shouldIndentText, RenderRegion* region, LayoutUnit logicalHeight = 0) const
{
- return logicalRightOffsetForLine(position, logicalRightOffsetForContent(region), shouldIndentText, 0, logicalHeight);
+ return logicalRightOffsetForLine(position, logicalRightOffsetForContent(region), shouldIndentText, logicalHeight);
}
LayoutUnit logicalLeftOffsetForLineInRegion(LayoutUnit position, bool shouldIndentText, RenderRegion* region, LayoutUnit logicalHeight = 0) const
{
- return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(region), shouldIndentText, 0, logicalHeight);
+ return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(region), shouldIndentText, logicalHeight);
}
LayoutUnit startOffsetForLineInRegion(LayoutUnit position, bool shouldIndentText, RenderRegion* region, LayoutUnit logicalHeight = 0) const
{
@@ -187,11 +187,11 @@
}
LayoutUnit logicalRightOffsetForLine(LayoutUnit position, bool shouldIndentText, LayoutUnit logicalHeight = 0) const
{
- return logicalRightOffsetForLine(position, logicalRightOffsetForContent(position), shouldIndentText, 0, logicalHeight);
+ return logicalRightOffsetForLine(position, logicalRightOffsetForContent(position), shouldIndentText, logicalHeight);
}
LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, bool shouldIndentText, LayoutUnit logicalHeight = 0) const
{
- return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(position), shouldIndentText, 0, logicalHeight);
+ return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(position), shouldIndentText, logicalHeight);
}
LayoutUnit pixelSnappedLogicalLeftOffsetForLine(LayoutUnit position, bool shouldIndentText, LayoutUnit logicalHeight = 0) const
{
@@ -434,22 +434,14 @@
virtual void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect);
bool paintChild(RenderBox&, PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect);
- LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining = 0, LayoutUnit logicalHeight = 0) const
+ LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const
{
- return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(logicalTop, fixedOffset, heightRemaining, logicalHeight, ShapeOutsideFloatShapeOffset), applyTextIndent);
+ return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(logicalTop, fixedOffset, logicalHeight), applyTextIndent);
}
- LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining = 0, LayoutUnit logicalHeight = 0) const
+ LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const
{
- return adjustLogicalLeftOffsetForLine(logicalLeftFloatOffsetForLine(logicalTop, fixedOffset, heightRemaining, logicalHeight, ShapeOutsideFloatShapeOffset), applyTextIndent);
+ return adjustLogicalLeftOffsetForLine(logicalLeftFloatOffsetForLine(logicalTop, fixedOffset, logicalHeight), applyTextIndent);
}
- LayoutUnit logicalRightOffsetForLineIgnoringShapeOutside(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining = 0, LayoutUnit logicalHeight = 0) const
- {
- return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(logicalTop, fixedOffset, heightRemaining, logicalHeight, ShapeOutsideFloatMarginBoxOffset), applyTextIndent);
- }
- LayoutUnit logicalLeftOffsetForLineIgnoringShapeOutside(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining = 0, LayoutUnit logicalHeight = 0) const
- {
- return adjustLogicalLeftOffsetForLine(logicalLeftFloatOffsetForLine(logicalTop, fixedOffset, heightRemaining, logicalHeight, ShapeOutsideFloatMarginBoxOffset), applyTextIndent);
- }
virtual ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const;
virtual void adjustInlineDirectionLineBounds(int /* expansionOpportunityCount */, float& /* logicalLeft */, float& /* logicalWidth */) const { }
@@ -512,9 +504,9 @@
private:
// FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to RenderBlockFlow
- virtual LayoutUnit logicalRightFloatOffsetForLine(LayoutUnit, LayoutUnit fixedOffset, LayoutUnit*, LayoutUnit, ShapeOutsideFloatOffsetMode) const { return fixedOffset; };
+ virtual LayoutUnit logicalRightFloatOffsetForLine(LayoutUnit, LayoutUnit fixedOffset, LayoutUnit) const { return fixedOffset; };
// FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to RenderBlockFlow
- virtual LayoutUnit logicalLeftFloatOffsetForLine(LayoutUnit, LayoutUnit fixedOffset, LayoutUnit*, LayoutUnit, ShapeOutsideFloatOffsetMode) const { return fixedOffset; }
+ virtual LayoutUnit logicalLeftFloatOffsetForLine(LayoutUnit, LayoutUnit fixedOffset, LayoutUnit) const { return fixedOffset; }
LayoutUnit adjustLogicalRightOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const;
LayoutUnit adjustLogicalLeftOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const;
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (158854 => 158855)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2013-11-07 18:05:55 UTC (rev 158854)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2013-11-07 18:11:43 UTC (rev 158855)
@@ -2027,6 +2027,22 @@
}
}
+LayoutUnit RenderBlockFlow::logicalLeftOffsetForPositioningFloat(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const
+{
+ LayoutUnit offset = fixedOffset;
+ if (m_floatingObjects && m_floatingObjects->hasLeftObjects())
+ offset = m_floatingObjects->logicalLeftOffsetForPositioningFloat(fixedOffset, logicalTop, heightRemaining);
+ return adjustLogicalLeftOffsetForLine(offset, applyTextIndent);
+}
+
+LayoutUnit RenderBlockFlow::logicalRightOffsetForPositioningFloat(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const
+{
+ LayoutUnit offset = fixedOffset;
+ if (m_floatingObjects && m_floatingObjects->hasRightObjects())
+ offset = m_floatingObjects->logicalRightOffsetForPositioningFloat(fixedOffset, logicalTop, heightRemaining);
+ return adjustLogicalRightOffsetForLine(offset, applyTextIndent);
+}
+
LayoutPoint RenderBlockFlow::computeLogicalLocationForFloat(const FloatingObject* floatingObject, LayoutUnit logicalTopOffset) const
{
RenderBox& childBox = floatingObject->renderer();
@@ -2066,10 +2082,10 @@
if (childBox.style().floating() == LeftFloat) {
LayoutUnit heightRemainingLeft = 1;
LayoutUnit heightRemainingRight = 1;
- floatLogicalLeft = logicalLeftOffsetForLineIgnoringShapeOutside(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft);
- while (logicalRightOffsetForLineIgnoringShapeOutside(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight) - floatLogicalLeft < floatLogicalWidth) {
+ floatLogicalLeft = logicalLeftOffsetForPositioningFloat(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft);
+ while (logicalRightOffsetForPositioningFloat(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight) - floatLogicalLeft < floatLogicalWidth) {
logicalTopOffset += min(heightRemainingLeft, heightRemainingRight);
- floatLogicalLeft = logicalLeftOffsetForLineIgnoringShapeOutside(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft);
+ floatLogicalLeft = logicalLeftOffsetForPositioningFloat(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft);
if (insideFlowThread) {
// Have to re-evaluate all of our offsets, since they may have changed.
logicalRightOffset = logicalRightOffsetForContent(logicalTopOffset); // Constant part of right offset.
@@ -2081,10 +2097,10 @@
} else {
LayoutUnit heightRemainingLeft = 1;
LayoutUnit heightRemainingRight = 1;
- floatLogicalLeft = logicalRightOffsetForLineIgnoringShapeOutside(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight);
- while (floatLogicalLeft - logicalLeftOffsetForLineIgnoringShapeOutside(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft) < floatLogicalWidth) {
+ floatLogicalLeft = logicalRightOffsetForPositioningFloat(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight);
+ while (floatLogicalLeft - logicalLeftOffsetForPositioningFloat(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft) < floatLogicalWidth) {
logicalTopOffset += min(heightRemainingLeft, heightRemainingRight);
- floatLogicalLeft = logicalRightOffsetForLineIgnoringShapeOutside(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight);
+ floatLogicalLeft = logicalRightOffsetForPositioningFloat(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight);
if (insideFlowThread) {
// Have to re-evaluate all of our offsets, since they may have changed.
logicalRightOffset = logicalRightOffsetForContent(logicalTopOffset); // Constant part of right offset.
@@ -2244,18 +2260,18 @@
setLogicalHeight(newY);
}
-LayoutUnit RenderBlockFlow::logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit* heightRemaining, LayoutUnit logicalHeight, ShapeOutsideFloatOffsetMode offsetMode) const
+LayoutUnit RenderBlockFlow::logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const
{
if (m_floatingObjects && m_floatingObjects->hasLeftObjects())
- return m_floatingObjects->logicalLeftOffset(fixedOffset, logicalTop, logicalHeight, offsetMode, heightRemaining);
+ return m_floatingObjects->logicalLeftOffset(fixedOffset, logicalTop, logicalHeight);
return fixedOffset;
}
-LayoutUnit RenderBlockFlow::logicalRightFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit* heightRemaining, LayoutUnit logicalHeight, ShapeOutsideFloatOffsetMode offsetMode) const
+LayoutUnit RenderBlockFlow::logicalRightFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const
{
if (m_floatingObjects && m_floatingObjects->hasRightObjects())
- return m_floatingObjects->logicalRightOffset(fixedOffset, logicalTop, logicalHeight, offsetMode, heightRemaining);
+ return m_floatingObjects->logicalRightOffset(fixedOffset, logicalTop, logicalHeight);
return fixedOffset;
}
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.h (158854 => 158855)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.h 2013-11-07 18:05:55 UTC (rev 158854)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.h 2013-11-07 18:11:43 UTC (rev 158855)
@@ -416,8 +416,12 @@
void newLine(EClear);
- virtual LayoutUnit logicalRightFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit* heightRemaining, LayoutUnit logicalHeight, ShapeOutsideFloatOffsetMode) const OVERRIDE;
- virtual LayoutUnit logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit* heightRemaining, LayoutUnit logicalHeight, ShapeOutsideFloatOffsetMode) const OVERRIDE;
+ virtual LayoutUnit logicalRightFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const OVERRIDE;
+ virtual LayoutUnit logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const OVERRIDE;
+
+ LayoutUnit logicalRightOffsetForPositioningFloat(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const;
+ LayoutUnit logicalLeftOffsetForPositioningFloat(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const;
+
LayoutUnit lowestFloatLogicalBottom(FloatingObject::Type = FloatingObject::FloatLeftRight) const;
LayoutUnit nextFloatLogicalBottomBelow(LayoutUnit, ShapeOutsideFloatOffsetMode = ShapeOutsideFloatMarginBoxOffset) const;