| Index: Source/core/rendering/RenderBlockFlow.h
|
| diff --git a/Source/core/rendering/RenderBlockFlow.h b/Source/core/rendering/RenderBlockFlow.h
|
| index 43ad4c3606152e2f1f19d632f624d558a64dd7d9..b96bb07bf0170bf2dab1556bd021e1cbfe9c08a3 100644
|
| --- a/Source/core/rendering/RenderBlockFlow.h
|
| +++ b/Source/core/rendering/RenderBlockFlow.h
|
| @@ -117,46 +117,42 @@ public:
|
|
|
| bool generatesLineBoxesForInlineChild(RenderObject*);
|
|
|
| - LayoutUnit logicalTopForFloat(const FloatingObject* floatingObject) const { return isHorizontalWritingMode() ? floatingObject->y() : floatingObject->x(); }
|
| - LayoutUnit logicalBottomForFloat(const FloatingObject* floatingObject) const { return isHorizontalWritingMode() ? floatingObject->maxY() : floatingObject->maxX(); }
|
| - LayoutUnit logicalLeftForFloat(const FloatingObject* floatingObject) const { return isHorizontalWritingMode() ? floatingObject->x() : floatingObject->y(); }
|
| - LayoutUnit logicalRightForFloat(const FloatingObject* floatingObject) const { return isHorizontalWritingMode() ? floatingObject->maxX() : floatingObject->maxY(); }
|
| - LayoutUnit logicalWidthForFloat(const FloatingObject* floatingObject) const { return isHorizontalWritingMode() ? floatingObject->width() : floatingObject->height(); }
|
| - LayoutUnit logicalHeightForFloat(const FloatingObject* floatingObject) const { return isHorizontalWritingMode() ? floatingObject->height() : floatingObject->width(); }
|
| - LayoutSize logicalSizeForFloat(const FloatingObject* floatingObject) const { return isHorizontalWritingMode() ? LayoutSize(floatingObject->width(), floatingObject->height()) : LayoutSize(floatingObject->height(), floatingObject->width()); }
|
| -
|
| - int pixelSnappedLogicalTopForFloat(const FloatingObject* floatingObject) const { return isHorizontalWritingMode() ? floatingObject->frameRect().pixelSnappedY() : floatingObject->frameRect().pixelSnappedX(); }
|
| - int pixelSnappedLogicalBottomForFloat(const FloatingObject* floatingObject) const { return isHorizontalWritingMode() ? floatingObject->frameRect().pixelSnappedMaxY() : floatingObject->frameRect().pixelSnappedMaxX(); }
|
| - int pixelSnappedLogicalLeftForFloat(const FloatingObject* floatingObject) const { return isHorizontalWritingMode() ? floatingObject->frameRect().pixelSnappedX() : floatingObject->frameRect().pixelSnappedY(); }
|
| - int pixelSnappedLogicalRightForFloat(const FloatingObject* floatingObject) const { return isHorizontalWritingMode() ? floatingObject->frameRect().pixelSnappedMaxX() : floatingObject->frameRect().pixelSnappedMaxY(); }
|
| -
|
| - void setLogicalTopForFloat(FloatingObject* floatingObject, LayoutUnit logicalTop)
|
| + LayoutUnit logicalTopForFloat(const FloatingObject& floatingObject) const { return isHorizontalWritingMode() ? floatingObject.y() : floatingObject.x(); }
|
| + LayoutUnit logicalBottomForFloat(const FloatingObject& floatingObject) const { return isHorizontalWritingMode() ? floatingObject.maxY() : floatingObject.maxX(); }
|
| + LayoutUnit logicalLeftForFloat(const FloatingObject& floatingObject) const { return isHorizontalWritingMode() ? floatingObject.x() : floatingObject.y(); }
|
| + LayoutUnit logicalRightForFloat(const FloatingObject& floatingObject) const { return isHorizontalWritingMode() ? floatingObject.maxX() : floatingObject.maxY(); }
|
| + LayoutUnit logicalWidthForFloat(const FloatingObject& floatingObject) const { return isHorizontalWritingMode() ? floatingObject.width() : floatingObject.height(); }
|
| +
|
| + int pixelSnappedLogicalTopForFloat(const FloatingObject& floatingObject) const { return isHorizontalWritingMode() ? floatingObject.frameRect().pixelSnappedY() : floatingObject.frameRect().pixelSnappedX(); }
|
| + int pixelSnappedLogicalBottomForFloat(const FloatingObject& floatingObject) const { return isHorizontalWritingMode() ? floatingObject.frameRect().pixelSnappedMaxY() : floatingObject.frameRect().pixelSnappedMaxX(); }
|
| +
|
| + void setLogicalTopForFloat(FloatingObject& floatingObject, LayoutUnit logicalTop)
|
| {
|
| if (isHorizontalWritingMode())
|
| - floatingObject->setY(logicalTop);
|
| + floatingObject.setY(logicalTop);
|
| else
|
| - floatingObject->setX(logicalTop);
|
| + floatingObject.setX(logicalTop);
|
| }
|
| - void setLogicalLeftForFloat(FloatingObject* floatingObject, LayoutUnit logicalLeft)
|
| + void setLogicalLeftForFloat(FloatingObject& floatingObject, LayoutUnit logicalLeft)
|
| {
|
| if (isHorizontalWritingMode())
|
| - floatingObject->setX(logicalLeft);
|
| + floatingObject.setX(logicalLeft);
|
| else
|
| - floatingObject->setY(logicalLeft);
|
| + floatingObject.setY(logicalLeft);
|
| }
|
| - void setLogicalHeightForFloat(FloatingObject* floatingObject, LayoutUnit logicalHeight)
|
| + void setLogicalHeightForFloat(FloatingObject& floatingObject, LayoutUnit logicalHeight)
|
| {
|
| if (isHorizontalWritingMode())
|
| - floatingObject->setHeight(logicalHeight);
|
| + floatingObject.setHeight(logicalHeight);
|
| else
|
| - floatingObject->setWidth(logicalHeight);
|
| + floatingObject.setWidth(logicalHeight);
|
| }
|
| - void setLogicalWidthForFloat(FloatingObject* floatingObject, LayoutUnit logicalWidth)
|
| + void setLogicalWidthForFloat(FloatingObject& floatingObject, LayoutUnit logicalWidth)
|
| {
|
| if (isHorizontalWritingMode())
|
| - floatingObject->setWidth(logicalWidth);
|
| + floatingObject.setWidth(logicalWidth);
|
| else
|
| - floatingObject->setHeight(logicalWidth);
|
| + floatingObject.setHeight(logicalWidth);
|
| }
|
|
|
| LayoutUnit startAlignedOffsetForLine(LayoutUnit position, bool shouldIndentText);
|
| @@ -207,23 +203,23 @@ public:
|
| using RenderBoxModelObject::moveChildrenTo;
|
| virtual void moveChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* startChild, RenderObject* endChild, RenderObject* beforeChild, bool fullRemoveInsert = false) override;
|
|
|
| - LayoutUnit xPositionForFloatIncludingMargin(const FloatingObject* child) const
|
| + LayoutUnit xPositionForFloatIncludingMargin(const FloatingObject& child) const
|
| {
|
| if (isHorizontalWritingMode())
|
| - return child->x() + child->renderer()->marginLeft();
|
| + return child.x() + child.renderer()->marginLeft();
|
|
|
| - return child->x() + marginBeforeForChild(*(child->renderer()));
|
| + return child.x() + marginBeforeForChild(*(child.renderer()));
|
| }
|
|
|
| - LayoutUnit yPositionForFloatIncludingMargin(const FloatingObject* child) const
|
| + LayoutUnit yPositionForFloatIncludingMargin(const FloatingObject& child) const
|
| {
|
| if (isHorizontalWritingMode())
|
| - return child->y() + marginBeforeForChild(*(child->renderer()));
|
| + return child.y() + marginBeforeForChild(*(child.renderer()));
|
|
|
| - return child->y() + child->renderer()->marginTop();
|
| + return child.y() + child.renderer()->marginTop();
|
| }
|
|
|
| - LayoutPoint flipFloatForWritingModeForChild(const FloatingObject*, const LayoutPoint&) const;
|
| + LayoutPoint flipFloatForWritingModeForChild(const FloatingObject&, const LayoutPoint&) const;
|
|
|
| protected:
|
| void rebuildFloatsFromIntruding();
|
| @@ -260,7 +256,7 @@ private:
|
| void adjustPositionedBlock(RenderBox& child, const MarginInfo&);
|
| void adjustFloatingBlock(const MarginInfo&);
|
|
|
| - LayoutPoint computeLogicalLocationForFloat(const FloatingObject*, LayoutUnit logicalTopOffset) const;
|
| + LayoutPoint computeLogicalLocationForFloat(const FloatingObject&, LayoutUnit logicalTopOffset) const;
|
|
|
| FloatingObject* insertFloatingObject(RenderBox&);
|
| void removeFloatingObject(RenderBox*);
|
| @@ -499,7 +495,7 @@ private:
|
| BidiRun* computeInlineDirectionPositionsForSegment(RootInlineBox*, const LineInfo&, ETextAlign, float& logicalLeft,
|
| float& availableLogicalWidth, BidiRun* firstRun, BidiRun* trailingSpaceRun, GlyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache&, WordMeasurements&);
|
| void computeBlockDirectionPositionsForLine(RootInlineBox*, BidiRun*, GlyphOverflowAndFallbackFontsMap&, VerticalPositionCache&);
|
| - void appendFloatingObjectToLastLine(FloatingObject*);
|
| + void appendFloatingObjectToLastLine(FloatingObject&);
|
| // Helper function for layoutInlineChildren()
|
| RootInlineBox* createLineBoxesFromBidiRuns(unsigned bidiLevel, BidiRunList<BidiRun>&, const InlineIterator& end, LineInfo&, VerticalPositionCache&, BidiRun* trailingSpaceRun, WordMeasurements&);
|
| void layoutRunsAndFloats(LineLayoutState&);
|
|
|