Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Unified Diff: third_party/WebKit/Source/core/paint/BoxReflectionUtils.cpp

Issue 2942123002: Break LayoutObject dependency for NinePieceImagePainter (Closed)
Patch Set: Pass document explicitly Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
« no previous file with comments | « third_party/WebKit/Source/core/paint/BoxPainterBase.cpp ('k') | third_party/WebKit/Source/core/paint/FieldsetPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698