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

Side by Side Diff: Source/core/paint/BlockPainter.h

Issue 596583002: Move paint code from RenderFlexibleBox to BlockPainter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BlockPainter_h 5 #ifndef BlockPainter_h
6 #define BlockPainter_h 6 #define BlockPainter_h
7 7
8 #include "core/rendering/RenderBlock.h" 8 #include "core/rendering/RenderBlock.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 struct PaintInfo; 12 struct PaintInfo;
13 class LayoutPoint; 13 class LayoutPoint;
14 class RenderFlexibleBox;
14 15
15 class BlockPainter { 16 class BlockPainter {
16 public: 17 public:
17 BlockPainter(RenderBlock& block) : m_renderBlock(block) { } 18 BlockPainter(RenderBlock& block) : m_renderBlock(block) { }
18 19
19 void paint(PaintInfo&, const LayoutPoint& paintOffset); 20 void paint(PaintInfo&, const LayoutPoint& paintOffset);
20 void paintObject(PaintInfo&, const LayoutPoint&); 21 void paintObject(PaintInfo&, const LayoutPoint&);
21 void paintChildren(PaintInfo&, const LayoutPoint&); 22 void paintChildren(PaintInfo&, const LayoutPoint&);
22 void paintChildAsInlineBlock(RenderBox*, PaintInfo&, const LayoutPoint&); 23 void paintChildAsInlineBlock(RenderBox*, PaintInfo&, const LayoutPoint&);
23 24
24 // inline-block elements paint all phases atomically. This function ensures that. Certain other elements 25 // inline-block elements paint all phases atomically. This function ensures that. Certain other elements
25 // (grid items, flex items) require this behavior as well, and this function exists as a helper for them. 26 // (grid items, flex items) require this behavior as well, and this function exists as a helper for them.
26 // It is expected that the caller will call this function independent of the value of paintInfo.phase. 27 // It is expected that the caller will call this function independent of the value of paintInfo.phase.
27 static void paintAsInlineBlock(RenderObject*, PaintInfo&, const LayoutPoint& ); 28 static void paintAsInlineBlock(RenderObject*, PaintInfo&, const LayoutPoint& );
29 static void paintChildrenOfFlexibleBox(RenderFlexibleBox&, PaintInfo&, const LayoutPoint& paintOffset);
28 30
29 private: 31 private:
30 LayoutRect overflowRectForPaintRejection() const; 32 LayoutRect overflowRectForPaintRejection() const;
31 bool hasCaret() const; 33 bool hasCaret() const;
32 void paintCarets(PaintInfo&, const LayoutPoint&); 34 void paintCarets(PaintInfo&, const LayoutPoint&);
33 void paintContents(PaintInfo&, const LayoutPoint&); 35 void paintContents(PaintInfo&, const LayoutPoint&);
34 void paintColumnContents(PaintInfo&, const LayoutPoint&, bool paintFloats = false); 36 void paintColumnContents(PaintInfo&, const LayoutPoint&, bool paintFloats = false);
35 void paintColumnRules(PaintInfo&, const LayoutPoint&); 37 void paintColumnRules(PaintInfo&, const LayoutPoint&);
36 void paintChild(RenderBox*, PaintInfo&, const LayoutPoint&); 38 void paintChild(RenderBox*, PaintInfo&, const LayoutPoint&);
37 void paintSelection(PaintInfo&, const LayoutPoint&); 39 void paintSelection(PaintInfo&, const LayoutPoint&);
38 void paintContinuationOutlines(PaintInfo&, const LayoutPoint&); 40 void paintContinuationOutlines(PaintInfo&, const LayoutPoint&);
39 41
40 RenderBlock& m_renderBlock; 42 RenderBlock& m_renderBlock;
41 }; 43 };
42 44
43 } // namespace blink 45 } // namespace blink
44 46
45 #endif // BlockPainter_h 47 #endif // BlockPainter_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/paint/BlockPainter.cpp » ('j') | Source/core/rendering/RenderFlexibleBox.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698