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 Apple Inc. All rights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 RenderBlock::computeAbsoluteRepaintRect(r, fixed); | 196 RenderBlock::computeAbsoluteRepaintRect(r, fixed); |
197 } | 197 } |
198 | 198 |
199 FloatPoint RenderTableCell::localToAbsolute(FloatPoint localPoint, bool fixed, b
ool useTransforms) const | 199 FloatPoint RenderTableCell::localToAbsolute(FloatPoint localPoint, bool fixed, b
ool useTransforms) const |
200 { | 200 { |
201 RenderView* v = view(); | 201 RenderView* v = view(); |
202 if ((!v || !v->layoutState()) && parent()) { | 202 if ((!v || !v->layoutState()) && parent()) { |
203 // Rows are in the same coordinate space, so don't add their offset in. | 203 // Rows are in the same coordinate space, so don't add their offset in. |
204 localPoint.move(-parent()->xPos(), -parent()->yPos()); | 204 localPoint.move(-parent()->xPos(), -parent()->yPos()); |
205 } | 205 } |
206 return RenderBlock::localToAbsolute(localPoint, fixed, useTransforms);; | 206 return RenderBlock::localToAbsolute(localPoint, fixed, useTransforms); |
207 } | 207 } |
208 | 208 |
209 FloatPoint RenderTableCell::absoluteToLocal(FloatPoint containerPoint, bool fixe
d, bool useTransforms) const | 209 FloatPoint RenderTableCell::absoluteToLocal(FloatPoint containerPoint, bool fixe
d, bool useTransforms) const |
210 { | 210 { |
211 FloatPoint localPoint = RenderBlock::absoluteToLocal(containerPoint, fixed,
useTransforms); | 211 FloatPoint localPoint = RenderBlock::absoluteToLocal(containerPoint, fixed,
useTransforms); |
212 if (parent()) { | 212 if (parent()) { |
213 // Rows are in the same coordinate space, so add their offset back in. | 213 // Rows are in the same coordinate space, so add their offset back in. |
214 localPoint.move(parent()->xPos(), parent()->yPos()); | 214 localPoint.move(parent()->xPos(), parent()->yPos()); |
215 } | 215 } |
216 return localPoint; | 216 return localPoint; |
217 } | 217 } |
218 | 218 |
| 219 FloatQuad RenderTableCell::localToAbsoluteQuad(const FloatQuad& localQuad, bool
fixed) const |
| 220 { |
| 221 FloatQuad quad = localQuad; |
| 222 if (parent()) { |
| 223 // Rows are in the same coordinate space, so don't add their offset in. |
| 224 quad.move(-parent()->xPos(), -parent()->yPos()); |
| 225 } |
| 226 return RenderBlock::localToAbsoluteQuad(quad, fixed); |
| 227 } |
| 228 |
219 int RenderTableCell::baselinePosition(bool /*firstLine*/, bool /*isRootLineBox*/
) const | 229 int RenderTableCell::baselinePosition(bool /*firstLine*/, bool /*isRootLineBox*/
) const |
220 { | 230 { |
221 // <http://www.w3.org/TR/2007/CR-CSS21-20070719/tables.html#height-layout>:
The baseline of a cell is the baseline of | 231 // <http://www.w3.org/TR/2007/CR-CSS21-20070719/tables.html#height-layout>:
The baseline of a cell is the baseline of |
222 // the first in-flow line box in the cell, or the first in-flow table-row in
the cell, whichever comes first. If there | 232 // the first in-flow line box in the cell, or the first in-flow table-row in
the cell, whichever comes first. If there |
223 // is no such line box or table-row, the baseline is the bottom of content e
dge of the cell box. | 233 // is no such line box or table-row, the baseline is the bottom of content e
dge of the cell box. |
224 | 234 |
225 int firstLineBaseline = getBaselineOfFirstLineBox(); | 235 int firstLineBaseline = getBaselineOfFirstLineBox(); |
226 if (firstLineBaseline != -1) | 236 if (firstLineBaseline != -1) |
227 return firstLineBaseline; | 237 return firstLineBaseline; |
228 | 238 |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 int h = height() + borderTopExtra() + borderBottomExtra(); | 873 int h = height() + borderTopExtra() + borderBottomExtra(); |
864 | 874 |
865 int my = max(ty, paintInfo.rect.y()); | 875 int my = max(ty, paintInfo.rect.y()); |
866 int end = min(paintInfo.rect.bottom(), ty + h); | 876 int end = min(paintInfo.rect.bottom(), ty + h); |
867 int mh = end - my; | 877 int mh = end - my; |
868 | 878 |
869 paintMaskImages(paintInfo, my, mh, tx, ty, w, h); | 879 paintMaskImages(paintInfo, my, mh, tx, ty, w, h); |
870 } | 880 } |
871 | 881 |
872 } // namespace WebCore | 882 } // namespace WebCore |
OLD | NEW |