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 4872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4883 return flowThread->pageLogicalHeightForOffset(offset + offsetFromLogicalTopO fFirstPage()); | 4883 return flowThread->pageLogicalHeightForOffset(offset + offsetFromLogicalTopO fFirstPage()); |
4884 } | 4884 } |
4885 | 4885 |
4886 LayoutUnit LayoutBox::pageRemainingLogicalHeightForOffset(LayoutUnit offset, Pag eBoundaryRule pageBoundaryRule) const | 4886 LayoutUnit LayoutBox::pageRemainingLogicalHeightForOffset(LayoutUnit offset, Pag eBoundaryRule pageBoundaryRule) const |
4887 { | 4887 { |
4888 LayoutView* layoutView = view(); | 4888 LayoutView* layoutView = view(); |
4889 offset += offsetFromLogicalTopOfFirstPage(); | 4889 offset += offsetFromLogicalTopOfFirstPage(); |
4890 | 4890 |
4891 LayoutFlowThread* flowThread = flowThreadContainingBlock(); | 4891 LayoutFlowThread* flowThread = flowThreadContainingBlock(); |
4892 if (!flowThread) { | 4892 if (!flowThread) { |
4893 LayoutUnit pageLogicalHeight = layoutView->layoutState()->pageLogicalHei ght(); | 4893 LayoutUnit pageLogicalHeight = layoutView->pageLogicalHeight(); |
rhogan
2016/08/02 17:59:02
Per https://chromium.googlesource.com/chromium/src
| |
4894 LayoutUnit remainingHeight = pageLogicalHeight - intMod(offset, pageLogi calHeight); | 4894 LayoutUnit remainingHeight = pageLogicalHeight - intMod(offset, pageLogi calHeight); |
4895 if (pageBoundaryRule == AssociateWithFormerPage) { | 4895 if (pageBoundaryRule == AssociateWithFormerPage) { |
4896 // An offset exactly at a page boundary will act as being part of th e former page in | 4896 // An offset exactly at a page boundary will act as being part of th e former page in |
4897 // question (i.e. no remaining space), rather than being part of the latter (i.e. one | 4897 // question (i.e. no remaining space), rather than being part of the latter (i.e. one |
4898 // whole page length of remaining space). | 4898 // whole page length of remaining space). |
4899 remainingHeight = intMod(remainingHeight, pageLogicalHeight); | 4899 remainingHeight = intMod(remainingHeight, pageLogicalHeight); |
4900 } | 4900 } |
4901 return remainingHeight; | 4901 return remainingHeight; |
4902 } | 4902 } |
4903 | 4903 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4965 m_rareData->m_snapAreas->remove(&snapArea); | 4965 m_rareData->m_snapAreas->remove(&snapArea); |
4966 } | 4966 } |
4967 } | 4967 } |
4968 | 4968 |
4969 SnapAreaSet* LayoutBox::snapAreas() const | 4969 SnapAreaSet* LayoutBox::snapAreas() const |
4970 { | 4970 { |
4971 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4971 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
4972 } | 4972 } |
4973 | 4973 |
4974 } // namespace blink | 4974 } // namespace blink |
OLD | NEW |