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

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

Issue 2015523004: Don't explicitly initialize LayoutUnit to 0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Go through the subdirs of core/layout/ too. Created 4 years, 7 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
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)
109 : m_isPaginated(false) 109 : m_isPaginated(false)
110 , m_pageLogicalHeightChanged(false) 110 , m_pageLogicalHeightChanged(false)
111 , m_containingBlockLogicalWidthChanged(false) 111 , m_containingBlockLogicalWidthChanged(false)
112 , m_flowThread(nullptr) 112 , m_flowThread(nullptr)
113 , m_next(root.view()->layoutState()) 113 , m_next(root.view()->layoutState())
114 , m_pageLogicalHeight(0)
115 , m_layoutObject(root) 114 , m_layoutObject(root)
116 { 115 {
117 ASSERT(!m_next); 116 ASSERT(!m_next);
118 // We'll end up pushing in LayoutView itself, so don't bother adding it. 117 // We'll end up pushing in LayoutView itself, so don't bother adding it.
119 if (root.isLayoutView()) 118 if (root.isLayoutView())
120 return; 119 return;
121 120
122 root.view()->pushLayoutState(*this); 121 root.view()->pushLayoutState(*this);
123 122
124 LayoutObject* container = root.container(); 123 LayoutObject* container = root.container();
(...skipping 10 matching lines...) Expand all
135 } 134 }
136 135
137 LayoutUnit LayoutState::pageLogicalOffset(const LayoutBox& child, const LayoutUn it& childLogicalOffset) const 136 LayoutUnit LayoutState::pageLogicalOffset(const LayoutBox& child, const LayoutUn it& childLogicalOffset) const
138 { 137 {
139 if (child.isHorizontalWritingMode()) 138 if (child.isHorizontalWritingMode())
140 return m_layoutOffset.height() + childLogicalOffset - m_pageOffset.heigh t(); 139 return m_layoutOffset.height() + childLogicalOffset - m_pageOffset.heigh t();
141 return m_layoutOffset.width() + childLogicalOffset - m_pageOffset.width(); 140 return m_layoutOffset.width() + childLogicalOffset - m_pageOffset.width();
142 } 141 }
143 142
144 } // namespace blink 143 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698