| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 6 * | 6 * |
| 7 * Other contributors: | 7 * Other contributors: |
| 8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
| 10 * Christian Biesinger <cbiesinger@gmail.com> | 10 * Christian Biesinger <cbiesinger@gmail.com> |
| (...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1277 // Force an update since we know the scrollbars have changed things. | 1277 // Force an update since we know the scrollbars have changed things. |
| 1278 if (box().document().hasAnnotatedRegions()) | 1278 if (box().document().hasAnnotatedRegions()) |
| 1279 box().document().setAnnotatedRegionsDirty(true); | 1279 box().document().setAnnotatedRegionsDirty(true); |
| 1280 return true; | 1280 return true; |
| 1281 } | 1281 } |
| 1282 | 1282 |
| 1283 int PaintLayerScrollableArea::verticalScrollbarWidth( | 1283 int PaintLayerScrollableArea::verticalScrollbarWidth( |
| 1284 OverlayScrollbarClipBehavior overlayScrollbarClipBehavior) const { | 1284 OverlayScrollbarClipBehavior overlayScrollbarClipBehavior) const { |
| 1285 if (!hasVerticalScrollbar()) | 1285 if (!hasVerticalScrollbar()) |
| 1286 return 0; | 1286 return 0; |
| 1287 if (verticalScrollbar()->isOverlayScrollbar() && | 1287 if ((verticalScrollbar()->isOverlayScrollbar() || |
| 1288 box().style()->overflowY() == EOverflow::kOverlay) && |
| 1288 (overlayScrollbarClipBehavior == IgnoreOverlayScrollbarSize || | 1289 (overlayScrollbarClipBehavior == IgnoreOverlayScrollbarSize || |
| 1289 !verticalScrollbar()->shouldParticipateInHitTesting())) | 1290 !verticalScrollbar()->shouldParticipateInHitTesting())) { |
| 1290 return 0; | 1291 return 0; |
| 1292 } |
| 1291 return verticalScrollbar()->scrollbarThickness(); | 1293 return verticalScrollbar()->scrollbarThickness(); |
| 1292 } | 1294 } |
| 1293 | 1295 |
| 1294 int PaintLayerScrollableArea::horizontalScrollbarHeight( | 1296 int PaintLayerScrollableArea::horizontalScrollbarHeight( |
| 1295 OverlayScrollbarClipBehavior overlayScrollbarClipBehavior) const { | 1297 OverlayScrollbarClipBehavior overlayScrollbarClipBehavior) const { |
| 1296 if (!hasHorizontalScrollbar()) | 1298 if (!hasHorizontalScrollbar()) |
| 1297 return 0; | 1299 return 0; |
| 1298 if (horizontalScrollbar()->isOverlayScrollbar() && | 1300 if ((horizontalScrollbar()->isOverlayScrollbar() || |
| 1301 box().style()->overflowX() == EOverflow::kOverlay) && |
| 1299 (overlayScrollbarClipBehavior == IgnoreOverlayScrollbarSize || | 1302 (overlayScrollbarClipBehavior == IgnoreOverlayScrollbarSize || |
| 1300 !horizontalScrollbar()->shouldParticipateInHitTesting())) | 1303 !horizontalScrollbar()->shouldParticipateInHitTesting())) { |
| 1301 return 0; | 1304 return 0; |
| 1305 } |
| 1302 return horizontalScrollbar()->scrollbarThickness(); | 1306 return horizontalScrollbar()->scrollbarThickness(); |
| 1303 } | 1307 } |
| 1304 | 1308 |
| 1305 void PaintLayerScrollableArea::positionOverflowControls() { | 1309 void PaintLayerScrollableArea::positionOverflowControls() { |
| 1306 if (!hasScrollbar() && !box().canResize()) | 1310 if (!hasScrollbar() && !box().canResize()) |
| 1307 return; | 1311 return; |
| 1308 | 1312 |
| 1309 const IntRect borderBox = box().pixelSnappedBorderBoxRect(); | 1313 const IntRect borderBox = box().pixelSnappedBorderBoxRect(); |
| 1310 if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) | 1314 if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) |
| 1311 verticalScrollbar->setFrameRect(rectForVerticalScrollbar(borderBox)); | 1315 verticalScrollbar->setFrameRect(rectForVerticalScrollbar(borderBox)); |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2114 | 2118 |
| 2115 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: | 2119 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: |
| 2116 clampScrollableAreas() { | 2120 clampScrollableAreas() { |
| 2117 for (auto& scrollableArea : *s_needsClamp) | 2121 for (auto& scrollableArea : *s_needsClamp) |
| 2118 scrollableArea->clampScrollOffsetAfterOverflowChange(); | 2122 scrollableArea->clampScrollOffsetAfterOverflowChange(); |
| 2119 delete s_needsClamp; | 2123 delete s_needsClamp; |
| 2120 s_needsClamp = nullptr; | 2124 s_needsClamp = nullptr; |
| 2121 } | 2125 } |
| 2122 | 2126 |
| 2123 } // namespace blink | 2127 } // namespace blink |
| OLD | NEW |