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

Unified Diff: third_party/WebKit/Source/core/paint/FieldsetPainter.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/FieldsetPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/FieldsetPainter.cpp b/third_party/WebKit/Source/core/paint/FieldsetPainter.cpp
index e516a87a5cdcc0ab50cb3daff4e1d4bf7e888b69..35d8a64d2aeab7f9b0db99d622653ff9824b9d94 100644
--- a/third_party/WebKit/Source/core/paint/FieldsetPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/FieldsetPainter.cpp
@@ -87,7 +87,12 @@ void FieldsetPainter::PaintBoxDecorationBackground(
clip_width, legend->Size().Height()));
}
- BoxPainter::PaintBorder(layout_fieldset_, paint_info, paint_rect,
+ Node* node = nullptr;
+ const LayoutObject* layout_object = &layout_fieldset_;
+ for (; layout_object && !node; layout_object = layout_object->Parent())
+ node = layout_object->GeneratingNode();
+ BoxPainter::PaintBorder(layout_fieldset_, layout_fieldset_.GetDocument(),
+ node, paint_info, paint_rect,
layout_fieldset_.StyleRef());
}

Powered by Google App Engine
This is Rietveld 408576698