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/InlineFlowBox.h

Issue 1648573002: Transition to explicit constructors in LayoutUnit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moar tweaks! 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) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 bool boxShadowCanBeAppliedToBackground(const FillLayer&) const; 123 bool boxShadowCanBeAppliedToBackground(const FillLayer&) const;
124 124
125 virtual LineBoxList* lineBoxes() const; 125 virtual LineBoxList* lineBoxes() const;
126 126
127 // logicalLeft = left in a horizontal line and top in a vertical line. 127 // logicalLeft = left in a horizontal line and top in a vertical line.
128 LayoutUnit marginBorderPaddingLogicalLeft() const { return marginLogicalLeft () + borderLogicalLeft() + paddingLogicalLeft(); } 128 LayoutUnit marginBorderPaddingLogicalLeft() const { return marginLogicalLeft () + borderLogicalLeft() + paddingLogicalLeft(); }
129 LayoutUnit marginBorderPaddingLogicalRight() const { return marginLogicalRig ht() + borderLogicalRight() + paddingLogicalRight(); } 129 LayoutUnit marginBorderPaddingLogicalRight() const { return marginLogicalRig ht() + borderLogicalRight() + paddingLogicalRight(); }
130 LayoutUnit marginLogicalLeft() const 130 LayoutUnit marginLogicalLeft() const
131 { 131 {
132 if (!includeLogicalLeftEdge()) 132 if (!includeLogicalLeftEdge())
133 return 0; 133 return LayoutUnit();
134 return isHorizontal() ? boxModelObject().marginLeft() : boxModelObject() .marginTop(); 134 return isHorizontal() ? boxModelObject().marginLeft() : boxModelObject() .marginTop();
135 } 135 }
136 LayoutUnit marginLogicalRight() const 136 LayoutUnit marginLogicalRight() const
137 { 137 {
138 if (!includeLogicalRightEdge()) 138 if (!includeLogicalRightEdge())
139 return 0; 139 return LayoutUnit();
140 return isHorizontal() ? boxModelObject().marginRight() : boxModelObject( ).marginBottom(); 140 return isHorizontal() ? boxModelObject().marginRight() : boxModelObject( ).marginBottom();
141 } 141 }
142 int borderLogicalLeft() const 142 int borderLogicalLeft() const
143 { 143 {
144 if (!includeLogicalLeftEdge()) 144 if (!includeLogicalLeftEdge())
145 return 0; 145 return LayoutUnit();
eae 2016/01/29 03:38:12 return 0; (this method returns an int)
146 return isHorizontal() ? lineLayoutItem().style(isFirstLineStyle())->bord erLeftWidth() : lineLayoutItem().style(isFirstLineStyle())->borderTopWidth(); 146 return isHorizontal() ? lineLayoutItem().style(isFirstLineStyle())->bord erLeftWidth() : lineLayoutItem().style(isFirstLineStyle())->borderTopWidth();
147 } 147 }
148 int borderLogicalRight() const 148 int borderLogicalRight() const
149 { 149 {
150 if (!includeLogicalRightEdge()) 150 if (!includeLogicalRightEdge())
151 return 0; 151 return LayoutUnit();
eae 2016/01/29 03:38:12 return 0; (this method returns an int)
152 return isHorizontal() ? lineLayoutItem().style(isFirstLineStyle())->bord erRightWidth() : lineLayoutItem().style(isFirstLineStyle())->borderBottomWidth() ; 152 return isHorizontal() ? lineLayoutItem().style(isFirstLineStyle())->bord erRightWidth() : lineLayoutItem().style(isFirstLineStyle())->borderBottomWidth() ;
153 } 153 }
154 int paddingLogicalLeft() const 154 int paddingLogicalLeft() const
155 { 155 {
156 if (!includeLogicalLeftEdge()) 156 if (!includeLogicalLeftEdge())
157 return 0; 157 return LayoutUnit();
eae 2016/01/29 03:38:12 return 0; (this method returns an int)
158 return isHorizontal() ? boxModelObject().paddingLeft() : boxModelObject( ).paddingTop(); 158 return isHorizontal() ? boxModelObject().paddingLeft() : boxModelObject( ).paddingTop();
159 } 159 }
160 int paddingLogicalRight() const 160 int paddingLogicalRight() const
161 { 161 {
162 if (!includeLogicalRightEdge()) 162 if (!includeLogicalRightEdge())
163 return 0; 163 return LayoutUnit();
eae 2016/01/29 03:38:12 return 0; (this method returns an int)
164 return isHorizontal() ? boxModelObject().paddingRight() : boxModelObject ().paddingBottom(); 164 return isHorizontal() ? boxModelObject().paddingRight() : boxModelObject ().paddingBottom();
165 } 165 }
166 166
167 bool includeLogicalLeftEdge() const { return m_includeLogicalLeftEdge; } 167 bool includeLogicalLeftEdge() const { return m_includeLogicalLeftEdge; }
168 bool includeLogicalRightEdge() const { return m_includeLogicalRightEdge; } 168 bool includeLogicalRightEdge() const { return m_includeLogicalRightEdge; }
169 void setEdges(bool includeLeft, bool includeRight) 169 void setEdges(bool includeLeft, bool includeRight)
170 { 170 {
171 m_includeLogicalLeftEdge = includeLeft; 171 m_includeLogicalLeftEdge = includeLeft;
172 m_includeLogicalRightEdge = includeRight; 172 m_includeLogicalRightEdge = includeRight;
173 } 173 }
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 inline void InlineFlowBox::setHasBadChildList() 365 inline void InlineFlowBox::setHasBadChildList()
366 { 366 {
367 #if ENABLE(ASSERT) 367 #if ENABLE(ASSERT)
368 m_hasBadChildList = true; 368 m_hasBadChildList = true;
369 #endif 369 #endif
370 } 370 }
371 371
372 } // namespace blink 372 } // namespace blink
373 373
374 #endif // InlineFlowBox_h 374 #endif // InlineFlowBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698