| Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
|
| index 99a5ed9e309dd1977f3d5371cc93dafcb64fb835..87b137112df04fb252408730f84437af5988a4ae 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
|
| @@ -259,26 +259,40 @@ void PaintPropertyTreeBuilder::UpdatePaintOffsetTranslation(
|
| // called "subpixel accumulation". For more information, see
|
| // PaintLayer::subpixelAccumulation() and
|
| // PaintLayerPainter::paintFragmentByApplyingTransform.
|
| - IntPoint rounded_paint_offset =
|
| - RoundedIntPoint(context.current.paint_offset);
|
| - LayoutPoint fractional_paint_offset =
|
| - LayoutPoint(context.current.paint_offset - rounded_paint_offset);
|
| + LayoutPoint used_paint_offset(context.current.paint_offset.X().Round(),
|
| + context.current.paint_offset.Y().Round());
|
| + LayoutPoint remainder_paint_offset =
|
| + LayoutPoint(context.current.paint_offset - used_paint_offset);
|
| +
|
| + if (remainder_paint_offset != LayoutPoint()) {
|
| + // However, if the object has a non-translation transform, we can't pass
|
| + // subpixel offsets through the transform to descendants.
|
| + TransformationMatrix matrix;
|
| + object.StyleRef().ApplyTransform(
|
| + matrix, LayoutSize(), ComputedStyle::kExcludeTransformOrigin,
|
| + ComputedStyle::kIncludeMotionPath,
|
| + ComputedStyle::kIncludeIndependentTransformProperties);
|
| + if (!matrix.IsIdentityOrTranslation()) {
|
| + remainder_paint_offset = LayoutPoint();
|
| + used_paint_offset = context.current.paint_offset;
|
| + }
|
| + }
|
|
|
| context.force_subtree_update |= properties.UpdatePaintOffsetTranslation(
|
| context.current.transform,
|
| - TransformationMatrix().Translate(rounded_paint_offset.X(),
|
| - rounded_paint_offset.Y()),
|
| + TransformationMatrix().Translate(used_paint_offset.X().ToDouble(),
|
| + used_paint_offset.Y().ToDouble()),
|
| FloatPoint3D(), context.current.should_flatten_inherited_transform,
|
| context.current.rendering_context_id);
|
|
|
| context.current.transform = properties.PaintOffsetTranslation();
|
| - context.current.paint_offset = fractional_paint_offset;
|
| + context.current.paint_offset = remainder_paint_offset;
|
| if (RuntimeEnabledFeatures::rootLayerScrollingEnabled() &&
|
| object.IsLayoutView()) {
|
| context.absolute_position.transform = properties.PaintOffsetTranslation();
|
| context.fixed_position.transform = properties.PaintOffsetTranslation();
|
| - context.absolute_position.paint_offset = LayoutPoint();
|
| - context.fixed_position.paint_offset = LayoutPoint();
|
| + context.absolute_position.paint_offset = remainder_paint_offset;
|
| + context.fixed_position.paint_offset = remainder_paint_offset;
|
| }
|
| } else {
|
| if (auto* properties = object.GetMutableForPainting().PaintProperties())
|
|
|