Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(451)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutState.cpp

Issue 1426673005: Introduce LayoutBox::paginationBreakability(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 m_pageLogicalHeightChanged = false; 87 m_pageLogicalHeightChanged = false;
88 m_isPaginated = false; 88 m_isPaginated = false;
89 } else { 89 } else {
90 // If we don't establish a new page height, then propagate the old page height and offset down. 90 // If we don't establish a new page height, then propagate the old page height and offset down.
91 m_pageLogicalHeight = m_next->m_pageLogicalHeight; 91 m_pageLogicalHeight = m_next->m_pageLogicalHeight;
92 m_pageLogicalHeightChanged = m_next->m_pageLogicalHeightChanged; 92 m_pageLogicalHeightChanged = m_next->m_pageLogicalHeightChanged;
93 m_pageOffset = m_next->m_pageOffset; 93 m_pageOffset = m_next->m_pageOffset;
94 94
95 // Disable pagination for objects we don't support. For now this include s overflow:scroll/auto, inline blocks and 95 // Disable pagination for objects we don't support. For now this include s overflow:scroll/auto, inline blocks and
96 // writing mode roots. 96 // writing mode roots.
97 if (layoutObject.isUnsplittableForPagination()) { 97 if (layoutObject.paginationBreakability() == LayoutBox::ForbidBreaks) {
98 m_flowThread = nullptr; 98 m_flowThread = nullptr;
99 m_pageLogicalHeight = 0; 99 m_pageLogicalHeight = 0;
100 m_isPaginated = false; 100 m_isPaginated = false;
101 } else { 101 } else {
102 m_isPaginated = m_pageLogicalHeight || m_flowThread; 102 m_isPaginated = m_pageLogicalHeight || m_flowThread;
103 } 103 }
104 } 104 }
105 105
106 // FIXME: <http://bugs.webkit.org/show_bug.cgi?id=13443> Apply control clip if present. 106 // FIXME: <http://bugs.webkit.org/show_bug.cgi?id=13443> Apply control clip if present.
107 } 107 }
(...skipping 28 matching lines...) Expand all
136 } 136 }
137 137
138 LayoutUnit LayoutState::pageLogicalOffset(const LayoutBox& child, const LayoutUn it& childLogicalOffset) const 138 LayoutUnit LayoutState::pageLogicalOffset(const LayoutBox& child, const LayoutUn it& childLogicalOffset) const
139 { 139 {
140 if (child.isHorizontalWritingMode()) 140 if (child.isHorizontalWritingMode())
141 return m_layoutOffset.height() + childLogicalOffset - m_pageOffset.heigh t(); 141 return m_layoutOffset.height() + childLogicalOffset - m_pageOffset.heigh t();
142 return m_layoutOffset.width() + childLogicalOffset - m_pageOffset.width(); 142 return m_layoutOffset.width() + childLogicalOffset - m_pageOffset.width();
143 } 143 }
144 144
145 } // namespace blink 145 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698