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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 LayoutState(LayoutBox&, | 76 LayoutState(LayoutBox&, |
77 const LayoutSize& offset, | 77 const LayoutSize& offset, |
78 LayoutUnit pageLogicalHeight = LayoutUnit(), | 78 LayoutUnit pageLogicalHeight = LayoutUnit(), |
79 bool pageHeightLogicalChanged = false, | 79 bool pageHeightLogicalChanged = false, |
80 bool containingBlockLogicalWidthChanged = false); | 80 bool containingBlockLogicalWidthChanged = false); |
81 | 81 |
82 ~LayoutState(); | 82 ~LayoutState(); |
83 | 83 |
84 bool isPaginated() const { return m_isPaginated; } | 84 bool isPaginated() const { return m_isPaginated; } |
85 | 85 |
86 // The page logical offset is the object's offset from the top of the page in
the page progression | 86 // The page logical offset is the object's offset from the top of the page in |
87 // direction (so an x-offset in vertical text and a y-offset for horizontal te
xt). | 87 // the page progression direction (so an x-offset in vertical text and a |
| 88 // y-offset for horizontal text). |
88 LayoutUnit pageLogicalOffset(const LayoutBox&, | 89 LayoutUnit pageLogicalOffset(const LayoutBox&, |
89 const LayoutUnit& childLogicalOffset) const; | 90 const LayoutUnit& childLogicalOffset) const; |
90 | 91 |
91 LayoutUnit heightOffsetForTableHeaders() const { | 92 LayoutUnit heightOffsetForTableHeaders() const { |
92 return m_heightOffsetForTableHeaders; | 93 return m_heightOffsetForTableHeaders; |
93 }; | 94 }; |
94 void setHeightOffsetForTableHeaders(LayoutUnit offset) { | 95 void setHeightOffsetForTableHeaders(LayoutUnit offset) { |
95 m_heightOffsetForTableHeaders = offset; | 96 m_heightOffsetForTableHeaders = offset; |
96 }; | 97 }; |
97 | 98 |
98 const LayoutSize& layoutOffset() const { return m_layoutOffset; } | 99 const LayoutSize& layoutOffset() const { return m_layoutOffset; } |
99 const LayoutSize& pageOffset() const { return m_pageOffset; } | 100 const LayoutSize& pageOffset() const { return m_pageOffset; } |
100 LayoutUnit pageLogicalHeight() const { return m_pageLogicalHeight; } | 101 LayoutUnit pageLogicalHeight() const { return m_pageLogicalHeight; } |
101 bool pageLogicalHeightChanged() const { return m_pageLogicalHeightChanged; } | 102 bool pageLogicalHeightChanged() const { return m_pageLogicalHeightChanged; } |
102 bool containingBlockLogicalWidthChanged() const { | 103 bool containingBlockLogicalWidthChanged() const { |
103 return m_containingBlockLogicalWidthChanged; | 104 return m_containingBlockLogicalWidthChanged; |
104 } | 105 } |
105 | 106 |
106 LayoutState* next() const { return m_next; } | 107 LayoutState* next() const { return m_next; } |
107 | 108 |
108 LayoutFlowThread* flowThread() const { return m_flowThread; } | 109 LayoutFlowThread* flowThread() const { return m_flowThread; } |
109 | 110 |
110 LayoutObject& layoutObject() const { return m_layoutObject; } | 111 LayoutObject& layoutObject() const { return m_layoutObject; } |
111 | 112 |
112 private: | 113 private: |
113 // Do not add anything apart from bitfields until after m_flowThread. See http
s://bugs.webkit.org/show_bug.cgi?id=100173 | 114 // Do not add anything apart from bitfields until after m_flowThread. See |
| 115 // https://bugs.webkit.org/show_bug.cgi?id=100173 |
114 bool m_isPaginated : 1; | 116 bool m_isPaginated : 1; |
115 // If our page height has changed, this will force all blocks to relayout. | 117 // If our page height has changed, this will force all blocks to relayout. |
116 bool m_pageLogicalHeightChanged : 1; | 118 bool m_pageLogicalHeightChanged : 1; |
117 bool m_containingBlockLogicalWidthChanged : 1; | 119 bool m_containingBlockLogicalWidthChanged : 1; |
118 | 120 |
119 LayoutFlowThread* m_flowThread; | 121 LayoutFlowThread* m_flowThread; |
120 | 122 |
121 LayoutState* m_next; | 123 LayoutState* m_next; |
122 | 124 |
123 // x/y offset from container. Does not include relative positioning or scroll
offsets. | 125 // x/y offset from container. Does not include relative positioning or scroll |
| 126 // offsets. |
124 LayoutSize m_layoutOffset; | 127 LayoutSize m_layoutOffset; |
125 | 128 |
126 // The current page height for the pagination model that encloses us. | 129 // The current page height for the pagination model that encloses us. |
127 LayoutUnit m_pageLogicalHeight; | 130 LayoutUnit m_pageLogicalHeight; |
128 | 131 |
129 // The height we need to make available for repeating table headers in paginat
ed layout. | 132 // The height we need to make available for repeating table headers in |
| 133 // paginated layout. |
130 LayoutUnit m_heightOffsetForTableHeaders; | 134 LayoutUnit m_heightOffsetForTableHeaders; |
131 | 135 |
132 // The offset of the start of the first page in the nearest enclosing paginati
on model. | 136 // The offset of the start of the first page in the nearest enclosing |
| 137 // pagination model. |
133 LayoutSize m_pageOffset; | 138 LayoutSize m_pageOffset; |
134 | 139 |
135 LayoutObject& m_layoutObject; | 140 LayoutObject& m_layoutObject; |
136 }; | 141 }; |
137 | 142 |
138 } // namespace blink | 143 } // namespace blink |
139 | 144 |
140 #endif // LayoutState_h | 145 #endif // LayoutState_h |
OLD | NEW |