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

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

Issue 1647313003: Continue converting to explicit LayoutUnit constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@explicitContstructors
Patch Set: Add TODO Created 4 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2013 Adobe Systems Incorporated. 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 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // currentWidth() is used by the code that lays out words in a single Layout Text, it's 57 // currentWidth() is used by the code that lays out words in a single Layout Text, it's
58 // expected that offsets will not be snapped until an InlineBox boundary is reached. 58 // expected that offsets will not be snapped until an InlineBox boundary is reached.
59 float currentWidth() const { return m_committedWidth + m_uncommittedWidth; } 59 float currentWidth() const { return m_committedWidth + m_uncommittedWidth; }
60 60
61 // FIXME: We should eventually replace these three functions by ones that wo rk on a higher abstraction. 61 // FIXME: We should eventually replace these three functions by ones that wo rk on a higher abstraction.
62 float uncommittedWidth() const { return m_uncommittedWidth; } 62 float uncommittedWidth() const { return m_uncommittedWidth; }
63 float committedWidth() const { return m_committedWidth; } 63 float committedWidth() const { return m_committedWidth; }
64 float availableWidth() const { return m_availableWidth; } 64 float availableWidth() const { return m_availableWidth; }
65 float trailingWhitespaceWidth() const { return m_trailingWhitespaceWidth; } 65 float trailingWhitespaceWidth() const { return m_trailingWhitespaceWidth; }
66 66
67 void updateAvailableWidth(LayoutUnit minimumHeight = 0); 67 void updateAvailableWidth(LayoutUnit minimumHeight = LayoutUnit());
68 void shrinkAvailableWidthForNewFloatIfNeeded(const FloatingObject&); 68 void shrinkAvailableWidthForNewFloatIfNeeded(const FloatingObject&);
69 void addUncommittedWidth(float delta) { m_uncommittedWidth += delta; } 69 void addUncommittedWidth(float delta) { m_uncommittedWidth += delta; }
70 void commit(); 70 void commit();
71 void applyOverhang(LineLayoutRubyRun, LineLayoutItem startLayoutItem, LineLa youtItem endLayoutItem); 71 void applyOverhang(LineLayoutRubyRun, LineLayoutItem startLayoutItem, LineLa youtItem endLayoutItem);
72 void fitBelowFloats(bool isFirstLine = false); 72 void fitBelowFloats(bool isFirstLine = false);
73 void setTrailingWhitespaceWidth(float width) { m_trailingWhitespaceWidth = w idth; } 73 void setTrailingWhitespaceWidth(float width) { m_trailingWhitespaceWidth = w idth; }
74 void snapUncommittedWidth() { m_uncommittedWidth = LayoutUnit(m_uncommittedW idth).toFloat(); } 74 void snapUncommittedWidth() { m_uncommittedWidth = LayoutUnit(m_uncommittedW idth).toFloat(); }
75 75
76 IndentTextOrNot indentText() const { return m_indentText; } 76 IndentTextOrNot indentText() const { return m_indentText; }
77 77
(...skipping 10 matching lines...) Expand all
88 float m_left; 88 float m_left;
89 float m_right; 89 float m_right;
90 float m_availableWidth; 90 float m_availableWidth;
91 bool m_isFirstLine; 91 bool m_isFirstLine;
92 IndentTextOrNot m_indentText; 92 IndentTextOrNot m_indentText;
93 }; 93 };
94 94
95 } // namespace blink 95 } // namespace blink
96 96
97 #endif // LineWidth_h 97 #endif // LineWidth_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698