| Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| index 42e097ebae8d8facf8a5a49bdb5514fcaf169e89..82f1a1ba82046491252f0d0d9b43aab389443983 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| @@ -1486,10 +1486,10 @@ bool PaintLayer::hasOverflowControls() const
|
| return m_scrollableArea && (m_scrollableArea->hasScrollbar() || m_scrollableArea->scrollCorner() || layoutObject()->style()->resize() != RESIZE_NONE);
|
| }
|
|
|
| -void PaintLayer::appendSingleFragmentIgnoringPagination(PaintLayerFragments& fragments, const PaintLayer* rootLayer, const LayoutRect& dirtyRect, ClipRectsCacheSlot clipRectsCacheSlot, OverlayScrollbarSizeRelevancy inOverlayScrollbarSizeRelevancy, ShouldRespectOverflowClipType respectOverflowClip, const LayoutPoint* offsetFromRoot, const LayoutSize& subPixelAccumulation)
|
| +void PaintLayer::appendSingleFragmentIgnoringPagination(PaintLayerFragments& fragments, const PaintLayer* rootLayer, const LayoutRect& dirtyRect, ClipRectsCacheSlot clipRectsCacheSlot, OverlayScrollbarClipBehavior overlayScrollbarClipBehavior, ShouldRespectOverflowClipType respectOverflowClip, const LayoutPoint* offsetFromRoot, const LayoutSize& subPixelAccumulation)
|
| {
|
| PaintLayerFragment fragment;
|
| - ClipRectsContext clipRectsContext(rootLayer, clipRectsCacheSlot, inOverlayScrollbarSizeRelevancy, subPixelAccumulation);
|
| + ClipRectsContext clipRectsContext(rootLayer, clipRectsCacheSlot, overlayScrollbarClipBehavior, subPixelAccumulation);
|
| if (respectOverflowClip == IgnoreOverflowClip)
|
| clipRectsContext.setIgnoreOverflowClip();
|
| clipper().calculateRects(clipRectsContext, dirtyRect, fragment.layerBounds, fragment.backgroundRect, fragment.foregroundRect, offsetFromRoot);
|
| @@ -1497,12 +1497,12 @@ void PaintLayer::appendSingleFragmentIgnoringPagination(PaintLayerFragments& fra
|
| }
|
|
|
| void PaintLayer::collectFragments(PaintLayerFragments& fragments, const PaintLayer* rootLayer, const LayoutRect& dirtyRect,
|
| - ClipRectsCacheSlot clipRectsCacheSlot, OverlayScrollbarSizeRelevancy inOverlayScrollbarSizeRelevancy, ShouldRespectOverflowClipType respectOverflowClip, const LayoutPoint* offsetFromRoot,
|
| + ClipRectsCacheSlot clipRectsCacheSlot, OverlayScrollbarClipBehavior overlayScrollbarClipBehavior, ShouldRespectOverflowClipType respectOverflowClip, const LayoutPoint* offsetFromRoot,
|
| const LayoutSize& subPixelAccumulation, const LayoutRect* layerBoundingBox)
|
| {
|
| if (!enclosingPaginationLayer()) {
|
| // For unpaginated layers, there is only one fragment.
|
| - appendSingleFragmentIgnoringPagination(fragments, rootLayer, dirtyRect, clipRectsCacheSlot, inOverlayScrollbarSizeRelevancy, respectOverflowClip, offsetFromRoot, subPixelAccumulation);
|
| + appendSingleFragmentIgnoringPagination(fragments, rootLayer, dirtyRect, clipRectsCacheSlot, overlayScrollbarClipBehavior, respectOverflowClip, offsetFromRoot, subPixelAccumulation);
|
| return;
|
| }
|
|
|
| @@ -1512,7 +1512,7 @@ void PaintLayer::collectFragments(PaintLayerFragments& fragments, const PaintLay
|
|
|
| // Calculate clip rects relative to the enclosingPaginationLayer. The purpose of this call is to determine our bounds clipped to intermediate
|
| // layers between us and the pagination context. It's important to minimize the number of fragments we need to create and this helps with that.
|
| - ClipRectsContext paginationClipRectsContext(enclosingPaginationLayer(), clipRectsCacheSlot, inOverlayScrollbarSizeRelevancy);
|
| + ClipRectsContext paginationClipRectsContext(enclosingPaginationLayer(), clipRectsCacheSlot, overlayScrollbarClipBehavior);
|
| if (respectOverflowClip == IgnoreOverflowClip)
|
| paginationClipRectsContext.setIgnoreOverflowClip();
|
| LayoutRect layerBoundsInFlowThread;
|
| @@ -1550,7 +1550,7 @@ void PaintLayer::collectFragments(PaintLayerFragments& fragments, const PaintLay
|
| ClipRect ancestorClipRect = dirtyRect;
|
| if (const PaintLayer* paginationParentLayer = enclosingPaginationLayer()->parent()) {
|
| const PaintLayer* ancestorLayer = rootLayerIsInsidePaginationLayer ? paginationParentLayer : rootLayer;
|
| - ClipRectsContext clipRectsContext(ancestorLayer, clipRectsCacheSlot, inOverlayScrollbarSizeRelevancy);
|
| + ClipRectsContext clipRectsContext(ancestorLayer, clipRectsCacheSlot, overlayScrollbarClipBehavior);
|
| if (respectOverflowClip == IgnoreOverflowClip)
|
| clipRectsContext.setIgnoreOverflowClip();
|
| ancestorClipRect = enclosingPaginationLayer()->clipper().backgroundClipRect(clipRectsContext);
|
| @@ -1759,7 +1759,7 @@ PaintLayer* PaintLayer::hitTestLayer(PaintLayer* rootLayer, PaintLayer* containe
|
|
|
| // Make sure the parent's clip rects have been calculated.
|
| if (parent()) {
|
| - ClipRect clipRect = clipper().backgroundClipRect(ClipRectsContext(rootLayer, clipRectsCacheSlot, IncludeOverlayScrollbarSize));
|
| + ClipRect clipRect = clipper().backgroundClipRect(ClipRectsContext(rootLayer, clipRectsCacheSlot, ExcludeOverlayScrollbarSizeForHitTesting));
|
| // Go ahead and test the enclosing clip now.
|
| if (!clipRect.intersects(hitTestLocation))
|
| return nullptr;
|
| @@ -1844,9 +1844,9 @@ PaintLayer* PaintLayer::hitTestLayer(PaintLayer* rootLayer, PaintLayer* containe
|
| // Collect the fragments. This will compute the clip rectangles for each layer fragment.
|
| PaintLayerFragments layerFragments;
|
| if (appliedTransform)
|
| - appendSingleFragmentIgnoringPagination(layerFragments, rootLayer, hitTestRect, clipRectsCacheSlot, IncludeOverlayScrollbarSize);
|
| + appendSingleFragmentIgnoringPagination(layerFragments, rootLayer, hitTestRect, clipRectsCacheSlot, ExcludeOverlayScrollbarSizeForHitTesting);
|
| else
|
| - collectFragments(layerFragments, rootLayer, hitTestRect, clipRectsCacheSlot, IncludeOverlayScrollbarSize);
|
| + collectFragments(layerFragments, rootLayer, hitTestRect, clipRectsCacheSlot, ExcludeOverlayScrollbarSizeForHitTesting);
|
|
|
| if (m_scrollableArea && m_scrollableArea->hitTestResizerInFragments(layerFragments, hitTestLocation)) {
|
| layoutObject()->updateHitTestResult(result, hitTestLocation.point());
|
| @@ -1932,7 +1932,7 @@ PaintLayer* PaintLayer::hitTestTransformedLayerInFragments(PaintLayer* rootLayer
|
| // FIXME: We're missing a sub-pixel offset here crbug.com/348728
|
| LayoutRect transformedExtent = transparencyClipBox(this, enclosingPaginationLayer(), HitTestingTransparencyClipBox, PaintLayer::RootOfTransparencyClipBox, LayoutSize());
|
| enclosingPaginationLayer()->collectFragments(enclosingPaginationFragments, rootLayer, hitTestRect,
|
| - clipRectsCacheSlot, IncludeOverlayScrollbarSize, RespectOverflowClip, &offsetOfPaginationLayerFromRoot, LayoutSize(), &transformedExtent);
|
| + clipRectsCacheSlot, ExcludeOverlayScrollbarSizeForHitTesting, RespectOverflowClip, &offsetOfPaginationLayerFromRoot, LayoutSize(), &transformedExtent);
|
|
|
| for (int i = enclosingPaginationFragments.size() - 1; i >= 0; --i) {
|
| const PaintLayerFragment& fragment = enclosingPaginationFragments.at(i);
|
| @@ -1944,7 +1944,7 @@ PaintLayer* PaintLayer::hitTestTransformedLayerInFragments(PaintLayer* rootLayer
|
| // Now compute the clips within a given fragment
|
| if (parent() != enclosingPaginationLayer()) {
|
| enclosingPaginationLayer()->convertToLayerCoords(rootLayer, offsetOfPaginationLayerFromRoot);
|
| - LayoutRect parentClipRect = clipper().backgroundClipRect(ClipRectsContext(enclosingPaginationLayer(), clipRectsCacheSlot, IncludeOverlayScrollbarSize)).rect();
|
| + LayoutRect parentClipRect = clipper().backgroundClipRect(ClipRectsContext(enclosingPaginationLayer(), clipRectsCacheSlot, ExcludeOverlayScrollbarSizeForHitTesting)).rect();
|
| parentClipRect.moveBy(fragment.paginationOffset + offsetOfPaginationLayerFromRoot);
|
| clipRect.intersect(parentClipRect);
|
| }
|
|
|