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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutState.cpp

Issue 2529073002: No longer store page logical height in LayoutState. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutState.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutState.cpp b/third_party/WebKit/Source/core/layout/LayoutState.cpp
index f3510951de593dd49d0c9924caeac2baefdf45ba..4c0d537f4796670791d4e048f775d6a9f3af8eba 100644
--- a/third_party/WebKit/Source/core/layout/LayoutState.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutState.cpp
@@ -31,21 +31,18 @@
namespace blink {
-LayoutState::LayoutState(LayoutUnit pageLogicalHeight,
- LayoutView& view)
- : m_isPaginated(pageLogicalHeight),
+LayoutState::LayoutState(LayoutView& view)
+ : m_isPaginated(view.pageLogicalHeight()),
m_containingBlockLogicalWidthChanged(false),
m_paginationStateChanged(false),
m_flowThread(nullptr),
m_next(nullptr),
- m_pageLogicalHeight(pageLogicalHeight),
m_layoutObject(view) {
ASSERT(!view.layoutState());
view.pushLayoutState(*this);
}
LayoutState::LayoutState(LayoutBox& layoutObject,
- LayoutUnit pageLogicalHeight,
bool containingBlockLogicalWidthChanged)
: m_containingBlockLogicalWidthChanged(containingBlockLogicalWidthChanged),
m_next(layoutObject.view()->layoutState()),
@@ -58,9 +55,8 @@ LayoutState::LayoutState(LayoutBox& layoutObject,
layoutObject.view()->pushLayoutState(*this);
m_heightOffsetForTableHeaders = m_next->heightOffsetForTableHeaders();
- if (pageLogicalHeight || layoutObject.isLayoutFlowThread()) {
+ if (layoutObject.isLayoutFlowThread()) {
// Entering a new pagination context.
- m_pageLogicalHeight = pageLogicalHeight;
m_paginationOffset = LayoutSize();
m_isPaginated = true;
return;
@@ -72,15 +68,11 @@ LayoutState::LayoutState(LayoutBox& layoutObject,
if (layoutObject.getPaginationBreakability() == LayoutBox::ForbidBreaks ||
(m_layoutObject.isSVG() && !m_layoutObject.isSVGRoot())) {
m_flowThread = nullptr;
- m_pageLogicalHeight = LayoutUnit();
m_isPaginated = false;
return;
}
- // Propagate the old page height and offset down.
- m_pageLogicalHeight = m_next->m_pageLogicalHeight;
-
- m_isPaginated = m_pageLogicalHeight || m_flowThread;
+ m_isPaginated = m_next->m_isPaginated;
if (!m_isPaginated)
return;
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutState.h ('k') | third_party/WebKit/Source/core/layout/LayoutTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698