[Blink] Fix oversized foreground layer when a child containment layer exists
Previously we create a child containment layer sized by LayoutRect::InfiniteIntRect() when a layer has CSS clip-path. This is because we used object.HasClipRelatedProperty() as the criteria, but the layer only applies CSS clip and overflow clip. This confuses foreground layer geometry computation, and resulted in an oversized foreground layer. This CL does the following things: 1. Change the criteria so that child containment layer is only created when either CSS clip or overflow clip is present. 2. Simplify foreground layer and child containment layer geometry computation, so that subpixel accumulation handling is more correct, and also infer parameters from the parent graphics layer so the formula is consistent for different layer hierarchy configuration. BUG=773536 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: Ic8074ef54270cdd2f628bc73f3bcb6fa929d8881 Reviewed-on: https://chromium-review.googlesource.com/722259 Commit-Queue: Tien-Ren Chen <trchen@chromium.org> Reviewed-by:Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/master@{#510003}
Showing
This diff is collapsed.
Please register or sign in to comment