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

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

Issue 1395753004: A new LayoutState should never locate a containing flow thread on its own. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review. More ahem, more hotpink, slightly less random numbers. Created 5 years, 2 months 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/LayoutTests/fast/multicol/input-type-number-expected.html ('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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.isUnsplittableForPagination()) {
98 m_flowThread = nullptr;
98 m_pageLogicalHeight = 0; 99 m_pageLogicalHeight = 0;
99 m_isPaginated = false; 100 m_isPaginated = false;
100 } else { 101 } else {
101 m_isPaginated = m_pageLogicalHeight || layoutObject.flowThreadContai ningBlock(); 102 m_isPaginated = m_pageLogicalHeight || m_flowThread;
102 } 103 }
103 } 104 }
104 105
105 // 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.
106 } 107 }
107 108
108 LayoutState::LayoutState(LayoutObject& root) 109 LayoutState::LayoutState(LayoutObject& root)
109 : m_isPaginated(false) 110 : m_isPaginated(false)
110 , m_pageLogicalHeightChanged(false) 111 , m_pageLogicalHeightChanged(false)
111 , m_containingBlockLogicalWidthChanged(false) 112 , m_containingBlockLogicalWidthChanged(false)
(...skipping 23 matching lines...) Expand all
135 } 136 }
136 137
137 LayoutUnit LayoutState::pageLogicalOffset(const LayoutBox& child, const LayoutUn it& childLogicalOffset) const 138 LayoutUnit LayoutState::pageLogicalOffset(const LayoutBox& child, const LayoutUn it& childLogicalOffset) const
138 { 139 {
139 if (child.isHorizontalWritingMode()) 140 if (child.isHorizontalWritingMode())
140 return m_layoutOffset.height() + childLogicalOffset - m_pageOffset.heigh t(); 141 return m_layoutOffset.height() + childLogicalOffset - m_pageOffset.heigh t();
141 return m_layoutOffset.width() + childLogicalOffset - m_pageOffset.width(); 142 return m_layoutOffset.width() + childLogicalOffset - m_pageOffset.width();
142 } 143 }
143 144
144 } // namespace blink 145 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/multicol/input-type-number-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698