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

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

Issue 2667493002: Changed EPosition to an enum class and renamed its members (Closed)
Patch Set: Rebase Created 3 years, 10 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
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 } 72 }
73 73
74 m_isPaginated = m_next->m_isPaginated; 74 m_isPaginated = m_next->m_isPaginated;
75 if (!m_isPaginated) 75 if (!m_isPaginated)
76 return; 76 return;
77 77
78 // Now adjust the pagination offset, so that we can easily figure out how far 78 // Now adjust the pagination offset, so that we can easily figure out how far
79 // away we are from the start of the pagination context. 79 // away we are from the start of the pagination context.
80 m_paginationOffset = m_next->m_paginationOffset; 80 m_paginationOffset = m_next->m_paginationOffset;
81 bool fixed = layoutObject.isOutOfFlowPositioned() && 81 bool fixed = layoutObject.isOutOfFlowPositioned() &&
82 layoutObject.style()->position() == FixedPosition; 82 layoutObject.style()->position() == EPosition::kFixed;
83 if (fixed) 83 if (fixed)
84 return; 84 return;
85 m_paginationOffset = 85 m_paginationOffset =
86 m_next->m_paginationOffset + layoutObject.locationOffset(); 86 m_next->m_paginationOffset + layoutObject.locationOffset();
87 if (!layoutObject.isOutOfFlowPositioned()) 87 if (!layoutObject.isOutOfFlowPositioned())
88 return; 88 return;
89 if (LayoutObject* container = layoutObject.container()) { 89 if (LayoutObject* container = layoutObject.container()) {
90 if (container->style()->hasInFlowPosition() && 90 if (container->style()->hasInFlowPosition() &&
91 container->isLayoutInline()) { 91 container->isLayoutInline()) {
92 m_paginationOffset += 92 m_paginationOffset +=
(...skipping 30 matching lines...) Expand all
123 123
124 LayoutUnit LayoutState::pageLogicalOffset( 124 LayoutUnit LayoutState::pageLogicalOffset(
125 const LayoutBox& child, 125 const LayoutBox& child,
126 const LayoutUnit& childLogicalOffset) const { 126 const LayoutUnit& childLogicalOffset) const {
127 if (child.isHorizontalWritingMode()) 127 if (child.isHorizontalWritingMode())
128 return m_paginationOffset.height() + childLogicalOffset; 128 return m_paginationOffset.height() + childLogicalOffset;
129 return m_paginationOffset.width() + childLogicalOffset; 129 return m_paginationOffset.width() + childLogicalOffset;
130 } 130 }
131 131
132 } // namespace blink 132 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698