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

Side by Side Diff: third_party/WebKit/Source/core/layout/OverflowModel.h

Issue 1973023002: Revert of Don't include contents visual overflow into paint invalidation rect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 , m_visualOverflow(visualRect) 87 , m_visualOverflow(visualRect)
88 { 88 {
89 } 89 }
90 90
91 const LayoutRect& layoutOverflowRect() const { return m_layoutOverflow; } 91 const LayoutRect& layoutOverflowRect() const { return m_layoutOverflow; }
92 void setLayoutOverflow(const LayoutRect& rect) { m_layoutOverflow = rect; } 92 void setLayoutOverflow(const LayoutRect& rect) { m_layoutOverflow = rect; }
93 void addLayoutOverflow(const LayoutRect& rect) { uniteLayoutOverflowRect(m_l ayoutOverflow, rect); } 93 void addLayoutOverflow(const LayoutRect& rect) { uniteLayoutOverflowRect(m_l ayoutOverflow, rect); }
94 94
95 const LayoutRect& visualOverflowRect() const { return m_visualOverflow; } 95 const LayoutRect& visualOverflowRect() const { return m_visualOverflow; }
96 void setVisualOverflow(const LayoutRect& rect) { m_visualOverflow = rect; } 96 void setVisualOverflow(const LayoutRect& rect) { m_visualOverflow = rect; }
97 void addVisualOverflow(const LayoutRect& rect) { m_visualOverflow.unite(rect ); } 97 // TODO(wangxianzhu): Should use normal LayoutRect::unite() which ignores em pty rects.
98 void addVisualOverflow(const LayoutRect& rect) { m_visualOverflow.uniteEvenI fEmpty(rect); }
98 99
99 void move(LayoutUnit dx, LayoutUnit dy) 100 void move(LayoutUnit dx, LayoutUnit dy)
100 { 101 {
101 m_layoutOverflow.move(dx, dy); 102 m_layoutOverflow.move(dx, dy);
102 m_visualOverflow.move(dx, dy); 103 m_visualOverflow.move(dx, dy);
103 } 104 }
104 105
105 private: 106 private:
106 LayoutRect m_layoutOverflow; 107 LayoutRect m_layoutOverflow;
107 LayoutRect m_visualOverflow; 108 LayoutRect m_visualOverflow;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 : m_layoutOverflow(layoutRect) 141 : m_layoutOverflow(layoutRect)
141 , m_selfVisualOverflow(selfVisualOverflowRect) 142 , m_selfVisualOverflow(selfVisualOverflowRect)
142 { 143 {
143 } 144 }
144 145
145 const LayoutRect& layoutOverflowRect() const { return m_layoutOverflow; } 146 const LayoutRect& layoutOverflowRect() const { return m_layoutOverflow; }
146 void setLayoutOverflow(const LayoutRect& rect) { m_layoutOverflow = rect; } 147 void setLayoutOverflow(const LayoutRect& rect) { m_layoutOverflow = rect; }
147 void addLayoutOverflow(const LayoutRect& rect) { uniteLayoutOverflowRect(m_l ayoutOverflow, rect); } 148 void addLayoutOverflow(const LayoutRect& rect) { uniteLayoutOverflowRect(m_l ayoutOverflow, rect); }
148 149
149 const LayoutRect& selfVisualOverflowRect() const { return m_selfVisualOverfl ow; } 150 const LayoutRect& selfVisualOverflowRect() const { return m_selfVisualOverfl ow; }
150 void addSelfVisualOverflow(const LayoutRect& rect) { m_selfVisualOverflow.un ite(rect); } 151 // TODO(wangxianzhu): Should use normal LayoutRect::unite() which ignores em pty rects.
152 void addSelfVisualOverflow(const LayoutRect& rect) { m_selfVisualOverflow.un iteEvenIfEmpty(rect); }
151 153
152 const LayoutRect& contentsVisualOverflowRect() const { return m_contentsVisu alOverflow; } 154 const LayoutRect& contentsVisualOverflowRect() const { return m_contentsVisu alOverflow; }
153 void addContentsVisualOverflow(const LayoutRect& rect) { m_contentsVisualOve rflow.unite(rect); } 155 void addContentsVisualOverflow(const LayoutRect& rect) { m_contentsVisualOve rflow.unite(rect); }
154 156
155 void move(LayoutUnit dx, LayoutUnit dy) 157 void move(LayoutUnit dx, LayoutUnit dy)
156 { 158 {
157 m_layoutOverflow.move(dx, dy); 159 m_layoutOverflow.move(dx, dy);
158 m_selfVisualOverflow.move(dx, dy); 160 m_selfVisualOverflow.move(dx, dy);
159 m_contentsVisualOverflow.move(dx, dy); 161 m_contentsVisualOverflow.move(dx, dy);
160 } 162 }
161 163
162 LayoutUnit layoutClientAfterEdge() const { return m_layoutClientAfterEdge; } 164 LayoutUnit layoutClientAfterEdge() const { return m_layoutClientAfterEdge; }
163 void setLayoutClientAfterEdge(LayoutUnit clientAfterEdge) { m_layoutClientAf terEdge = clientAfterEdge; } 165 void setLayoutClientAfterEdge(LayoutUnit clientAfterEdge) { m_layoutClientAf terEdge = clientAfterEdge; }
164 166
165 private: 167 private:
166 LayoutRect m_layoutOverflow; 168 LayoutRect m_layoutOverflow;
167 LayoutRect m_selfVisualOverflow; 169 LayoutRect m_selfVisualOverflow;
168 LayoutRect m_contentsVisualOverflow; 170 LayoutRect m_contentsVisualOverflow;
169 LayoutUnit m_layoutClientAfterEdge; 171 LayoutUnit m_layoutClientAfterEdge;
170 }; 172 };
171 173
172 } // namespace blink 174 } // namespace blink
173 175
174 #endif // OverflowModel_h 176 #endif // OverflowModel_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableCell.cpp ('k') | third_party/WebKit/Source/core/layout/OverflowModelTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698