Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: third_party/WebKit/Source/core/layout/line/LineInfo.h

Issue 1899193007: Remove special-code for paginating floats followed by lines of text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/LineBreaker.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/LineBreaker.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698