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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 { | 146 { |
147 return RenderBlock::paddingBottom() + (includeIntrinsicPadding ? intrinsicPa
ddingBottom() : 0); | 147 return RenderBlock::paddingBottom() + (includeIntrinsicPadding ? intrinsicPa
ddingBottom() : 0); |
148 } | 148 } |
149 | 149 |
150 void RenderTableCell::setOverrideSize(int size) | 150 void RenderTableCell::setOverrideSize(int size) |
151 { | 151 { |
152 clearIntrinsicPadding(); | 152 clearIntrinsicPadding(); |
153 RenderBlock::setOverrideSize(size); | 153 RenderBlock::setOverrideSize(size); |
154 } | 154 } |
155 | 155 |
156 IntRect RenderTableCell::clippedOverflowRectForRepaint(RenderBoxModelObject* rep
aintContainer) | 156 IntRect RenderTableCell::clippedOverflowRectForRepaint(RenderBox* repaintContain
er) |
157 { | 157 { |
158 // If the table grid is dirty, we cannot get reliable information about adjo
ining cells, | 158 // If the table grid is dirty, we cannot get reliable information about adjo
ining cells, |
159 // so we ignore outside borders. This should not be a problem because it mea
ns that | 159 // so we ignore outside borders. This should not be a problem because it mea
ns that |
160 // the table is going to recalculate the grid, relayout and repaint its curr
ent rect, which | 160 // the table is going to recalculate the grid, relayout and repaint its curr
ent rect, which |
161 // includes any outside borders of this cell. | 161 // includes any outside borders of this cell. |
162 if (!table()->collapseBorders() || table()->needsSectionRecalc()) | 162 if (!table()->collapseBorders() || table()->needsSectionRecalc()) |
163 return RenderBlock::clippedOverflowRectForRepaint(repaintContainer); | 163 return RenderBlock::clippedOverflowRectForRepaint(repaintContainer); |
164 | 164 |
165 bool rtl = table()->style()->direction() == RTL; | 165 bool rtl = table()->style()->direction() == RTL; |
166 int outlineSize = style()->outlineSize(); | 166 int outlineSize = style()->outlineSize(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 198 |
199 if (RenderView* v = view()) { | 199 if (RenderView* v = view()) { |
200 // FIXME: layoutDelta needs to be applied in parts before/after transfor
ms and | 200 // FIXME: layoutDelta needs to be applied in parts before/after transfor
ms and |
201 // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308 | 201 // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308 |
202 r.move(v->layoutDelta()); | 202 r.move(v->layoutDelta()); |
203 } | 203 } |
204 computeRectForRepaint(repaintContainer, r); | 204 computeRectForRepaint(repaintContainer, r); |
205 return r; | 205 return r; |
206 } | 206 } |
207 | 207 |
208 void RenderTableCell::computeRectForRepaint(RenderBoxModelObject* repaintContain
er, IntRect& r, bool fixed) | 208 void RenderTableCell::computeRectForRepaint(RenderBox* repaintContainer, IntRect
& r, bool fixed) |
209 { | 209 { |
210 if (repaintContainer == this) | 210 if (repaintContainer == this) |
211 return; | 211 return; |
212 r.setY(r.y()); | 212 r.setY(r.y()); |
213 RenderView* v = view(); | 213 RenderView* v = view(); |
214 if ((!v || !v->layoutStateEnabled()) && parent()) | 214 if ((!v || !v->layoutStateEnabled()) && parent()) |
215 r.move(-parentBox()->x(), -parentBox()->y()); // Rows are in the same co
ordinate space, so don't add their offset in. | 215 r.move(-parentBox()->x(), -parentBox()->y()); // Rows are in the same co
ordinate space, so don't add their offset in. |
216 RenderBlock::computeRectForRepaint(repaintContainer, r, fixed); | 216 RenderBlock::computeRectForRepaint(repaintContainer, r, fixed); |
217 } | 217 } |
218 | 218 |
(...skipping 10 matching lines...) Expand all Loading... |
229 FloatPoint RenderTableCell::absoluteToLocal(FloatPoint containerPoint, bool fixe
d, bool useTransforms) const | 229 FloatPoint RenderTableCell::absoluteToLocal(FloatPoint containerPoint, bool fixe
d, bool useTransforms) const |
230 { | 230 { |
231 FloatPoint localPoint = RenderBlock::absoluteToLocal(containerPoint, fixed,
useTransforms); | 231 FloatPoint localPoint = RenderBlock::absoluteToLocal(containerPoint, fixed,
useTransforms); |
232 if (parent()) { | 232 if (parent()) { |
233 // Rows are in the same coordinate space, so add their offset back in. | 233 // Rows are in the same coordinate space, so add their offset back in. |
234 localPoint.move(parentBox()->x(), parentBox()->y()); | 234 localPoint.move(parentBox()->x(), parentBox()->y()); |
235 } | 235 } |
236 return localPoint; | 236 return localPoint; |
237 } | 237 } |
238 | 238 |
239 FloatQuad RenderTableCell::localToContainerQuad(const FloatQuad& localQuad, Rend
erBoxModelObject* repaintContainer, bool fixed) const | 239 FloatQuad RenderTableCell::localToContainerQuad(const FloatQuad& localQuad, Rend
erBox* repaintContainer, bool fixed) const |
240 { | 240 { |
241 if (repaintContainer == this) | 241 if (repaintContainer == this) |
242 return localQuad; | 242 return localQuad; |
243 | 243 |
244 FloatQuad quad = localQuad; | 244 FloatQuad quad = localQuad; |
245 if (parent()) { | 245 if (parent()) { |
246 // Rows are in the same coordinate space, so don't add their offset in. | 246 // Rows are in the same coordinate space, so don't add their offset in. |
247 quad.move(-parentBox()->x(), -parentBox()->y()); | 247 quad.move(-parentBox()->x(), -parentBox()->y()); |
248 } | 248 } |
249 return RenderBlock::localToContainerQuad(quad, repaintContainer, fixed); | 249 return RenderBlock::localToContainerQuad(quad, repaintContainer, fixed); |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 int h = height(); | 885 int h = height(); |
886 | 886 |
887 int my = max(ty, paintInfo.rect.y()); | 887 int my = max(ty, paintInfo.rect.y()); |
888 int end = min(paintInfo.rect.bottom(), ty + h); | 888 int end = min(paintInfo.rect.bottom(), ty + h); |
889 int mh = end - my; | 889 int mh = end - my; |
890 | 890 |
891 paintMaskImages(paintInfo, my, mh, tx, ty, w, h); | 891 paintMaskImages(paintInfo, my, mh, tx, ty, w, h); |
892 } | 892 } |
893 | 893 |
894 } // namespace WebCore | 894 } // namespace WebCore |
OLD | NEW |