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

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: Merged. 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
« no previous file with comments | « no previous file | Source/core/paint/BlockPainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 namespace blink { 8 namespace blink {
9 9
10 struct PaintInfo; 10 struct PaintInfo;
11 class InlineBox; 11 class InlineBox;
12 class LayoutPoint; 12 class LayoutPoint;
13 class LayoutRect; 13 class LayoutRect;
14 class RenderFlexibleBox;
14 class RenderBlock; 15 class RenderBlock;
15 class RenderBox; 16 class RenderBox;
16 class RenderObject; 17 class RenderObject;
17 18
18 class BlockPainter { 19 class BlockPainter {
19 public: 20 public:
20 BlockPainter(RenderBlock& block) : m_renderBlock(block) { } 21 BlockPainter(RenderBlock& block) : m_renderBlock(block) { }
21 22
22 void paint(PaintInfo&, const LayoutPoint& paintOffset); 23 void paint(PaintInfo&, const LayoutPoint& paintOffset);
23 void paintObject(PaintInfo&, const LayoutPoint&); 24 void paintObject(PaintInfo&, const LayoutPoint&);
24 void paintChildren(PaintInfo&, const LayoutPoint&); 25 void paintChildren(PaintInfo&, const LayoutPoint&);
25 void paintChildAsInlineBlock(RenderBox*, PaintInfo&, const LayoutPoint&); 26 void paintChildAsInlineBlock(RenderBox*, PaintInfo&, const LayoutPoint&);
26 27
27 // inline-block elements paint all phases atomically. This function ensures that. Certain other elements 28 // inline-block elements paint all phases atomically. This function ensures that. Certain other elements
28 // (grid items, flex items) require this behavior as well, and this function exists as a helper for them. 29 // (grid items, flex items) require this behavior as well, and this function exists as a helper for them.
29 // It is expected that the caller will call this function independent of the value of paintInfo.phase. 30 // It is expected that the caller will call this function independent of the value of paintInfo.phase.
30 static void paintAsInlineBlock(RenderObject*, PaintInfo&, const LayoutPoint& ); 31 static void paintAsInlineBlock(RenderObject*, PaintInfo&, const LayoutPoint& );
32 static void paintChildrenOfFlexibleBox(RenderFlexibleBox&, PaintInfo&, const LayoutPoint& paintOffset);
31 static void paintInlineBox(InlineBox&, PaintInfo&, const LayoutPoint& paintO ffset); 33 static void paintInlineBox(InlineBox&, PaintInfo&, const LayoutPoint& paintO ffset);
32 34
33 private: 35 private:
34 LayoutRect overflowRectForPaintRejection() const; 36 LayoutRect overflowRectForPaintRejection() const;
35 bool hasCaret() const; 37 bool hasCaret() const;
36 void paintCarets(PaintInfo&, const LayoutPoint&); 38 void paintCarets(PaintInfo&, const LayoutPoint&);
37 void paintContents(PaintInfo&, const LayoutPoint&); 39 void paintContents(PaintInfo&, const LayoutPoint&);
38 void paintColumnContents(PaintInfo&, const LayoutPoint&, bool paintFloats = false); 40 void paintColumnContents(PaintInfo&, const LayoutPoint&, bool paintFloats = false);
39 void paintColumnRules(PaintInfo&, const LayoutPoint&); 41 void paintColumnRules(PaintInfo&, const LayoutPoint&);
40 void paintChild(RenderBox*, PaintInfo&, const LayoutPoint&); 42 void paintChild(RenderBox*, PaintInfo&, const LayoutPoint&);
41 void paintSelection(PaintInfo&, const LayoutPoint&); 43 void paintSelection(PaintInfo&, const LayoutPoint&);
42 void paintContinuationOutlines(PaintInfo&, const LayoutPoint&); 44 void paintContinuationOutlines(PaintInfo&, const LayoutPoint&);
43 45
44 RenderBlock& m_renderBlock; 46 RenderBlock& m_renderBlock;
45 }; 47 };
46 48
47 } // namespace blink 49 } // namespace blink
48 50
49 #endif // BlockPainter_h 51 #endif // BlockPainter_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/paint/BlockPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698