OLD | NEW |
---|---|
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 17 matching lines...) Expand all Loading... | |
28 | 28 |
29 #include "core/rendering/ColumnInfo.h" | 29 #include "core/rendering/ColumnInfo.h" |
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 blink { | 34 namespace blink { |
35 | 35 |
36 class ForceHorriblySlowRectMapping; | 36 class ForceHorriblySlowRectMapping; |
37 class RenderBox; | 37 class RenderBox; |
38 class RenderFlowThread; | |
38 class RenderObject; | 39 class RenderObject; |
39 class RenderView; | 40 class RenderView; |
40 | 41 |
41 class LayoutState { | 42 class LayoutState { |
42 WTF_MAKE_NONCOPYABLE(LayoutState); | 43 WTF_MAKE_NONCOPYABLE(LayoutState); |
43 public: | 44 public: |
44 // Constructor for root LayoutState created by RenderView | 45 // Constructor for root LayoutState created by RenderView |
45 LayoutState(LayoutUnit pageLogicalHeight, bool pageLogicalHeightChanged, Ren derView&); | 46 LayoutState(LayoutUnit pageLogicalHeight, bool pageLogicalHeightChanged, Ren derView&); |
46 // Constructor for sub-tree Layout and RenderTableSections | 47 // Constructor for sub-tree Layout and RenderTableSections |
47 explicit LayoutState(RenderObject& root); | 48 explicit LayoutState(RenderObject& root); |
(...skipping 17 matching lines...) Expand all Loading... | |
65 const LayoutSize& layoutOffset() const { return m_layoutOffset; } | 66 const LayoutSize& layoutOffset() const { return m_layoutOffset; } |
66 const LayoutSize& pageOffset() const { return m_pageOffset; } | 67 const LayoutSize& pageOffset() const { return m_pageOffset; } |
67 LayoutUnit pageLogicalHeight() const { return m_pageLogicalHeight; } | 68 LayoutUnit pageLogicalHeight() const { return m_pageLogicalHeight; } |
68 bool pageLogicalHeightChanged() const { return m_pageLogicalHeightChanged; } | 69 bool pageLogicalHeightChanged() const { return m_pageLogicalHeightChanged; } |
69 bool containingBlockLogicalWidthChanged() const { return m_containingBlockLo gicalWidthChanged; } | 70 bool containingBlockLogicalWidthChanged() const { return m_containingBlockLo gicalWidthChanged; } |
70 | 71 |
71 LayoutState* next() const { return m_next; } | 72 LayoutState* next() const { return m_next; } |
72 | 73 |
73 bool needsBlockDirectionLocationSetBeforeLayout() const { return m_isPaginat ed && m_pageLogicalHeight; } | 74 bool needsBlockDirectionLocationSetBeforeLayout() const { return m_isPaginat ed && m_pageLogicalHeight; } |
74 | 75 |
76 RenderFlowThread* flowThread() const { return m_flowThread; } | |
77 | |
75 ColumnInfo* columnInfo() const { return m_columnInfo; } | 78 ColumnInfo* columnInfo() const { return m_columnInfo; } |
76 | 79 |
77 RenderObject& renderer() const { return m_renderer; } | 80 RenderObject& renderer() const { return m_renderer; } |
78 | 81 |
79 private: | 82 private: |
80 friend class ForceHorriblySlowRectMapping; | 83 friend class ForceHorriblySlowRectMapping; |
81 | 84 |
82 // Do not add anything apart from bitfields until after m_columnInfo. See ht tps://bugs.webkit.org/show_bug.cgi?id=100173 | 85 // Do not add anything apart from bitfields until after m_columnInfo. See ht tps://bugs.webkit.org/show_bug.cgi?id=100173 |
83 bool m_isPaginated : 1; | 86 bool m_isPaginated : 1; |
84 // If our page height has changed, this will force all blocks to relayout. | 87 // If our page height has changed, this will force all blocks to relayout. |
85 bool m_pageLogicalHeightChanged : 1; | 88 bool m_pageLogicalHeightChanged : 1; |
86 bool m_containingBlockLogicalWidthChanged : 1; | 89 bool m_containingBlockLogicalWidthChanged : 1; |
87 | 90 |
91 RenderFlowThread* m_flowThread; | |
Julien - ping for review
2014/12/02 16:59:47
Maybe we should add the field to PaintInvalidation
mstensho (USE GERRIT)
2014/12/02 19:41:11
Do you have a bug report on that? I think paint in
| |
92 | |
88 // If the enclosing pagination model is a column model, then this will store column information for easy retrieval/manipulation. | 93 // If the enclosing pagination model is a column model, then this will store column information for easy retrieval/manipulation. |
89 ColumnInfo* m_columnInfo; | 94 ColumnInfo* m_columnInfo; |
90 LayoutState* m_next; | 95 LayoutState* m_next; |
91 | 96 |
92 // x/y offset from container. Does not include relative positioning or scrol l offsets. | 97 // x/y offset from container. Does not include relative positioning or scrol l offsets. |
93 LayoutSize m_layoutOffset; | 98 LayoutSize m_layoutOffset; |
94 | 99 |
95 // The current page height for the pagination model that encloses us. | 100 // The current page height for the pagination model that encloses us. |
96 LayoutUnit m_pageLogicalHeight; | 101 LayoutUnit m_pageLogicalHeight; |
97 // The offset of the start of the first page in the nearest enclosing pagina tion model. | 102 // The offset of the start of the first page in the nearest enclosing pagina tion model. |
98 LayoutSize m_pageOffset; | 103 LayoutSize m_pageOffset; |
99 | 104 |
100 RenderObject& m_renderer; | 105 RenderObject& m_renderer; |
101 }; | 106 }; |
102 | 107 |
103 } // namespace blink | 108 } // namespace blink |
104 | 109 |
105 #endif // LayoutState_h | 110 #endif // LayoutState_h |
OLD | NEW |