| 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. All r
ight reserved. |
| 4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 5 * Copyright (C) 2013 Adobe Systems Incorporated. | 5 * Copyright (C) 2013 Adobe Systems Incorporated. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 , m_isLastLine(false) | 38 , m_isLastLine(false) |
| 39 , m_isEmpty(true) | 39 , m_isEmpty(true) |
| 40 , m_previousLineBrokeCleanly(true) | 40 , m_previousLineBrokeCleanly(true) |
| 41 , m_runsFromLeadingWhitespace(0) | 41 , m_runsFromLeadingWhitespace(0) |
| 42 { } | 42 { } |
| 43 | 43 |
| 44 bool isFirstLine() const { return m_isFirstLine; } | 44 bool isFirstLine() const { return m_isFirstLine; } |
| 45 bool isLastLine() const { return m_isLastLine; } | 45 bool isLastLine() const { return m_isLastLine; } |
| 46 bool isEmpty() const { return m_isEmpty; } | 46 bool isEmpty() const { return m_isEmpty; } |
| 47 bool previousLineBrokeCleanly() const { return m_previousLineBrokeCleanly; } | 47 bool previousLineBrokeCleanly() const { return m_previousLineBrokeCleanly; } |
| 48 LayoutUnit floatPaginationStrut() const { return m_floatPaginationStrut; } | |
| 49 unsigned runsFromLeadingWhitespace() const { return m_runsFromLeadingWhitesp
ace; } | 48 unsigned runsFromLeadingWhitespace() const { return m_runsFromLeadingWhitesp
ace; } |
| 50 void resetRunsFromLeadingWhitespace() { m_runsFromLeadingWhitespace = 0; } | 49 void resetRunsFromLeadingWhitespace() { m_runsFromLeadingWhitespace = 0; } |
| 51 void incrementRunsFromLeadingWhitespace() { m_runsFromLeadingWhitespace++; } | 50 void incrementRunsFromLeadingWhitespace() { m_runsFromLeadingWhitespace++; } |
| 52 | 51 |
| 53 void setFirstLine(bool firstLine) { m_isFirstLine = firstLine; } | 52 void setFirstLine(bool firstLine) { m_isFirstLine = firstLine; } |
| 54 void setLastLine(bool lastLine) { m_isLastLine = lastLine; } | 53 void setLastLine(bool lastLine) { m_isLastLine = lastLine; } |
| 55 void setEmpty(bool empty, LineLayoutBlockFlow block = LineLayoutBlockFlow(),
LineWidth* lineWidth = nullptr) | 54 void setEmpty(bool empty) { m_isEmpty = empty; } |
| 56 { | |
| 57 if (m_isEmpty == empty) | |
| 58 return; | |
| 59 m_isEmpty = empty; | |
| 60 if (!empty && block && floatPaginationStrut()) { | |
| 61 block.setLogicalHeight(block.logicalHeight() + floatPaginationStrut(
)); | |
| 62 setFloatPaginationStrut(LayoutUnit()); | |
| 63 lineWidth->updateAvailableWidth(); | |
| 64 } | |
| 65 } | |
| 66 | 55 |
| 67 void setPreviousLineBrokeCleanly(bool previousLineBrokeCleanly) { m_previous
LineBrokeCleanly = previousLineBrokeCleanly; } | 56 void setPreviousLineBrokeCleanly(bool previousLineBrokeCleanly) { m_previous
LineBrokeCleanly = previousLineBrokeCleanly; } |
| 68 void setFloatPaginationStrut(LayoutUnit strut) { m_floatPaginationStrut = st
rut; } | |
| 69 | 57 |
| 70 private: | 58 private: |
| 71 bool m_isFirstLine; | 59 bool m_isFirstLine; |
| 72 bool m_isLastLine; | 60 bool m_isLastLine; |
| 73 bool m_isEmpty; | 61 bool m_isEmpty; |
| 74 bool m_previousLineBrokeCleanly; | 62 bool m_previousLineBrokeCleanly; |
| 75 LayoutUnit m_floatPaginationStrut; | |
| 76 unsigned m_runsFromLeadingWhitespace; | 63 unsigned m_runsFromLeadingWhitespace; |
| 77 }; | 64 }; |
| 78 | 65 |
| 79 } // namespace blink | 66 } // namespace blink |
| 80 | 67 |
| 81 #endif // LineInfo_h | 68 #endif // LineInfo_h |
| OLD | NEW |