| Index: third_party/WebKit/Source/core/paint/SVGRootPainter.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/SVGRootPainter.cpp b/third_party/WebKit/Source/core/paint/SVGRootPainter.cpp
|
| index 38ebea3c703a63393ffaf90d58d4be354c0624c4..619179fd1365042b2ee5616e541f46aee705675b 100644
|
| --- a/third_party/WebKit/Source/core/paint/SVGRootPainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/SVGRootPainter.cpp
|
| @@ -49,18 +49,24 @@ void SVGRootPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintO
|
|
|
| PaintInfo paintInfoBeforeFiltering(paintInfo);
|
|
|
| - // At the HTML->SVG boundary, SVGRoot will have a paint offset transform
|
| - // paint property but may not have a PaintLayer, so we need to update the
|
| - // paint properties here since they will not be updated by PaintLayer
|
| - // (See: PaintPropertyTreeBuilder::createPaintOffsetTranslationIfNeeded).
|
| - Optional<ScopedPaintChunkProperties> paintOffsetTranslationPropertyScope;
|
| - if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && !m_layoutSVGRoot.hasLayer()) {
|
| + Optional<ScopedPaintChunkProperties> transformPropertyScope;
|
| + if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
|
| const auto* objectProperties = m_layoutSVGRoot.objectPaintProperties();
|
| - if (objectProperties && objectProperties->paintOffsetTranslation()) {
|
| + if (objectProperties && objectProperties->svgLocalTransform()) {
|
| + auto& paintController = paintInfoBeforeFiltering.context.getPaintController();
|
| + PaintChunkProperties properties(paintController.currentPaintChunkProperties());
|
| + properties.transform = objectProperties->svgLocalTransform();
|
| + transformPropertyScope.emplace(paintController, properties);
|
| + } else if (objectProperties && objectProperties->paintOffsetTranslation() && !m_layoutSVGRoot.hasLayer()) {
|
| + // TODO(pdr): Always create an svgLocalTransform and remove this paint offset quirk.
|
| + // At the HTML->SVG boundary, SVGRoot will have a paint offset transform
|
| + // paint property but may not have a PaintLayer, so we need to update the
|
| + // paint properties here since they will not be updated by PaintLayer
|
| + // (See: PaintPropertyTreeBuilder::createPaintOffsetTranslationIfNeeded).
|
| auto& paintController = paintInfoBeforeFiltering.context.getPaintController();
|
| PaintChunkProperties properties(paintController.currentPaintChunkProperties());
|
| properties.transform = objectProperties->paintOffsetTranslation();
|
| - paintOffsetTranslationPropertyScope.emplace(paintController, properties);
|
| + transformPropertyScope.emplace(paintController, properties);
|
| }
|
| }
|
|
|
|
|