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

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

Issue 209443007: Remove shape-inside support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix Zoltan's comments Created 6 years, 9 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) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 19 matching lines...) Expand all
30 #include "platform/geometry/LayoutRect.h" 30 #include "platform/geometry/LayoutRect.h"
31 #include "wtf/HashMap.h" 31 #include "wtf/HashMap.h"
32 #include "wtf/Noncopyable.h" 32 #include "wtf/Noncopyable.h"
33 33
34 namespace WebCore { 34 namespace WebCore {
35 35
36 class RenderBlockFlow; 36 class RenderBlockFlow;
37 class RenderBox; 37 class RenderBox;
38 class RenderObject; 38 class RenderObject;
39 class RenderFlowThread; 39 class RenderFlowThread;
40 class ShapeInsideInfo;
41 40
42 class LayoutState { 41 class LayoutState {
43 WTF_MAKE_NONCOPYABLE(LayoutState); 42 WTF_MAKE_NONCOPYABLE(LayoutState);
44 public: 43 public:
45 // Constructor for root LayoutState created by RenderView 44 // Constructor for root LayoutState created by RenderView
46 LayoutState(LayoutUnit pageLogicalHeight, bool pageLogicalHeightChanged) 45 LayoutState(LayoutUnit pageLogicalHeight, bool pageLogicalHeightChanged)
47 : m_clipped(false) 46 : m_clipped(false)
48 , m_isPaginated(pageLogicalHeight) 47 , m_isPaginated(pageLogicalHeight)
49 , m_pageLogicalHeightChanged(pageLogicalHeightChanged) 48 , m_pageLogicalHeightChanged(pageLogicalHeightChanged)
50 #if !ASSERT_DISABLED 49 #if !ASSERT_DISABLED
51 , m_layoutDeltaXSaturated(false) 50 , m_layoutDeltaXSaturated(false)
52 , m_layoutDeltaYSaturated(false) 51 , m_layoutDeltaYSaturated(false)
53 #endif 52 #endif
54 , m_columnInfo(0) 53 , m_columnInfo(0)
55 , m_next(0) 54 , m_next(0)
56 , m_shapeInsideInfo(0)
57 , m_pageLogicalHeight(pageLogicalHeight) 55 , m_pageLogicalHeight(pageLogicalHeight)
58 #ifndef NDEBUG 56 #ifndef NDEBUG
59 , m_renderer(0) 57 , m_renderer(0)
60 #endif 58 #endif
61 { 59 {
62 } 60 }
63 61
64 LayoutState(LayoutState*, RenderBox&, const LayoutSize& offset, LayoutUnit p ageLogicalHeight, bool pageHeightLogicalChanged, ColumnInfo*); 62 LayoutState(LayoutState*, RenderBox&, const LayoutSize& offset, LayoutUnit p ageLogicalHeight, bool pageHeightLogicalChanged, ColumnInfo*);
65 explicit LayoutState(RenderObject&); 63 explicit LayoutState(RenderObject&);
66 64
(...skipping 26 matching lines...) Expand all
93 const LayoutSize& layoutOffset() const { return m_layoutOffset; } 91 const LayoutSize& layoutOffset() const { return m_layoutOffset; }
94 const LayoutSize& layoutDelta() const { return m_layoutDelta; } 92 const LayoutSize& layoutDelta() const { return m_layoutDelta; }
95 const LayoutSize& pageOffset() const { return m_pageOffset; } 93 const LayoutSize& pageOffset() const { return m_pageOffset; }
96 LayoutUnit pageLogicalHeight() const { return m_pageLogicalHeight; } 94 LayoutUnit pageLogicalHeight() const { return m_pageLogicalHeight; }
97 bool pageLogicalHeightChanged() const { return m_pageLogicalHeightChanged; } 95 bool pageLogicalHeightChanged() const { return m_pageLogicalHeightChanged; }
98 96
99 LayoutState* next() const { return m_next; } 97 LayoutState* next() const { return m_next; }
100 98
101 bool needsBlockDirectionLocationSetBeforeLayout() const { return m_isPaginat ed && m_pageLogicalHeight; } 99 bool needsBlockDirectionLocationSetBeforeLayout() const { return m_isPaginat ed && m_pageLogicalHeight; }
102 100
103 ShapeInsideInfo* shapeInsideInfo() const { return m_shapeInsideInfo; }
104 ColumnInfo* columnInfo() const { return m_columnInfo; } 101 ColumnInfo* columnInfo() const { return m_columnInfo; }
105 102
106 const LayoutRect& clipRect() const { return m_clipRect; } 103 const LayoutRect& clipRect() const { return m_clipRect; }
107 const LayoutSize& paintOffset() const { return m_paintOffset; } 104 const LayoutSize& paintOffset() const { return m_paintOffset; }
108 105
109 #ifndef NDEBUG 106 #ifndef NDEBUG
110 RenderObject* renderer() const { return m_renderer; } 107 RenderObject* renderer() const { return m_renderer; }
111 #endif 108 #endif
112 #if !ASSERT_DISABLED 109 #if !ASSERT_DISABLED
113 bool layoutDeltaXSaturated() const { return m_layoutDeltaXSaturated; } 110 bool layoutDeltaXSaturated() const { return m_layoutDeltaXSaturated; }
114 bool layoutDeltaYSaturated() const { return m_layoutDeltaYSaturated; } 111 bool layoutDeltaYSaturated() const { return m_layoutDeltaYSaturated; }
115 #endif 112 #endif
116 113
117 private: 114 private:
118 // Do not add anything apart from bitfields until after m_columnInfo. See ht tps://bugs.webkit.org/show_bug.cgi?id=100173 115 // Do not add anything apart from bitfields until after m_columnInfo. See ht tps://bugs.webkit.org/show_bug.cgi?id=100173
119 bool m_clipped:1; 116 bool m_clipped:1;
120 bool m_isPaginated:1; 117 bool m_isPaginated:1;
121 // If our page height has changed, this will force all blocks to relayout. 118 // If our page height has changed, this will force all blocks to relayout.
122 bool m_pageLogicalHeightChanged:1; 119 bool m_pageLogicalHeightChanged:1;
123 #if !ASSERT_DISABLED 120 #if !ASSERT_DISABLED
124 bool m_layoutDeltaXSaturated:1; 121 bool m_layoutDeltaXSaturated:1;
125 bool m_layoutDeltaYSaturated:1; 122 bool m_layoutDeltaYSaturated:1;
126 #endif 123 #endif
127 // If the enclosing pagination model is a column model, then this will store column information for easy retrieval/manipulation. 124 // If the enclosing pagination model is a column model, then this will store column information for easy retrieval/manipulation.
128 ColumnInfo* m_columnInfo; 125 ColumnInfo* m_columnInfo;
129 LayoutState* m_next; 126 LayoutState* m_next;
130 ShapeInsideInfo* m_shapeInsideInfo;
131 127
132 // FIXME: Distinguish between the layout clip rect and the paint clip rect w hich may be larger, 128 // FIXME: Distinguish between the layout clip rect and the paint clip rect w hich may be larger,
133 // e.g., because of composited scrolling. 129 // e.g., because of composited scrolling.
134 LayoutRect m_clipRect; 130 LayoutRect m_clipRect;
135 131
136 // x/y offset from container. Includes relative positioning and scroll offse ts. 132 // x/y offset from container. Includes relative positioning and scroll offse ts.
137 LayoutSize m_paintOffset; 133 LayoutSize m_paintOffset;
138 // x/y offset from container. Does not include relative positioning or scrol l offsets. 134 // x/y offset from container. Does not include relative positioning or scrol l offsets.
139 LayoutSize m_layoutOffset; 135 LayoutSize m_layoutOffset;
140 // Transient offset from the final position of the object 136 // Transient offset from the final position of the object
141 // used to ensure that repaints happen in the correct place. 137 // used to ensure that repaints happen in the correct place.
142 // This is a total delta accumulated from the root. 138 // This is a total delta accumulated from the root.
143 LayoutSize m_layoutDelta; 139 LayoutSize m_layoutDelta;
144 140
145 // The current page height for the pagination model that encloses us. 141 // The current page height for the pagination model that encloses us.
146 LayoutUnit m_pageLogicalHeight; 142 LayoutUnit m_pageLogicalHeight;
147 // The offset of the start of the first page in the nearest enclosing pagina tion model. 143 // The offset of the start of the first page in the nearest enclosing pagina tion model.
148 LayoutSize m_pageOffset; 144 LayoutSize m_pageOffset;
149 145
150 #ifndef NDEBUG 146 #ifndef NDEBUG
151 RenderObject* m_renderer; 147 RenderObject* m_renderer;
152 #endif 148 #endif
153 }; 149 };
154 150
155 } // namespace WebCore 151 } // namespace WebCore
156 152
157 #endif // LayoutState_h 153 #endif // LayoutState_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698