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

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: Fixed 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
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/paint/BlockPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0364e7250e70013fc79280f04f9fef70d855615b
--- /dev/null
+++ b/Source/core/paint/BlockPainter.h
@@ -0,0 +1,45 @@
+// 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) { }
+
+ void paint(PaintInfo&, const LayoutPoint& paintOffset);
+ void paintObject(PaintInfo&, const LayoutPoint&);
+ void paintChildren(PaintInfo&, const LayoutPoint&);
+ void paintChildAsInlineBlock(RenderBox*, PaintInfo&, const LayoutPoint&);
+
+ // inline-block elements paint all phases atomically. This function ensures that. Certain other elements
+ // (grid items, flex items) require this behavior as well, and this function exists as a helper for them.
+ // It is expected that the caller will call this function independent of the value of paintInfo.phase.
+ static void paintAsInlineBlock(RenderObject*, 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&);
+ void paintChild(RenderBox*, PaintInfo&, const LayoutPoint&);
+ void paintSelection(PaintInfo&, const LayoutPoint&);
+ void paintContinuationOutlines(PaintInfo&, const LayoutPoint&);
+
+ RenderBlock& m_renderBlock;
+};
+
+} // namespace blink
+
+#endif // BlockPainter_h
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/paint/BlockPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698