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

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

Issue 724483002: Move painting code from RenderTableCell to TableCellPainter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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/TableCellPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/TableCellPainter.h
diff --git a/Source/core/paint/TableCellPainter.h b/Source/core/paint/TableCellPainter.h
new file mode 100644
index 0000000000000000000000000000000000000000..ba860bda8bee9676c1609967dc2dc96237803039
--- /dev/null
+++ b/Source/core/paint/TableCellPainter.h
@@ -0,0 +1,40 @@
+// 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 TableCellPainter_h
+#define TableCellPainter_h
+
+#include "core/rendering/style/CollapsedBorderValue.h"
+
+namespace blink {
+
+struct PaintInfo;
+class LayoutPoint;
+class RenderObject;
+class RenderStyle;
+class RenderTableCell;
+
+class TableCellPainter {
+public:
+ TableCellPainter(RenderTableCell& renderTableCell) : m_renderTableCell(renderTableCell) { }
+
+ void paint(PaintInfo&, const LayoutPoint&);
+
+ void paintCollapsedBorders(PaintInfo&, const LayoutPoint&);
+ void paintBackgroundsBehindCell(PaintInfo&, const LayoutPoint&, RenderObject* backgroundObject);
+ void paintBoxDecorationBackground(PaintInfo&, const LayoutPoint& paintOffset);
+ void paintMask(PaintInfo&, const LayoutPoint& paintOffset);
+
+private:
+ CollapsedBorderValue cachedCollapsedLeftBorder(const RenderStyle*) const;
+ CollapsedBorderValue cachedCollapsedRightBorder(const RenderStyle*) const;
+ CollapsedBorderValue cachedCollapsedTopBorder(const RenderStyle*) const;
+ CollapsedBorderValue cachedCollapsedBottomBorder(const RenderStyle*) const;
+
+ RenderTableCell& m_renderTableCell;
+};
+
+} // namespace blink
+
+#endif // TableCellPainter_h
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/paint/TableCellPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698