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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 4636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4647 if (layoutState && !layoutState->isPaginated()) | 4647 if (layoutState && !layoutState->isPaginated()) |
4648 return LayoutUnit(); | 4648 return LayoutUnit(); |
4649 | 4649 |
4650 if (!layoutState && !flowThreadContainingBlock()) | 4650 if (!layoutState && !flowThreadContainingBlock()) |
4651 return LayoutUnit(); | 4651 return LayoutUnit(); |
4652 | 4652 |
4653 LayoutBlock* containerBlock = containingBlock(); | 4653 LayoutBlock* containerBlock = containingBlock(); |
4654 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4654 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
4655 } | 4655 } |
4656 | 4656 |
| 4657 void LayoutBox::setPageLogicalOffset(LayoutUnit offset) |
| 4658 { |
| 4659 if (!m_rareData && !offset) |
| 4660 return; |
| 4661 ensureRareData().m_pageLogicalOffset = offset; |
| 4662 } |
| 4663 |
4657 void LayoutBox::savePreviousBorderBoxSizeIfNeeded() | 4664 void LayoutBox::savePreviousBorderBoxSizeIfNeeded() |
4658 { | 4665 { |
4659 // If m_rareData is already created, always save. | 4666 // If m_rareData is already created, always save. |
4660 if (!m_rareData) { | 4667 if (!m_rareData) { |
4661 LayoutSize paintInvalidationSize = previousPaintInvalidationRect().size(
); | 4668 LayoutSize paintInvalidationSize = previousPaintInvalidationRect().size(
); |
4662 | 4669 |
4663 // Don't save old border box size if the paint rect is empty because we'
ll | 4670 // Don't save old border box size if the paint rect is empty because we'
ll |
4664 // full invalidate once the paint rect becomes non-empty. | 4671 // full invalidate once the paint rect becomes non-empty. |
4665 if (paintInvalidationSize.isEmpty()) | 4672 if (paintInvalidationSize.isEmpty()) |
4666 return; | 4673 return; |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4794 bool LayoutBox::canRenderBorderImage() const | 4801 bool LayoutBox::canRenderBorderImage() const |
4795 { | 4802 { |
4796 if (!style()->hasBorder()) | 4803 if (!style()->hasBorder()) |
4797 return false; | 4804 return false; |
4798 | 4805 |
4799 StyleImage* borderImage = style()->borderImage().image(); | 4806 StyleImage* borderImage = style()->borderImage().image(); |
4800 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); | 4807 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); |
4801 } | 4808 } |
4802 | 4809 |
4803 } // namespace blink | 4810 } // namespace blink |
OLD | NEW |