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

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

Issue 1929413002: 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 // TODO(wangxianzhu): Should use normal LayoutRect::unite() which ignores em pty rects. 97 void addVisualOverflow(const LayoutRect& rect) { m_visualOverflow.unite(rect ); }
98 void addVisualOverflow(const LayoutRect& rect) { m_visualOverflow.uniteEvenI fEmpty(rect); }
99 98
100 void move(LayoutUnit dx, LayoutUnit dy) 99 void move(LayoutUnit dx, LayoutUnit dy)
101 { 100 {
102 m_layoutOverflow.move(dx, dy); 101 m_layoutOverflow.move(dx, dy);
103 m_visualOverflow.move(dx, dy); 102 m_visualOverflow.move(dx, dy);
104 } 103 }
105 104
106 private: 105 private:
107 LayoutRect m_layoutOverflow; 106 LayoutRect m_layoutOverflow;
108 LayoutRect m_visualOverflow; 107 LayoutRect m_visualOverflow;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 : m_layoutOverflow(layoutRect) 140 : m_layoutOverflow(layoutRect)
142 , m_selfVisualOverflow(selfVisualOverflowRect) 141 , m_selfVisualOverflow(selfVisualOverflowRect)
143 { 142 {
144 } 143 }
145 144
146 const LayoutRect& layoutOverflowRect() const { return m_layoutOverflow; } 145 const LayoutRect& layoutOverflowRect() const { return m_layoutOverflow; }
147 void setLayoutOverflow(const LayoutRect& rect) { m_layoutOverflow = rect; } 146 void setLayoutOverflow(const LayoutRect& rect) { m_layoutOverflow = rect; }
148 void addLayoutOverflow(const LayoutRect& rect) { uniteLayoutOverflowRect(m_l ayoutOverflow, rect); } 147 void addLayoutOverflow(const LayoutRect& rect) { uniteLayoutOverflowRect(m_l ayoutOverflow, rect); }
149 148
150 const LayoutRect& selfVisualOverflowRect() const { return m_selfVisualOverfl ow; } 149 const LayoutRect& selfVisualOverflowRect() const { return m_selfVisualOverfl ow; }
151 // TODO(wangxianzhu): Should use normal LayoutRect::unite() which ignores em pty rects. 150 void addSelfVisualOverflow(const LayoutRect& rect) { m_selfVisualOverflow.un ite(rect); }
152 void addSelfVisualOverflow(const LayoutRect& rect) { m_selfVisualOverflow.un iteEvenIfEmpty(rect); }
153 151
154 const LayoutRect& contentsVisualOverflowRect() const { return m_contentsVisu alOverflow; } 152 const LayoutRect& contentsVisualOverflowRect() const { return m_contentsVisu alOverflow; }
155 void addContentsVisualOverflow(const LayoutRect& rect) { m_contentsVisualOve rflow.unite(rect); } 153 void addContentsVisualOverflow(const LayoutRect& rect) { m_contentsVisualOve rflow.unite(rect); }
156 154
157 void move(LayoutUnit dx, LayoutUnit dy) 155 void move(LayoutUnit dx, LayoutUnit dy)
158 { 156 {
159 m_layoutOverflow.move(dx, dy); 157 m_layoutOverflow.move(dx, dy);
160 m_selfVisualOverflow.move(dx, dy); 158 m_selfVisualOverflow.move(dx, dy);
161 m_contentsVisualOverflow.move(dx, dy); 159 m_contentsVisualOverflow.move(dx, dy);
162 } 160 }
163 161
164 LayoutUnit layoutClientAfterEdge() const { return m_layoutClientAfterEdge; } 162 LayoutUnit layoutClientAfterEdge() const { return m_layoutClientAfterEdge; }
165 void setLayoutClientAfterEdge(LayoutUnit clientAfterEdge) { m_layoutClientAf terEdge = clientAfterEdge; } 163 void setLayoutClientAfterEdge(LayoutUnit clientAfterEdge) { m_layoutClientAf terEdge = clientAfterEdge; }
166 164
167 private: 165 private:
168 LayoutRect m_layoutOverflow; 166 LayoutRect m_layoutOverflow;
169 LayoutRect m_selfVisualOverflow; 167 LayoutRect m_selfVisualOverflow;
170 LayoutRect m_contentsVisualOverflow; 168 LayoutRect m_contentsVisualOverflow;
171 LayoutUnit m_layoutClientAfterEdge; 169 LayoutUnit m_layoutClientAfterEdge;
172 }; 170 };
173 171
174 } // namespace blink 172 } // namespace blink
175 173
176 #endif // OverflowModel_h 174 #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