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

Unified Diff: Source/core/paint/BlockPainter.h

Issue 569683004: Factor painting code from RenderBlock into BlockPainter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Finish. Created 6 years, 3 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: Source/core/paint/BlockPainter.h
diff --git a/Source/core/paint/BlockPainter.h b/Source/core/paint/BlockPainter.h
new file mode 100644
index 0000000000000000000000000000000000000000..e818dde6556b2aa4d70b35bb16b2e62696fcb81c
--- /dev/null
+++ b/Source/core/paint/BlockPainter.h
@@ -0,0 +1,34 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BlockPainter_h
+#define BlockPainter_h
+
+#include "core/rendering/RenderBlock.h"
+
+namespace blink {
+
+struct PaintInfo;
+class LayoutPoint;
+
+class BlockPainter {
+public:
+ BlockPainter(RenderBlock& block) : m_renderBlock(block) { }
Stephen Chennney 2014/09/15 20:18:05 Nit: New line after constructor?
chrishtr 2014/09/15 20:52:08 Done.
+ void paint(PaintInfo&, const LayoutPoint& paintOffset);
+ void paintObject(PaintInfo&, const LayoutPoint&);
+
+private:
+ LayoutRect overflowRectForPaintRejection() const;
+ bool hasCaret() const;
+ void paintCarets(PaintInfo&, const LayoutPoint&);
+ void paintContents(PaintInfo&, const LayoutPoint&);
+ void paintColumnContents(PaintInfo&, const LayoutPoint&, bool paintFloats = false);
+ void paintColumnRules(PaintInfo&, const LayoutPoint&);
+
+ RenderBlock& m_renderBlock;
+};
+
+} // namespace blink
+
+#endif // BlockPainter_h

Powered by Google App Engine
This is Rietveld 408576698