| 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. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 5241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5252 ASSERT(beforeChild->parent() == this); | 5252 ASSERT(beforeChild->parent() == this); |
| 5253 return beforeChild; | 5253 return beforeChild; |
| 5254 } | 5254 } |
| 5255 | 5255 |
| 5256 LayoutUnit LayoutBox::offsetFromLogicalTopOfFirstPage() const { | 5256 LayoutUnit LayoutBox::offsetFromLogicalTopOfFirstPage() const { |
| 5257 LayoutState* layoutState = view()->layoutState(); | 5257 LayoutState* layoutState = view()->layoutState(); |
| 5258 if (!layoutState || !layoutState->isPaginated()) | 5258 if (!layoutState || !layoutState->isPaginated()) |
| 5259 return LayoutUnit(); | 5259 return LayoutUnit(); |
| 5260 | 5260 |
| 5261 if (layoutState->layoutObject() == this) { | 5261 if (layoutState->layoutObject() == this) { |
| 5262 LayoutSize offsetDelta = | 5262 LayoutSize offset = layoutState->paginationOffset(); |
| 5263 layoutState->layoutOffset() - layoutState->pageOffset(); | 5263 return isHorizontalWritingMode() ? offset.height() : offset.width(); |
| 5264 return isHorizontalWritingMode() ? offsetDelta.height() | |
| 5265 : offsetDelta.width(); | |
| 5266 } | 5264 } |
| 5267 | 5265 |
| 5268 // A LayoutBlock always establishes a layout state, and this method is only | 5266 // A LayoutBlock always establishes a layout state, and this method is only |
| 5269 // meant to be called on the object currently being laid out. | 5267 // meant to be called on the object currently being laid out. |
| 5270 ASSERT(!isLayoutBlock()); | 5268 ASSERT(!isLayoutBlock()); |
| 5271 | 5269 |
| 5272 // In case this box doesn't establish a layout state, try the containing | 5270 // In case this box doesn't establish a layout state, try the containing |
| 5273 // block. | 5271 // block. |
| 5274 LayoutBlock* containerBlock = containingBlock(); | 5272 LayoutBlock* containerBlock = containingBlock(); |
| 5275 ASSERT(layoutState->layoutObject() == containerBlock); | 5273 ASSERT(layoutState->layoutObject() == containerBlock); |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5586 LayoutRect rect = frameRect(); | 5584 LayoutRect rect = frameRect(); |
| 5587 | 5585 |
| 5588 LayoutBlock* block = containingBlock(); | 5586 LayoutBlock* block = containingBlock(); |
| 5589 if (block) | 5587 if (block) |
| 5590 block->adjustChildDebugRect(rect); | 5588 block->adjustChildDebugRect(rect); |
| 5591 | 5589 |
| 5592 return rect; | 5590 return rect; |
| 5593 } | 5591 } |
| 5594 | 5592 |
| 5595 } // namespace blink | 5593 } // namespace blink |
| OLD | NEW |