OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
| 4 * All right reserved. |
4 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. All rights reserved. |
5 * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. | 6 * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. |
6 * | 7 * |
7 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 11 * version 2 of the License, or (at your option) any later version. |
11 * | 12 * |
12 * This library is distributed in the hope that it will be useful, | 13 * This library is distributed in the hope that it will be useful, |
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 * Library General Public License for more details. | 16 * Library General Public License for more details. |
16 * | 17 * |
17 * You should have received a copy of the GNU Library General Public License | 18 * You should have received a copy of the GNU Library General Public License |
18 * along with this library; see the file COPYING.LIB. If not, write to | 19 * along with this library; see the file COPYING.LIB. If not, write to |
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
20 * Boston, MA 02110-1301, USA. | 21 * Boston, MA 02110-1301, USA. |
21 * | 22 * |
22 */ | 23 */ |
23 | 24 |
24 #ifndef LineLayoutState_h | 25 #ifndef LineLayoutState_h |
25 #define LineLayoutState_h | 26 #define LineLayoutState_h |
26 | 27 |
27 #include "core/layout/LayoutBlockFlow.h" | 28 #include "core/layout/LayoutBlockFlow.h" |
28 #include "platform/geometry/LayoutRect.h" | 29 #include "platform/geometry/LayoutRect.h" |
29 #include "wtf/Allocator.h" | 30 #include "wtf/Allocator.h" |
30 | 31 |
31 namespace blink { | 32 namespace blink { |
32 | 33 |
33 // Like LayoutState for layout(), LineLayoutState keeps track of global informat
ion | 34 // Like LayoutState for layout(), LineLayoutState keeps track of global |
34 // during an entire linebox tree layout pass (aka layoutInlineChildren). | 35 // information during an entire linebox tree layout pass (aka |
| 36 // layoutInlineChildren). |
35 class LineLayoutState { | 37 class LineLayoutState { |
36 STACK_ALLOCATED(); | 38 STACK_ALLOCATED(); |
37 | 39 |
38 public: | 40 public: |
39 LineLayoutState(bool fullLayout) | 41 LineLayoutState(bool fullLayout) |
40 : m_lastFloat(nullptr), | 42 : m_lastFloat(nullptr), |
41 m_endLine(nullptr), | 43 m_endLine(nullptr), |
42 m_floatIndex(0), | 44 m_floatIndex(0), |
43 m_endLineMatched(false), | 45 m_endLineMatched(false), |
44 m_hasInlineChild(false), | 46 m_hasInlineChild(false), |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 } | 84 } |
83 | 85 |
84 private: | 86 private: |
85 Vector<LayoutBlockFlow::FloatWithRect> m_floats; | 87 Vector<LayoutBlockFlow::FloatWithRect> m_floats; |
86 FloatingObject* m_lastFloat; | 88 FloatingObject* m_lastFloat; |
87 RootInlineBox* m_endLine; | 89 RootInlineBox* m_endLine; |
88 LineInfo m_lineInfo; | 90 LineInfo m_lineInfo; |
89 unsigned m_floatIndex; | 91 unsigned m_floatIndex; |
90 LayoutUnit m_endLineLogicalTop; | 92 LayoutUnit m_endLineLogicalTop; |
91 bool m_endLineMatched; | 93 bool m_endLineMatched; |
92 // Used as a performance optimization to avoid doing a full paint invalidation
when our floats | 94 // Used as a performance optimization to avoid doing a full paint invalidation |
93 // change but we don't have any inline children. | 95 // when our floats change but we don't have any inline children. |
94 bool m_hasInlineChild; | 96 bool m_hasInlineChild; |
95 | 97 |
96 bool m_isFullLayout; | 98 bool m_isFullLayout; |
97 | 99 |
98 LayoutUnit m_adjustedLogicalLineTop; | 100 LayoutUnit m_adjustedLogicalLineTop; |
99 }; | 101 }; |
100 | 102 |
101 } // namespace blink | 103 } // namespace blink |
102 | 104 |
103 #endif // LineLayoutState_h | 105 #endif // LineLayoutState_h |
OLD | NEW |