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

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

Issue 1562183002: ObjectPainter::paintAsStackingContext() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
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 "wtf/Allocator.h" 8 #include "wtf/Allocator.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 struct PaintInfo; 12 struct PaintInfo;
13 class InlineBox; 13 class InlineBox;
14 class LayoutBlock; 14 class LayoutBlock;
15 class LayoutBox; 15 class LayoutBox;
16 class LayoutFlexibleBox; 16 class LayoutFlexibleBox;
17 class LayoutObject; 17 class LayoutObject;
18 class LayoutPoint; 18 class LayoutPoint;
19 class LayoutRect; 19 class LayoutRect;
20 20
21 class BlockPainter { 21 class BlockPainter {
22 STACK_ALLOCATED(); 22 STACK_ALLOCATED();
23 public: 23 public:
24 BlockPainter(const LayoutBlock& block) : m_layoutBlock(block) { } 24 BlockPainter(const LayoutBlock& block) : m_layoutBlock(block) { }
25 25
26 void paint(const PaintInfo&, const LayoutPoint& paintOffset); 26 void paint(const PaintInfo&, const LayoutPoint& paintOffset);
27 void paintObject(const PaintInfo&, const LayoutPoint&); 27 void paintObject(const PaintInfo&, const LayoutPoint&);
28 void paintChildren(const PaintInfo&, const LayoutPoint&); 28 void paintChildren(const PaintInfo&, const LayoutPoint&);
29 void paintChild(const LayoutBox&, const PaintInfo&, const LayoutPoint&); 29 void paintChild(const LayoutBox&, const PaintInfo&, const LayoutPoint&);
30 void paintChildAsInlineBlock(const LayoutBox&, const PaintInfo&, const Layou tPoint&);
31 void paintOverflowControlsIfNeeded(const PaintInfo&, const LayoutPoint&); 30 void paintOverflowControlsIfNeeded(const PaintInfo&, const LayoutPoint&);
32 31
33 // inline-block elements paint all phases atomically. This function ensures that. Certain other elements 32 // See ObjectPainter::paintAsPseudoStackingContext for explanation of "pseud o stacking context".
34 // (grid items, flex items) require this behavior as well, and this function exists as a helper for them. 33 void paintChildAsPseudoStackingContext(const LayoutBox&, const PaintInfo&, c onst LayoutPoint&);
35 // It is expected that the caller will call this function independent of the value of paintInfo.phase.
36 static void paintAsInlineBlock(const LayoutObject&, const PaintInfo&, const LayoutPoint&);
37 static void paintChildrenOfFlexibleBox(const LayoutFlexibleBox&, const Paint Info&, const LayoutPoint& paintOffset); 34 static void paintChildrenOfFlexibleBox(const LayoutFlexibleBox&, const Paint Info&, const LayoutPoint& paintOffset);
38 static void paintInlineBox(const InlineBox&, const PaintInfo&, const LayoutP oint& paintOffset); 35 static void paintInlineBox(const InlineBox&, const PaintInfo&, const LayoutP oint& paintOffset);
39 36
40 bool intersectsPaintRect(const PaintInfo&, const LayoutPoint& paintOffset) c onst; 37 bool intersectsPaintRect(const PaintInfo&, const LayoutPoint& paintOffset) c onst;
41 38
42 private: 39 private:
43 void paintCarets(const PaintInfo&, const LayoutPoint&); 40 void paintCarets(const PaintInfo&, const LayoutPoint&);
44 void paintContents(const PaintInfo&, const LayoutPoint&); 41 void paintContents(const PaintInfo&, const LayoutPoint&);
45 42
46 const LayoutBlock& m_layoutBlock; 43 const LayoutBlock& m_layoutBlock;
47 }; 44 };
48 45
49 } // namespace blink 46 } // namespace blink
50 47
51 #endif // BlockPainter_h 48 #endif // BlockPainter_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/BlockFlowPainter.cpp ('k') | third_party/WebKit/Source/core/paint/BlockPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698