| Index: Source/core/layout/api/LineLayoutBlockFlow.cpp
|
| diff --git a/Source/core/layout/api/LineLayoutBlockFlow.cpp b/Source/core/layout/api/LineLayoutBlockFlow.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b84fa0a2a9d1f18eaedab0354c111f20f1a5c7dc
|
| --- /dev/null
|
| +++ b/Source/core/layout/api/LineLayoutBlockFlow.cpp
|
| @@ -0,0 +1,158 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "config.h"
|
| +#include "core/layout/api/LineLayoutBlockFlow.h"
|
| +
|
| +#include "core/layout/LayoutBlockFlow.h"
|
| +
|
| +namespace blink {
|
| +
|
| +LineLayoutBlockFlow::LineLayoutBlockFlow(LayoutBlockFlow* blockFlow)
|
| + : LineLayoutBox(blockFlow)
|
| +{
|
| +}
|
| +
|
| +LineLayoutBlockFlow::LineLayoutBlockFlow(const LineLayoutItem& item)
|
| + : LineLayoutBox(item)
|
| +{
|
| + ASSERT(!item.layoutObject() || item.layoutObject()->isLayoutBlockFlow());
|
| +}
|
| +
|
| +LineLayoutItem LineLayoutBlockFlow::firstChild() const
|
| +{
|
| + return toBlockFlow()->firstChild();
|
| +}
|
| +
|
| +LineLayoutItem LineLayoutBlockFlow::lastChild() const
|
| +{
|
| + return toBlockFlow()->lastChild();
|
| +}
|
| +
|
| +LayoutUnit LineLayoutBlockFlow::startAlignedOffsetForLine(LayoutUnit position, bool shouldIndentText)
|
| +{
|
| + return toBlockFlow()->startAlignedOffsetForLine(position, shouldIndentText);
|
| +}
|
| +
|
| +LayoutUnit LineLayoutBlockFlow::textIndentOffset() const
|
| +{
|
| + return toBlockFlow()->textIndentOffset();
|
| +}
|
| +
|
| +LayoutUnit LineLayoutBlockFlow::logicalWidthForChild(const LayoutBox& child) const
|
| +{
|
| + return toBlockFlow()->logicalWidthForChild(child);
|
| +}
|
| +
|
| +LayoutUnit LineLayoutBlockFlow::marginStartForChild(const LayoutBoxModelObject& child) const
|
| +{
|
| + return toBlockFlow()->marginStartForChild(child);
|
| +}
|
| +
|
| +LayoutUnit LineLayoutBlockFlow::marginEndForChild(const LayoutBoxModelObject& child) const
|
| +{
|
| + return toBlockFlow()->marginEndForChild(child);
|
| +}
|
| +
|
| +LayoutUnit LineLayoutBlockFlow::marginBeforeForChild(const LayoutBoxModelObject& child) const
|
| +{
|
| + return toBlockFlow()->marginBeforeForChild(child);
|
| +}
|
| +
|
| +LayoutUnit LineLayoutBlockFlow::startOffsetForContent() const
|
| +{
|
| + return toBlockFlow()->startOffsetForContent();
|
| +}
|
| +
|
| +LayoutUnit LineLayoutBlockFlow::lineHeight(bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const
|
| +{
|
| + return toBlockFlow()->lineHeight(firstLine, direction, linePositionMode);
|
| +}
|
| +
|
| +LayoutUnit LineLayoutBlockFlow::minLineHeightForReplacedObject(bool isFirstLine, LayoutUnit replacedHeight) const
|
| +{
|
| + return toBlockFlow()->minLineHeightForReplacedObject(isFirstLine, replacedHeight);
|
| +}
|
| +
|
| +FloatingObject* LineLayoutBlockFlow::insertFloatingObject(LayoutBox& box)
|
| +{
|
| + return toBlockFlow()->insertFloatingObject(box);
|
| +}
|
| +
|
| +bool LineLayoutBlockFlow::positionNewFloats(LineWidth* width)
|
| +{
|
| + return toBlockFlow()->positionNewFloats(width);
|
| +}
|
| +
|
| +bool LineLayoutBlockFlow::positionNewFloatOnLine(FloatingObject* newFloat, FloatingObject* lastFloatFromPreviousLine, LineInfo& lineInfo, LineWidth& lineWidth)
|
| +{
|
| + return toBlockFlow()->positionNewFloatOnLine(newFloat, lastFloatFromPreviousLine, lineInfo, lineWidth);
|
| +}
|
| +
|
| +LayoutUnit LineLayoutBlockFlow::nextFloatLogicalBottomBelow(LayoutUnit logicalHeight, ShapeOutsideFloatOffsetMode offsetMode) const
|
| +{
|
| + return toBlockFlow()->nextFloatLogicalBottomBelow(logicalHeight, offsetMode);
|
| +}
|
| +
|
| +FloatingObject* LineLayoutBlockFlow::lastFloatFromPreviousLine() const
|
| +{
|
| + return toBlockFlow()->containsFloats() ? toBlockFlow()->m_floatingObjects->set().last().get() : 0;
|
| +}
|
| +
|
| +LayoutUnit LineLayoutBlockFlow::logicalTopForFloat(const FloatingObject* floatingObject) const
|
| +{
|
| + return toBlockFlow()->logicalTopForFloat(floatingObject);
|
| +}
|
| +
|
| +LayoutUnit LineLayoutBlockFlow::logicalBottomForFloat(const FloatingObject* floatingObject) const
|
| +{
|
| + return toBlockFlow()->logicalBottomForFloat(floatingObject);
|
| +}
|
| +
|
| +LayoutUnit LineLayoutBlockFlow::logicalLeftForFloat(const FloatingObject* floatingObject) const
|
| +{
|
| + return toBlockFlow()->logicalLeftForFloat(floatingObject);
|
| +}
|
| +
|
| +LayoutUnit LineLayoutBlockFlow::logicalRightForFloat(const FloatingObject* floatingObject) const
|
| +{
|
| + return toBlockFlow()->logicalRightForFloat(floatingObject);
|
| +}
|
| +
|
| +LayoutUnit LineLayoutBlockFlow::logicalWidthForFloat(const FloatingObject* floatingObject) const
|
| +{
|
| + return toBlockFlow()->logicalWidthForFloat(floatingObject);
|
| +}
|
| +
|
| +LayoutUnit LineLayoutBlockFlow::logicalRightOffsetForLine(LayoutUnit position, bool shouldIndentText, LayoutUnit logicalHeight) const
|
| +{
|
| + return toBlockFlow()->logicalRightOffsetForLine(position, shouldIndentText, logicalHeight);
|
| +}
|
| +
|
| +LayoutUnit LineLayoutBlockFlow::logicalLeftOffsetForLine(LayoutUnit position, bool shouldIndentText, LayoutUnit logicalHeight) const
|
| +{
|
| + return toBlockFlow()->logicalLeftOffsetForLine(position, shouldIndentText, logicalHeight);
|
| +}
|
| +
|
| +void LineLayoutBlockFlow::setStaticInlinePositionForChild(LayoutBox& box, LayoutUnit inlinePosition)
|
| +{
|
| + toBlockFlow()->setStaticInlinePositionForChild(box, inlinePosition);
|
| +}
|
| +
|
| +void LineLayoutBlockFlow::updateStaticInlinePositionForChild(LayoutBox& box, LayoutUnit logicalTop)
|
| +{
|
| + toBlockFlow()->updateStaticInlinePositionForChild(box, logicalTop);
|
| +}
|
| +
|
| +LayoutBlockFlow* LineLayoutBlockFlow::toBlockFlow()
|
| +{
|
| + return toLayoutBlockFlow(layoutObject());
|
| +}
|
| +
|
| +const LayoutBlockFlow* LineLayoutBlockFlow::toBlockFlow() const
|
| +{
|
| + return toLayoutBlockFlow(layoutObject());
|
| +}
|
| +
|
| +} // namespace blink
|
|
|