OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
160 { | 160 { |
161 // It's hard to predict here which of full paint invalidation or per-descend ant paint invalidation costs less. | 161 // It's hard to predict here which of full paint invalidation or per-descend ant paint invalidation costs less. |
162 // For vertical writing mode or width change it's more likely that per-desce ndant paint invalidation | 162 // For vertical writing mode or width change it's more likely that per-desce ndant paint invalidation |
163 // eventually turns out to be full paint invalidation but with the cost to h andle more layout states | 163 // eventually turns out to be full paint invalidation but with the cost to h andle more layout states |
164 // and discrete paint invalidation rects, so marking full paint invalidation here is more likely to cost less. | 164 // and discrete paint invalidation rects, so marking full paint invalidation here is more likely to cost less. |
165 // Otherwise, per-descendant paint invalidation is more likely to avoid unne cessary full paint invalidation. | 165 // Otherwise, per-descendant paint invalidation is more likely to avoid unne cessary full paint invalidation. |
166 | 166 |
167 if (shouldUsePrintingLayout()) | 167 if (shouldUsePrintingLayout()) |
168 return true; | 168 return true; |
169 | 169 |
170 if (!style()->isHorizontalWritingMode() || width() != viewWidth()) | 170 if (!style()->isHorizontalWritingMode() || width() != viewWidth()) { |
171 fprintf(stderr, "change view width\n"); | |
dsinclair
2014/10/31 00:14:34
Remove.
chrishtr
2014/10/31 18:22:24
Fixed.
| |
171 return true; | 172 return true; |
173 } | |
172 | 174 |
173 if (height() != viewHeight()) { | 175 if (height() != viewHeight()) { |
174 if (RenderObject* backgroundRenderer = this->backgroundRenderer()) { | 176 if (RenderObject* backgroundRenderer = this->backgroundRenderer()) { |
175 // When background-attachment is 'fixed', we treat the viewport (ins tead of the 'root' | 177 // When background-attachment is 'fixed', we treat the viewport (ins tead of the 'root' |
176 // i.e. html or body) as the background positioning area, and we sho uld full paint invalidation | 178 // i.e. html or body) as the background positioning area, and we sho uld full paint invalidation |
177 // viewport resize if the background image is not composited and nee ds full paint invalidation on | 179 // viewport resize if the background image is not composited and nee ds full paint invalidation on |
178 // background positioning area resize. | 180 // background positioning area resize. |
179 if (!m_compositor || !m_compositor->needsFixedRootBackgroundLayer(la yer())) { | 181 if (!m_compositor || !m_compositor->needsFixedRootBackgroundLayer(la yer())) { |
180 if (backgroundRenderer->style()->hasFixedBackgroundImage() | 182 if (backgroundRenderer->style()->hasFixedBackgroundImage() |
181 && mustInvalidateFillLayersPaintOnHeightChange(backgroundRen derer->style()->backgroundLayers())) | 183 && mustInvalidateFillLayersPaintOnHeightChange(backgroundRen derer->style()->backgroundLayers())) |
182 return true; | 184 return true; |
183 } | 185 } |
184 } | 186 } |
185 } | 187 } |
186 | 188 |
187 return false; | 189 return false; |
188 } | 190 } |
189 | 191 |
190 void RenderView::layout() | 192 void RenderView::layout() |
191 { | 193 { |
192 if (!document().paginated()) | 194 if (!document().paginated()) |
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
872 return viewWidth(IncludeScrollbars) / scale; | 874 return viewWidth(IncludeScrollbars) / scale; |
873 } | 875 } |
874 | 876 |
875 double RenderView::layoutViewportHeight() const | 877 double RenderView::layoutViewportHeight() const |
876 { | 878 { |
877 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; | 879 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; |
878 return viewHeight(IncludeScrollbars) / scale; | 880 return viewHeight(IncludeScrollbars) / scale; |
879 } | 881 } |
880 | 882 |
881 } // namespace blink | 883 } // namespace blink |
OLD | NEW |