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

Side by Side Diff: Source/core/rendering/RenderRegion.h

Issue 883293004: [New Multicolumn] Preparatory work for nested multicol support. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Place the new files in ../layout/ , since that's where they'll end up soon anyway. 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 24 matching lines...) Expand all
35 namespace blink { 35 namespace blink {
36 36
37 class RenderFlowThread; 37 class RenderFlowThread;
38 38
39 class RenderRegion : public RenderBlockFlow { 39 class RenderRegion : public RenderBlockFlow {
40 public: 40 public:
41 explicit RenderRegion(Element*, RenderFlowThread*); 41 explicit RenderRegion(Element*, RenderFlowThread*);
42 42
43 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectRenderRegion || RenderBlockFlow::isOfType(type); } 43 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectRenderRegion || RenderBlockFlow::isOfType(type); }
44 44
45 void setFlowThreadPortionRect(const LayoutRect& rect) { m_flowThreadPortionR ect = rect; } 45 virtual LayoutRect flowThreadPortionRect() const = 0;
46 LayoutRect flowThreadPortionRect() const { return m_flowThreadPortionRect; }
47 LayoutRect flowThreadPortionOverflowRect() const; 46 LayoutRect flowThreadPortionOverflowRect() const;
47 LayoutRect overflowRectForFlowThreadPortion(const LayoutRect& flowThreadPort ionRect, bool isFirstPortion, bool isLastPortion) const;
48 48
49 RenderFlowThread* flowThread() const { return m_flowThread; } 49 RenderFlowThread* flowThread() const { return m_flowThread; }
50 50
51 // Valid regions do not create circular dependencies with other flows. 51 // Valid regions do not create circular dependencies with other flows.
52 bool isValid() const { return m_isValid; } 52 bool isValid() const { return m_isValid; }
53 void setIsValid(bool valid) { m_isValid = valid; } 53 void setIsValid(bool valid) { m_isValid = valid; }
54 54
55 bool isFirstRegion() const; 55 bool isFirstRegion() const;
56 bool isLastRegion() const; 56 bool isLastRegion() const;
57 57
58 // These methods represent the width and height of a "page" and for a Render Region they are just 58 // These methods represent the width and height of a "page" and for a Render Region they are just
59 // the content width and content height of a region. For RenderMultiColumnSe ts, however, they 59 // the content width and content height of a region. For RenderMultiColumnSe ts, however, they
60 // will be the width and height of a single column or page in the set. 60 // will be the width and height of a single column or page in the set.
61 virtual LayoutUnit pageLogicalWidth() const; 61 virtual LayoutUnit pageLogicalWidth() const;
62 virtual LayoutUnit pageLogicalHeight() const; 62 virtual LayoutUnit pageLogicalHeight() const;
63 63
64 virtual bool canHaveChildren() const override final { return false; } 64 virtual bool canHaveChildren() const override final { return false; }
65 virtual bool canHaveGeneratedChildren() const override final { return true; } 65 virtual bool canHaveGeneratedChildren() const override final { return true; }
66 66
67 virtual const char* renderName() const override { return "RenderRegion"; } 67 virtual const char* renderName() const override { return "RenderRegion"; }
68 68
69 protected: 69 protected:
70 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo utUnit& maxLogicalWidth) const override final; 70 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo utUnit& maxLogicalWidth) const override final;
71 71
72 LayoutRect overflowRectForFlowThreadPortion(const LayoutRect& flowThreadPort ionRect, bool isFirstPortion, bool isLastPortion) const;
73
74 private: 72 private:
75 virtual void layoutBlock(bool relayoutChildren) override final; 73 virtual void layoutBlock(bool relayoutChildren) override final;
76 74
77 protected: 75 protected:
78 RenderFlowThread* m_flowThread; 76 RenderFlowThread* m_flowThread;
79 77
80 private: 78 private:
81 LayoutRect m_flowThreadPortionRect;
82 bool m_isValid : 1; 79 bool m_isValid : 1;
83 }; 80 };
84 81
85 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(RenderRegion, isRenderRegion()); 82 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(RenderRegion, isRenderRegion());
86 83
87 } // namespace blink 84 } // namespace blink
88 85
89 #endif // RenderRegion_h 86 #endif // RenderRegion_h
OLDNEW
« Source/core/rendering/RenderFlowThread.cpp ('K') | « Source/core/rendering/RenderMultiColumnSet.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698