| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 m_flowThread = nullptr; | 57 m_flowThread = nullptr; |
| 58 layoutObject.view()->pushLayoutState(*this); | 58 layoutObject.view()->pushLayoutState(*this); |
| 59 bool fixed = layoutObject.isOutOfFlowPositioned() && layoutObject.style()->p
osition() == FixedPosition; | 59 bool fixed = layoutObject.isOutOfFlowPositioned() && layoutObject.style()->p
osition() == FixedPosition; |
| 60 if (fixed) { | 60 if (fixed) { |
| 61 // FIXME: This doesn't work correctly with transforms. | 61 // FIXME: This doesn't work correctly with transforms. |
| 62 FloatPoint fixedOffset = layoutObject.view()->localToAbsolute(FloatPoint
(), IsFixed); | 62 FloatPoint fixedOffset = layoutObject.view()->localToAbsolute(FloatPoint
(), IsFixed); |
| 63 m_layoutOffset = LayoutSize(fixedOffset.x(), fixedOffset.y()) + offset; | 63 m_layoutOffset = LayoutSize(fixedOffset.x(), fixedOffset.y()) + offset; |
| 64 } else { | 64 } else { |
| 65 m_layoutOffset = m_next->m_layoutOffset + offset; | 65 m_layoutOffset = m_next->m_layoutOffset + offset; |
| 66 } | 66 } |
| 67 m_heightOffsetForTableHeaders = m_next->heightOffsetForTableHeaders(); |
| 67 | 68 |
| 68 if (layoutObject.isOutOfFlowPositioned() && !fixed) { | 69 if (layoutObject.isOutOfFlowPositioned() && !fixed) { |
| 69 if (LayoutObject* container = layoutObject.container()) { | 70 if (LayoutObject* container = layoutObject.container()) { |
| 70 if (container->style()->hasInFlowPosition() && container->isLayoutIn
line()) | 71 if (container->style()->hasInFlowPosition() && container->isLayoutIn
line()) |
| 71 m_layoutOffset += toLayoutInline(container)->offsetForInFlowPosi
tionedInline(layoutObject); | 72 m_layoutOffset += toLayoutInline(container)->offsetForInFlowPosi
tionedInline(layoutObject); |
| 72 } | 73 } |
| 73 } | 74 } |
| 74 // If we establish a new page height, then cache the offset to the top of th
e first page. | 75 // If we establish a new page height, then cache the offset to the top of th
e first page. |
| 75 // We can compare this later on to figure out what part of the page we're ac
tually on, | 76 // We can compare this later on to figure out what part of the page we're ac
tually on, |
| 76 if (pageLogicalHeight || layoutObject.isLayoutFlowThread()) { | 77 if (pageLogicalHeight || layoutObject.isLayoutFlowThread()) { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 } | 135 } |
| 135 | 136 |
| 136 LayoutUnit LayoutState::pageLogicalOffset(const LayoutBox& child, const LayoutUn
it& childLogicalOffset) const | 137 LayoutUnit LayoutState::pageLogicalOffset(const LayoutBox& child, const LayoutUn
it& childLogicalOffset) const |
| 137 { | 138 { |
| 138 if (child.isHorizontalWritingMode()) | 139 if (child.isHorizontalWritingMode()) |
| 139 return m_layoutOffset.height() + childLogicalOffset - m_pageOffset.heigh
t(); | 140 return m_layoutOffset.height() + childLogicalOffset - m_pageOffset.heigh
t(); |
| 140 return m_layoutOffset.width() + childLogicalOffset - m_pageOffset.width(); | 141 return m_layoutOffset.width() + childLogicalOffset - m_pageOffset.width(); |
| 141 } | 142 } |
| 142 | 143 |
| 143 } // namespace blink | 144 } // namespace blink |
| OLD | NEW |