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

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

Issue 1647313003: Continue converting to explicit LayoutUnit constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@explicitContstructors
Patch Set: Add TODO Created 4 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } else { 88 } else {
89 // If we don't establish a new page height, then propagate the old page height and offset down. 89 // If we don't establish a new page height, then propagate the old page height and offset down.
90 m_pageLogicalHeight = m_next->m_pageLogicalHeight; 90 m_pageLogicalHeight = m_next->m_pageLogicalHeight;
91 m_pageLogicalHeightChanged = m_next->m_pageLogicalHeightChanged; 91 m_pageLogicalHeightChanged = m_next->m_pageLogicalHeightChanged;
92 m_pageOffset = m_next->m_pageOffset; 92 m_pageOffset = m_next->m_pageOffset;
93 93
94 // Disable pagination for objects we don't support. For now this include s overflow:scroll/auto, inline blocks and 94 // Disable pagination for objects we don't support. For now this include s overflow:scroll/auto, inline blocks and
95 // writing mode roots. 95 // writing mode roots.
96 if (layoutObject.paginationBreakability() == LayoutBox::ForbidBreaks) { 96 if (layoutObject.paginationBreakability() == LayoutBox::ForbidBreaks) {
97 m_flowThread = nullptr; 97 m_flowThread = nullptr;
98 m_pageLogicalHeight = 0; 98 m_pageLogicalHeight = LayoutUnit();
99 m_isPaginated = false; 99 m_isPaginated = false;
100 } else { 100 } else {
101 m_isPaginated = m_pageLogicalHeight || m_flowThread; 101 m_isPaginated = m_pageLogicalHeight || m_flowThread;
102 } 102 }
103 } 103 }
104 104
105 // FIXME: <http://bugs.webkit.org/show_bug.cgi?id=13443> Apply control clip if present. 105 // FIXME: <http://bugs.webkit.org/show_bug.cgi?id=13443> Apply control clip if present.
106 } 106 }
107 107
108 LayoutState::LayoutState(LayoutObject& root) 108 LayoutState::LayoutState(LayoutObject& root)
(...skipping 26 matching lines...) Expand all
135 } 135 }
136 136
137 LayoutUnit LayoutState::pageLogicalOffset(const LayoutBox& child, const LayoutUn it& childLogicalOffset) const 137 LayoutUnit LayoutState::pageLogicalOffset(const LayoutBox& child, const LayoutUn it& childLogicalOffset) const
138 { 138 {
139 if (child.isHorizontalWritingMode()) 139 if (child.isHorizontalWritingMode())
140 return m_layoutOffset.height() + childLogicalOffset - m_pageOffset.heigh t(); 140 return m_layoutOffset.height() + childLogicalOffset - m_pageOffset.heigh t();
141 return m_layoutOffset.width() + childLogicalOffset - m_pageOffset.width(); 141 return m_layoutOffset.width() + childLogicalOffset - m_pageOffset.width();
142 } 142 }
143 143
144 } // namespace blink 144 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutSliderContainer.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698