| Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| index 2d2167ead07fe3179ddd06a2d1ff2c1169700c52..ca181cfe9f1aa74df2c787577f55ffbc745a4bf0 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| @@ -892,8 +892,14 @@ void CompositedLayerMapping::ComputeBoundsOfOwningLayer(
|
| IntPoint(offset_from_composited_ancestor.X().Round(),
|
| offset_from_composited_ancestor.Y().Round());
|
|
|
| - LayoutSize subpixel_accumulation =
|
| - offset_from_composited_ancestor - snapped_offset_from_composited_ancestor;
|
| + LayoutSize subpixel_accumulation;
|
| + if (!owning_layer_.Transform() ||
|
| + owning_layer_.Transform()->IsIdentityOrTranslation()) {
|
| + subpixel_accumulation = offset_from_composited_ancestor -
|
| + snapped_offset_from_composited_ancestor;
|
| + }
|
| + // Otherwise discard the sub-pixel remainder because paint offset can't be
|
| + // transformed by a non-translation transform.
|
| owning_layer_.SetSubpixelAccumulation(subpixel_accumulation);
|
|
|
| // Move the bounds by the subpixel accumulation so that it pixel-snaps
|
|
|