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

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

Issue 926193003: Move rendering/RenderBox to layout/LayoutBox. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | « Source/core/paint/BlockFlowPainter.cpp ('k') | 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 RenderFlexibleBox;
15 class RenderBlock; 15 class RenderBlock;
16 class RenderBox; 16 class LayoutBox;
17 class LayoutObject; 17 class LayoutObject;
18 18
19 class BlockPainter { 19 class BlockPainter {
20 public: 20 public:
21 BlockPainter(RenderBlock& block) : m_renderBlock(block) { } 21 BlockPainter(RenderBlock& block) : m_renderBlock(block) { }
22 22
23 void paint(const PaintInfo&, const LayoutPoint& paintOffset); 23 void paint(const PaintInfo&, const LayoutPoint& paintOffset);
24 void paintObject(const PaintInfo&, const LayoutPoint&); 24 void paintObject(const PaintInfo&, const LayoutPoint&);
25 void paintChildren(const PaintInfo&, const LayoutPoint&); 25 void paintChildren(const PaintInfo&, const LayoutPoint&);
26 void paintChild(RenderBox&, const PaintInfo&, const LayoutPoint&); 26 void paintChild(LayoutBox&, const PaintInfo&, const LayoutPoint&);
27 void paintChildAsInlineBlock(RenderBox&, const PaintInfo&, const LayoutPoint &); 27 void paintChildAsInlineBlock(LayoutBox&, const PaintInfo&, const LayoutPoint &);
28 void paintOverflowControlsIfNeeded(const PaintInfo&, const LayoutPoint&); 28 void paintOverflowControlsIfNeeded(const PaintInfo&, const LayoutPoint&);
29 29
30 // inline-block elements paint all phases atomically. This function ensures that. Certain other elements 30 // inline-block elements paint all phases atomically. This function ensures that. Certain other elements
31 // (grid items, flex items) require this behavior as well, and this function exists as a helper for them. 31 // (grid items, flex items) require this behavior as well, and this function exists as a helper for them.
32 // It is expected that the caller will call this function independent of the value of paintInfo.phase. 32 // It is expected that the caller will call this function independent of the value of paintInfo.phase.
33 static void paintAsInlineBlock(LayoutObject&, const PaintInfo&, const Layout Point&); 33 static void paintAsInlineBlock(LayoutObject&, const PaintInfo&, const Layout Point&);
34 static void paintChildrenOfFlexibleBox(RenderFlexibleBox&, const PaintInfo&, const LayoutPoint& paintOffset); 34 static void paintChildrenOfFlexibleBox(RenderFlexibleBox&, const PaintInfo&, const LayoutPoint& paintOffset);
35 static void paintInlineBox(InlineBox&, const PaintInfo&, const LayoutPoint& paintOffset); 35 static void paintInlineBox(InlineBox&, const PaintInfo&, const LayoutPoint& paintOffset);
36 36
37 private: 37 private:
38 LayoutRect overflowRectForPaintRejection() const; 38 LayoutRect overflowRectForPaintRejection() const;
39 bool hasCaret() const; 39 bool hasCaret() const;
40 void paintCarets(const PaintInfo&, const LayoutPoint&); 40 void paintCarets(const PaintInfo&, const LayoutPoint&);
41 void paintContents(const PaintInfo&, const LayoutPoint&); 41 void paintContents(const PaintInfo&, const LayoutPoint&);
42 void paintColumnContents(const PaintInfo&, const LayoutPoint&, bool paintFlo ats = false); 42 void paintColumnContents(const PaintInfo&, const LayoutPoint&, bool paintFlo ats = false);
43 void paintColumnRules(const PaintInfo&, const LayoutPoint&); 43 void paintColumnRules(const PaintInfo&, const LayoutPoint&);
44 void paintSelection(const PaintInfo&, const LayoutPoint&); 44 void paintSelection(const PaintInfo&, const LayoutPoint&);
45 void paintContinuationOutlines(const PaintInfo&, const LayoutPoint&); 45 void paintContinuationOutlines(const PaintInfo&, const LayoutPoint&);
46 46
47 RenderBlock& m_renderBlock; 47 RenderBlock& m_renderBlock;
48 }; 48 };
49 49
50 } // namespace blink 50 } // namespace blink
51 51
52 #endif // BlockPainter_h 52 #endif // BlockPainter_h
OLDNEW
« no previous file with comments | « Source/core/paint/BlockFlowPainter.cpp ('k') | Source/core/paint/BlockPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698