OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 6598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6609 LayoutSize offsetDelta = layoutState->m_layoutOffset - layoutState->m_pageOf
fset; | 6609 LayoutSize offsetDelta = layoutState->m_layoutOffset - layoutState->m_pageOf
fset; |
6610 return isHorizontalWritingMode() ? offsetDelta.height() : offsetDelta.width(
); | 6610 return isHorizontalWritingMode() ? offsetDelta.height() : offsetDelta.width(
); |
6611 } | 6611 } |
6612 | 6612 |
6613 RenderRegion* RenderBlock::regionAtBlockOffset(LayoutUnit blockOffset) const | 6613 RenderRegion* RenderBlock::regionAtBlockOffset(LayoutUnit blockOffset) const |
6614 { | 6614 { |
6615 if (!inRenderFlowThread()) | 6615 if (!inRenderFlowThread()) |
6616 return 0; | 6616 return 0; |
6617 | 6617 |
6618 RenderFlowThread* flowThread = enclosingRenderFlowThread(); | 6618 RenderFlowThread* flowThread = enclosingRenderFlowThread(); |
6619 if (!flowThread || !flowThread->hasValidRegions()) | 6619 if (!flowThread || !flowThread->hasValidRegionInfo()) |
6620 return 0; | 6620 return 0; |
6621 | 6621 |
6622 return flowThread->renderRegionForLine(offsetFromLogicalTopOfFirstPage() + b
lockOffset, true); | 6622 return flowThread->renderRegionForLine(offsetFromLogicalTopOfFirstPage() + b
lockOffset, true); |
6623 } | 6623 } |
6624 | 6624 |
6625 void RenderBlock::setStaticInlinePositionForChild(RenderBox* child, LayoutUnit b
lockOffset, LayoutUnit inlinePosition) | 6625 void RenderBlock::setStaticInlinePositionForChild(RenderBox* child, LayoutUnit b
lockOffset, LayoutUnit inlinePosition) |
6626 { | 6626 { |
6627 if (inRenderFlowThread()) { | 6627 if (inRenderFlowThread()) { |
6628 // Shift the inline position to exclude the region offset. | 6628 // Shift the inline position to exclude the region offset. |
6629 inlinePosition += startOffsetForContent() - startOffsetForContent(blockO
ffset); | 6629 inlinePosition += startOffsetForContent() - startOffsetForContent(blockO
ffset); |
6630 } | 6630 } |
6631 child->layer()->setStaticInlinePosition(inlinePosition); | 6631 child->layer()->setStaticInlinePosition(inlinePosition); |
6632 } | 6632 } |
6633 | 6633 |
6634 bool RenderBlock::logicalWidthChangedInRegions() const | 6634 bool RenderBlock::logicalWidthChangedInRegions() const |
6635 { | 6635 { |
6636 if (!inRenderFlowThread()) | 6636 if (!inRenderFlowThread()) |
6637 return false; | 6637 return false; |
6638 | 6638 |
6639 RenderFlowThread* flowThread = enclosingRenderFlowThread(); | 6639 RenderFlowThread* flowThread = enclosingRenderFlowThread(); |
6640 if (!flowThread || !flowThread->hasValidRegions()) | 6640 if (!flowThread || !flowThread->hasValidRegionInfo()) |
6641 return 0; | 6641 return 0; |
6642 | 6642 |
6643 return flowThread->logicalWidthChangedInRegions(this, offsetFromLogicalTopOf
FirstPage()); | 6643 return flowThread->logicalWidthChangedInRegions(this, offsetFromLogicalTopOf
FirstPage()); |
6644 } | 6644 } |
6645 | 6645 |
6646 RenderRegion* RenderBlock::clampToStartAndEndRegions(RenderRegion* region) const | 6646 RenderRegion* RenderBlock::clampToStartAndEndRegions(RenderRegion* region) const |
6647 { | 6647 { |
6648 ASSERT(region && inRenderFlowThread()); | 6648 ASSERT(region && inRenderFlowThread()); |
6649 | 6649 |
6650 // We need to clamp to the block, since we want any lines or blocks that ove
rflow out of the | 6650 // We need to clamp to the block, since we want any lines or blocks that ove
rflow out of the |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7044 } | 7044 } |
7045 | 7045 |
7046 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) | 7046 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) |
7047 { | 7047 { |
7048 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x(
), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); | 7048 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x(
), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); |
7049 } | 7049 } |
7050 | 7050 |
7051 #endif | 7051 #endif |
7052 | 7052 |
7053 } // namespace WebCore | 7053 } // namespace WebCore |
OLD | NEW |