OLD | NEW |
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 0; |
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 0; |
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 0; |
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 0; |
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 0; |
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 0; |
164 return isHorizontal() ? boxModelObject()->paddingRight() : boxModelObjec
t()->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 } |
174 | 174 |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 } | 361 } |
362 | 362 |
363 } // namespace blink | 363 } // namespace blink |
364 | 364 |
365 #ifndef NDEBUG | 365 #ifndef NDEBUG |
366 // Outside the WebCore namespace for ease of invocation from gdb. | 366 // Outside the WebCore namespace for ease of invocation from gdb. |
367 void showTree(const blink::InlineFlowBox*); | 367 void showTree(const blink::InlineFlowBox*); |
368 #endif | 368 #endif |
369 | 369 |
370 #endif // InlineFlowBox_h | 370 #endif // InlineFlowBox_h |
OLD | NEW |