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. All rights
reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 LayoutPoint location(max<LayoutUnit>(left, -visualOverflowRect().x()), max<L
ayoutUnit>(top, -visualOverflowRect().y())); | 361 LayoutPoint location(max<LayoutUnit>(left, -visualOverflowRect().x()), max<L
ayoutUnit>(top, -visualOverflowRect().y())); |
362 LayoutRect r(-location.x(), -location.y(), location.x() + max(width() + righ
t, visualOverflowRect().maxX()), location.y() + max(height() + bottom, visualOve
rflowRect().maxY())); | 362 LayoutRect r(-location.x(), -location.y(), location.x() + max(width() + righ
t, visualOverflowRect().maxX()), location.y() + max(height() + bottom, visualOve
rflowRect().maxY())); |
363 | 363 |
364 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) { | 364 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) { |
365 if (RenderView* v = view()) { | 365 if (RenderView* v = view()) { |
366 // FIXME: layoutDelta needs to be applied in parts before/after tran
sforms and | 366 // FIXME: layoutDelta needs to be applied in parts before/after tran
sforms and |
367 // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308 | 367 // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308 |
368 r.move(v->layoutDelta()); | 368 r.move(v->layoutDelta()); |
369 } | 369 } |
370 } | 370 } |
371 computeRectForRepaint(repaintContainer, r); | 371 mapRectToRepaintBacking(repaintContainer, r); |
372 return r; | 372 return r; |
373 } | 373 } |
374 | 374 |
375 void RenderTableCell::computeRectForRepaint(const RenderLayerModelObject* repain
tContainer, LayoutRect& r, bool fixed) const | 375 void RenderTableCell::mapRectToRepaintBacking(const RenderLayerModelObject* repa
intContainer, LayoutRect& r, bool fixed) const |
376 { | 376 { |
377 if (repaintContainer == this) | 377 if (repaintContainer == this) |
378 return; | 378 return; |
379 r.setY(r.y()); | 379 r.setY(r.y()); |
380 RenderView* v = view(); | 380 RenderView* v = view(); |
381 if ((!v || !v->canUseLayoutStateForContainer(repaintContainer)) && parent()) | 381 if ((!v || !v->canUseLayoutStateForContainer(repaintContainer)) && parent()) |
382 r.moveBy(-parentBox()->location()); // Rows are in the same coordinate s
pace, so don't add their offset in. | 382 r.moveBy(-parentBox()->location()); // Rows are in the same coordinate s
pace, so don't add their offset in. |
383 RenderBlockFlow::computeRectForRepaint(repaintContainer, r, fixed); | 383 RenderBlockFlow::mapRectToRepaintBacking(repaintContainer, r, fixed); |
384 } | 384 } |
385 | 385 |
386 LayoutUnit RenderTableCell::cellBaselinePosition() const | 386 LayoutUnit RenderTableCell::cellBaselinePosition() const |
387 { | 387 { |
388 // <http://www.w3.org/TR/2007/CR-CSS21-20070719/tables.html#height-layout>:
The baseline of a cell is the baseline of | 388 // <http://www.w3.org/TR/2007/CR-CSS21-20070719/tables.html#height-layout>:
The baseline of a cell is the baseline of |
389 // the first in-flow line box in the cell, or the first in-flow table-row in
the cell, whichever comes first. If there | 389 // the first in-flow line box in the cell, or the first in-flow table-row in
the cell, whichever comes first. If there |
390 // is no such line box or table-row, the baseline is the bottom of content e
dge of the cell box. | 390 // is no such line box or table-row, the baseline is the bottom of content e
dge of the cell box. |
391 LayoutUnit firstLineBaseline = firstLineBoxBaseline(); | 391 LayoutUnit firstLineBaseline = firstLineBoxBaseline(); |
392 if (firstLineBaseline != -1) | 392 if (firstLineBaseline != -1) |
393 return firstLineBaseline; | 393 return firstLineBaseline; |
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1273 | 1273 |
1274 RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const Render
Object* parent) | 1274 RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const Render
Object* parent) |
1275 { | 1275 { |
1276 RenderTableCell* newCell = RenderTableCell::createAnonymous(&parent->documen
t()); | 1276 RenderTableCell* newCell = RenderTableCell::createAnonymous(&parent->documen
t()); |
1277 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(
parent->style(), TABLE_CELL); | 1277 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(
parent->style(), TABLE_CELL); |
1278 newCell->setStyle(newStyle.release()); | 1278 newCell->setStyle(newStyle.release()); |
1279 return newCell; | 1279 return newCell; |
1280 } | 1280 } |
1281 | 1281 |
1282 } // namespace WebCore | 1282 } // namespace WebCore |
OLD | NEW |