Chromium Code Reviews| 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 287 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) | 287 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) |
| 288 return LayoutBlockFlow::visualOverflowRect(); | 288 return LayoutBlockFlow::visualOverflowRect(); |
| 289 | 289 |
| 290 // Ditto when not in compositing mode. | 290 // Ditto when not in compositing mode. |
| 291 if (!usesCompositing()) | 291 if (!usesCompositing()) |
| 292 return LayoutBlockFlow::visualOverflowRect(); | 292 return LayoutBlockFlow::visualOverflowRect(); |
| 293 | 293 |
| 294 // In normal compositing mode, LayoutView doesn't actually apply clipping | 294 // In normal compositing mode, LayoutView doesn't actually apply clipping |
| 295 // on its descendants. Instead their visual overflow is propagated to | 295 // on its descendants. Instead their visual overflow is propagated to |
| 296 // compositor()->m_rootContentLayer for accelerated scrolling. | 296 // compositor()->m_rootContentLayer for accelerated scrolling. |
| 297 return LayoutRect(documentRect()); | 297 return layoutOverflowRect(); |
| 298 } | 298 } |
| 299 | 299 |
| 300 LayoutRect LayoutView::localOverflowRectForPaintInvalidation() const | 300 LayoutRect LayoutView::localOverflowRectForPaintInvalidation() const |
| 301 { | 301 { |
| 302 // TODO(wangxianzhu): This is only required without rootLayerScrolls (though it is also correct | 302 // TODO(wangxianzhu): This is only required without rootLayerScrolls (though it is also correct |
| 303 // but unnecessary with rootLayerScrolls) because of the special LayoutView overflow model. | 303 // but unnecessary with rootLayerScrolls) because of the special LayoutView overflow model. |
| 304 return visualOverflowRect(); | 304 return visualOverflowRect(); |
| 305 } | 305 } |
| 306 | 306 |
| 307 void LayoutView::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, Transf ormState& transformState, MapCoordinatesFlags mode) const | 307 void LayoutView::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, Transf ormState& transformState, MapCoordinatesFlags mode) const |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 815 if (hasOverflowClip()) | 815 if (hasOverflowClip()) |
| 816 excludeScrollbars(rect, overlayScrollbarClipBehavior); | 816 excludeScrollbars(rect, overlayScrollbarClipBehavior); |
| 817 | 817 |
| 818 return rect; | 818 return rect; |
| 819 } | 819 } |
| 820 | 820 |
| 821 IntRect LayoutView::documentRect() const | 821 IntRect LayoutView::documentRect() const |
| 822 { | 822 { |
| 823 LayoutRect overflowRect(layoutOverflowRect()); | 823 LayoutRect overflowRect(layoutOverflowRect()); |
| 824 flipForWritingMode(overflowRect); | 824 flipForWritingMode(overflowRect); |
| 825 // TODO(crbug.com/650768): The pixel snapping looks incorect. | |
|
chrishtr
2016/09/27 18:55:20
nit: "incorrect"
Xianzhu
2016/09/27 20:48:38
Done.
| |
| 825 return pixelSnappedIntRect(overflowRect); | 826 return pixelSnappedIntRect(overflowRect); |
| 826 } | 827 } |
| 827 | 828 |
| 828 bool LayoutView::rootBackgroundIsEntirelyFixed() const | 829 bool LayoutView::rootBackgroundIsEntirelyFixed() const |
| 829 { | 830 { |
| 830 return style()->hasEntirelyFixedBackground(); | 831 return style()->hasEntirelyFixedBackground(); |
| 831 } | 832 } |
| 832 | 833 |
| 833 LayoutRect LayoutView::backgroundRect(LayoutBox* backgroundLayoutObject) const | 834 LayoutRect LayoutView::backgroundRect(LayoutBox* backgroundLayoutObject) const |
| 834 { | 835 { |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1005 if (block) | 1006 if (block) |
| 1006 block->adjustChildDebugRect(rect); | 1007 block->adjustChildDebugRect(rect); |
| 1007 | 1008 |
| 1008 rect.setWidth(LayoutUnit(viewWidth(IncludeScrollbars))); | 1009 rect.setWidth(LayoutUnit(viewWidth(IncludeScrollbars))); |
| 1009 rect.setHeight(LayoutUnit(viewHeight(IncludeScrollbars))); | 1010 rect.setHeight(LayoutUnit(viewHeight(IncludeScrollbars))); |
| 1010 | 1011 |
| 1011 return rect; | 1012 return rect; |
| 1012 } | 1013 } |
| 1013 | 1014 |
| 1014 } // namespace blink | 1015 } // namespace blink |
| OLD | NEW |