| 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 if (!frameView->invalidateViewportConstrainedObjects()) | 437 if (!frameView->invalidateViewportConstrainedObjects()) |
| 438 requiresPaintInvalidation = true; | 438 requiresPaintInvalidation = true; |
| 439 } | 439 } |
| 440 | 440 |
| 441 // Just schedule a full paint invalidation of our object. | 441 // Just schedule a full paint invalidation of our object. |
| 442 // FIXME: This invalidation will be unnecessary in slimming paint phase 2. | 442 // FIXME: This invalidation will be unnecessary in slimming paint phase 2. |
| 443 if (requiresPaintInvalidation) { | 443 if (requiresPaintInvalidation) { |
| 444 box().setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(); | 444 box().setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(); |
| 445 } | 445 } |
| 446 | 446 |
| 447 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { |
| 448 // The scrollOffsetTranslation paint property depends on the scroll offset. |
| 449 // (see: PaintPropertyTreeBuilder.updateProperties(FrameView&,...) and |
| 450 // PaintPropertyTreeBuilder.updateScrollAndScrollTranslation). |
| 451 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled() && |
| 452 layer()->isRootLayer()) { |
| 453 frameView->setNeedsPaintPropertyUpdate(); |
| 454 } else { |
| 455 box().setNeedsPaintPropertyUpdate(); |
| 456 } |
| 457 } |
| 458 |
| 447 // Schedule the scroll DOM event. | 459 // Schedule the scroll DOM event. |
| 448 if (box().node()) | 460 if (box().node()) |
| 449 box().node()->document().enqueueScrollEventForNode(box().node()); | 461 box().node()->document().enqueueScrollEventForNode(box().node()); |
| 450 | 462 |
| 451 if (AXObjectCache* cache = box().document().existingAXObjectCache()) | 463 if (AXObjectCache* cache = box().document().existingAXObjectCache()) |
| 452 cache->handleScrollPositionChanged(&box()); | 464 cache->handleScrollPositionChanged(&box()); |
| 453 box().view()->clearHitTestCache(); | 465 box().view()->clearHitTestCache(); |
| 454 | 466 |
| 455 // Inform the FrameLoader of the new scroll position, so it can be restored | 467 // Inform the FrameLoader of the new scroll position, so it can be restored |
| 456 // when navigating back. | 468 // when navigating back. |
| (...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1666 isVisibleToHitTest &= owner->layoutObject() && | 1678 isVisibleToHitTest &= owner->layoutObject() && |
| 1667 owner->layoutObject()->style()->visibleToHitTesting(); | 1679 owner->layoutObject()->style()->visibleToHitTesting(); |
| 1668 } | 1680 } |
| 1669 | 1681 |
| 1670 bool didScrollOverflow = m_scrollsOverflow; | 1682 bool didScrollOverflow = m_scrollsOverflow; |
| 1671 | 1683 |
| 1672 m_scrollsOverflow = hasOverflow && isVisibleToHitTest; | 1684 m_scrollsOverflow = hasOverflow && isVisibleToHitTest; |
| 1673 if (didScrollOverflow == scrollsOverflow()) | 1685 if (didScrollOverflow == scrollsOverflow()) |
| 1674 return; | 1686 return; |
| 1675 | 1687 |
| 1688 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { |
| 1689 // The scroll and scroll offset properties depend on |scrollsOverflow| (see: |
| 1690 // PaintPropertyTreeBuilder::updateScrollAndScrollTranslation). |
| 1691 box().setNeedsPaintPropertyUpdate(); |
| 1692 } |
| 1693 |
| 1676 if (m_scrollsOverflow) { | 1694 if (m_scrollsOverflow) { |
| 1677 DCHECK(canHaveOverflowScrollbars(box())); | 1695 DCHECK(canHaveOverflowScrollbars(box())); |
| 1678 frameView->addScrollableArea(this); | 1696 frameView->addScrollableArea(this); |
| 1679 } else { | 1697 } else { |
| 1680 frameView->removeScrollableArea(this); | 1698 frameView->removeScrollableArea(this); |
| 1681 } | 1699 } |
| 1682 } | 1700 } |
| 1683 | 1701 |
| 1684 void PaintLayerScrollableArea::updateCompositingLayersAfterScroll() { | 1702 void PaintLayerScrollableArea::updateCompositingLayersAfterScroll() { |
| 1685 PaintLayerCompositor* compositor = box().view()->compositor(); | 1703 PaintLayerCompositor* compositor = box().view()->compositor(); |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2015 | 2033 |
| 2016 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: | 2034 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: |
| 2017 clampScrollableAreas() { | 2035 clampScrollableAreas() { |
| 2018 for (auto& scrollableArea : *s_needsClamp) | 2036 for (auto& scrollableArea : *s_needsClamp) |
| 2019 scrollableArea->clampScrollOffsetAfterOverflowChange(); | 2037 scrollableArea->clampScrollOffsetAfterOverflowChange(); |
| 2020 delete s_needsClamp; | 2038 delete s_needsClamp; |
| 2021 s_needsClamp = nullptr; | 2039 s_needsClamp = nullptr; |
| 2022 } | 2040 } |
| 2023 | 2041 |
| 2024 } // namespace blink | 2042 } // namespace blink |
| OLD | NEW |