Index: third_party/WebKit/Source/core/paint/BoxReflectionUtils.cpp |
diff --git a/third_party/WebKit/Source/core/paint/BoxReflectionUtils.cpp b/third_party/WebKit/Source/core/paint/BoxReflectionUtils.cpp |
index 679508e31296dcf766004ad5ecab44537e777f82..f49c4e5a1b048319c181b64ace8031b5ad93ac98 100644 |
--- a/third_party/WebKit/Source/core/paint/BoxReflectionUtils.cpp |
+++ b/third_party/WebKit/Source/core/paint/BoxReflectionUtils.cpp |
@@ -69,9 +69,14 @@ BoxReflection BoxReflectionForPaintLayer(const PaintLayer& layer, |
DrawingRecorder drawing_recorder(context, layer.GetLayoutObject(), |
DisplayItem::kReflectionMask, |
mask_bounding_float_rect); |
- NinePieceImagePainter().Paint(builder.Context(), layer.GetLayoutObject(), |
- mask_rect, style, mask_nine_piece, |
- SkBlendMode::kSrcOver); |
+ Node* node = nullptr; |
+ const LayoutObject* layout_object = &layer.GetLayoutObject(); |
+ for (; layout_object && !node; layout_object = layout_object->Parent()) |
+ node = layout_object->GeneratingNode(); |
+ NinePieceImagePainter::Paint(builder.Context(), layer.GetLayoutObject(), |
+ layer.GetLayoutObject().GetDocument(), node, |
+ mask_rect, style, mask_nine_piece, |
+ SkBlendMode::kSrcOver); |
} |
return BoxReflection(direction, offset, builder.EndRecording(), |
mask_bounding_float_rect); |