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

Unified Diff: third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc

Issue 2842983002: [LayoutNG] Paint inlines from the fragment tree
Patch Set: Basic box painting support Created 3 years, 7 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/layout/ng/layout_ng_block_flow.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc b/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
index b6650d654474992cf7d2ff57303466420a28d005..00eedb32c7effa7c6c532970721bc6426267cc3b 100644
--- a/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
+++ b/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
@@ -7,6 +7,7 @@
#include "core/layout/LayoutAnalyzer.h"
#include "core/layout/ng/ng_constraint_space.h"
#include "core/layout/ng/ng_fragment.h"
+#include "core/paint/NGBlockFlowPainter.h"
namespace blink {
@@ -61,4 +62,14 @@ void LayoutNGBlockFlow::ResetNGInlineNodeData() {
ng_inline_node_data_ = WTF::MakeUnique<NGInlineNodeData>();
}
+void LayoutNGBlockFlow::PaintObject(const PaintInfo& paint_info,
+ const LayoutPoint& paint_offset) const {
+ // TODO(eae): This is incorrect but it'll do for now.
+ if (root_fragment_) {
+ NGBlockFlowPainter(*this).PaintContents(paint_info, paint_offset);
+ } else {
+ LayoutBlockFlow::PaintObject(paint_info, paint_offset);
+ }
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698