OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) | 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) |
3 * (C) 1997 Torben Weis (weis@kde.org) | 3 * (C) 1997 Torben Weis (weis@kde.org) |
4 * (C) 1998 Waldo Bastian (bastian@kde.org) | 4 * (C) 1998 Waldo Bastian (bastian@kde.org) |
5 * (C) 1999 Lars Knoll (knoll@kde.org) | 5 * (C) 1999 Lars Knoll (knoll@kde.org) |
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 6 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. |
8 * All rights reserved. | 8 * All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 // LayoutTableCell's location includes the offset of it's containing | 199 // LayoutTableCell's location includes the offset of it's containing |
200 // LayoutTableRow, so we need to subtract that again here (as for | 200 // LayoutTableRow, so we need to subtract that again here (as for |
201 // LayoutTableCell::offsetFromContainer. | 201 // LayoutTableCell::offsetFromContainer. |
202 if (parent()) | 202 if (parent()) |
203 adjustedLayerOffset -= parentBox()->locationOffset(); | 203 adjustedLayerOffset -= parentBox()->locationOffset(); |
204 LayoutBox::addLayerHitTestRects(layerRects, currentLayer, adjustedLayerOffset, | 204 LayoutBox::addLayerHitTestRects(layerRects, currentLayer, adjustedLayerOffset, |
205 containerRect); | 205 containerRect); |
206 } | 206 } |
207 | 207 |
208 void LayoutTableCell::computeIntrinsicPadding(int rowHeight, | 208 void LayoutTableCell::computeIntrinsicPadding(int rowHeight, |
| 209 EVerticalAlign verticalAlign, |
209 SubtreeLayoutScope& layouter) { | 210 SubtreeLayoutScope& layouter) { |
210 int oldIntrinsicPaddingBefore = intrinsicPaddingBefore(); | 211 int oldIntrinsicPaddingBefore = intrinsicPaddingBefore(); |
211 int oldIntrinsicPaddingAfter = intrinsicPaddingAfter(); | 212 int oldIntrinsicPaddingAfter = intrinsicPaddingAfter(); |
212 int logicalHeightWithoutIntrinsicPadding = pixelSnappedLogicalHeight() - | 213 int logicalHeightWithoutIntrinsicPadding = pixelSnappedLogicalHeight() - |
213 oldIntrinsicPaddingBefore - | 214 oldIntrinsicPaddingBefore - |
214 oldIntrinsicPaddingAfter; | 215 oldIntrinsicPaddingAfter; |
215 | 216 |
216 int intrinsicPaddingBefore = 0; | 217 int intrinsicPaddingBefore = 0; |
217 switch (style()->verticalAlign()) { | 218 switch (verticalAlign) { |
218 case VerticalAlignSub: | 219 case VerticalAlignSub: |
219 case VerticalAlignSuper: | 220 case VerticalAlignSuper: |
220 case VerticalAlignTextTop: | 221 case VerticalAlignTextTop: |
221 case VerticalAlignTextBottom: | 222 case VerticalAlignTextBottom: |
222 case VerticalAlignLength: | 223 case VerticalAlignLength: |
223 case VerticalAlignBaseline: { | 224 case VerticalAlignBaseline: { |
224 int baseline = cellBaselinePosition(); | 225 int baseline = cellBaselinePosition(); |
225 if (baseline > borderBefore() + paddingBefore()) | 226 if (baseline > borderBefore() + paddingBefore()) |
226 intrinsicPaddingBefore = section()->rowBaseline(rowIndex()) - | 227 intrinsicPaddingBefore = section()->rowBaseline(rowIndex()) - |
227 (baseline - oldIntrinsicPaddingBefore); | 228 (baseline - oldIntrinsicPaddingBefore); |
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1402 cb->adjustChildDebugRect(rect); | 1403 cb->adjustChildDebugRect(rect); |
1403 | 1404 |
1404 return rect; | 1405 return rect; |
1405 } | 1406 } |
1406 | 1407 |
1407 void LayoutTableCell::adjustChildDebugRect(LayoutRect& r) const { | 1408 void LayoutTableCell::adjustChildDebugRect(LayoutRect& r) const { |
1408 r.move(0, -intrinsicPaddingBefore()); | 1409 r.move(0, -intrinsicPaddingBefore()); |
1409 } | 1410 } |
1410 | 1411 |
1411 } // namespace blink | 1412 } // namespace blink |
OLD | NEW |