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. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
4 * All right reserved. | 4 * All right reserved. |
5 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. All rights reserved. |
6 * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. | 6 * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 26 matching lines...) Expand all Loading... |
37 class LineLayoutState { | 37 class LineLayoutState { |
38 STACK_ALLOCATED(); | 38 STACK_ALLOCATED(); |
39 | 39 |
40 public: | 40 public: |
41 LineLayoutState(bool fullLayout) | 41 LineLayoutState(bool fullLayout) |
42 : m_lastFloat(nullptr), | 42 : m_lastFloat(nullptr), |
43 m_endLine(nullptr), | 43 m_endLine(nullptr), |
44 m_floatIndex(0), | 44 m_floatIndex(0), |
45 m_endLineMatched(false), | 45 m_endLineMatched(false), |
46 m_hasInlineChild(false), | 46 m_hasInlineChild(false), |
47 m_isFullLayout(fullLayout) {} | 47 m_isFullLayout(fullLayout), |
| 48 m_needsPaginationStrutRecalculation(false) {} |
48 | 49 |
49 void markForFullLayout() { m_isFullLayout = true; } | 50 void markForFullLayout() { m_isFullLayout = true; } |
50 bool isFullLayout() const { return m_isFullLayout; } | 51 bool isFullLayout() const { return m_isFullLayout; } |
51 | 52 |
| 53 bool needsPaginationStrutRecalculation() const { |
| 54 return m_needsPaginationStrutRecalculation || isFullLayout(); |
| 55 } |
| 56 void setNeedsPaginationStrutRecalculation() { |
| 57 m_needsPaginationStrutRecalculation = true; |
| 58 } |
| 59 |
52 bool endLineMatched() const { return m_endLineMatched; } | 60 bool endLineMatched() const { return m_endLineMatched; } |
53 void setEndLineMatched(bool endLineMatched) { | 61 void setEndLineMatched(bool endLineMatched) { |
54 m_endLineMatched = endLineMatched; | 62 m_endLineMatched = endLineMatched; |
55 } | 63 } |
56 | 64 |
57 bool hasInlineChild() const { return m_hasInlineChild; } | 65 bool hasInlineChild() const { return m_hasInlineChild; } |
58 void setHasInlineChild(bool hasInlineChild) { | 66 void setHasInlineChild(bool hasInlineChild) { |
59 m_hasInlineChild = hasInlineChild; | 67 m_hasInlineChild = hasInlineChild; |
60 } | 68 } |
61 | 69 |
(...skipping 28 matching lines...) Expand all Loading... |
90 LineInfo m_lineInfo; | 98 LineInfo m_lineInfo; |
91 unsigned m_floatIndex; | 99 unsigned m_floatIndex; |
92 LayoutUnit m_endLineLogicalTop; | 100 LayoutUnit m_endLineLogicalTop; |
93 bool m_endLineMatched; | 101 bool m_endLineMatched; |
94 // Used as a performance optimization to avoid doing a full paint invalidation | 102 // Used as a performance optimization to avoid doing a full paint invalidation |
95 // when our floats change but we don't have any inline children. | 103 // when our floats change but we don't have any inline children. |
96 bool m_hasInlineChild; | 104 bool m_hasInlineChild; |
97 | 105 |
98 bool m_isFullLayout; | 106 bool m_isFullLayout; |
99 | 107 |
| 108 bool m_needsPaginationStrutRecalculation; |
| 109 |
100 LayoutUnit m_adjustedLogicalLineTop; | 110 LayoutUnit m_adjustedLogicalLineTop; |
101 }; | 111 }; |
102 | 112 |
103 } // namespace blink | 113 } // namespace blink |
104 | 114 |
105 #endif // LineLayoutState_h | 115 #endif // LineLayoutState_h |
OLD | NEW |