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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 } | 388 } |
389 LayoutPoint location(std::max<LayoutUnit>(left, -visualOverflowRect().x()),
std::max<LayoutUnit>(top, -visualOverflowRect().y())); | 389 LayoutPoint location(std::max<LayoutUnit>(left, -visualOverflowRect().x()),
std::max<LayoutUnit>(top, -visualOverflowRect().y())); |
390 LayoutRect r(-location.x(), -location.y(), location.x() + std::max(width() +
right, visualOverflowRect().maxX()), location.y() + std::max(height() + bottom,
visualOverflowRect().maxY())); | 390 LayoutRect r(-location.x(), -location.y(), location.x() + std::max(width() +
right, visualOverflowRect().maxX()), location.y() + std::max(height() + bottom,
visualOverflowRect().maxY())); |
391 | 391 |
392 // FIXME: layoutDelta needs to be applied in parts before/after transforms a
nd | 392 // FIXME: layoutDelta needs to be applied in parts before/after transforms a
nd |
393 // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308 | 393 // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308 |
394 r.move(view().frameView().layoutContext().layoutDelta()); | 394 r.move(view().frameView().layoutContext().layoutDelta()); |
395 return computeRectForRepaint(r, repaintContainer); | 395 return computeRectForRepaint(r, repaintContainer); |
396 } | 396 } |
397 | 397 |
398 LayoutRect RenderTableCell::computeRectForRepaint(const LayoutRect& rect, const
RenderLayerModelObject* repaintContainer, RepaintContext context) const | 398 std::optional<LayoutRect> RenderTableCell::computeVisibleRectInContainer(const L
ayoutRect& rect, const RenderLayerModelObject* container, VisibleRectContext con
text) const |
399 { | 399 { |
400 if (repaintContainer == this) | 400 if (container == this) |
401 return rect; | 401 return rect; |
402 LayoutRect adjustedRect = rect; | 402 LayoutRect adjustedRect = rect; |
403 if ((!view().frameView().layoutContext().isPaintOffsetCacheEnabled() || repa
intContainer) && parent()) | 403 if ((!view().frameView().layoutContext().isPaintOffsetCacheEnabled() || cont
ainer || context.m_useEdgeInclusiveIntersection) && parent()) |
404 adjustedRect.moveBy(-parentBox()->location()); // Rows are in the same c
oordinate space, so don't add their offset in. | 404 adjustedRect.moveBy(-parentBox()->location()); // Rows are in the same c
oordinate space, so don't add their offset in. |
405 return RenderBlockFlow::computeRectForRepaint(adjustedRect, repaintContainer
, context); | 405 return RenderBlockFlow::computeVisibleRectInContainer(adjustedRect, containe
r, context); |
406 } | 406 } |
407 | 407 |
408 LayoutUnit RenderTableCell::cellBaselinePosition() const | 408 LayoutUnit RenderTableCell::cellBaselinePosition() const |
409 { | 409 { |
410 // <http://www.w3.org/TR/2007/CR-CSS21-20070719/tables.html#height-layout>:
The baseline of a cell is the baseline of | 410 // <http://www.w3.org/TR/2007/CR-CSS21-20070719/tables.html#height-layout>:
The baseline of a cell is the baseline of |
411 // the first in-flow line box in the cell, or the first in-flow table-row in
the cell, whichever comes first. If there | 411 // the first in-flow line box in the cell, or the first in-flow table-row in
the cell, whichever comes first. If there |
412 // is no such line box or table-row, the baseline is the bottom of content e
dge of the cell box. | 412 // is no such line box or table-row, the baseline is the bottom of content e
dge of the cell box. |
413 return firstLineBaseline().value_or(borderAndPaddingBefore() + contentLogica
lHeight()); | 413 return firstLineBaseline().value_or(borderAndPaddingBefore() + contentLogica
lHeight()); |
414 } | 414 } |
415 | 415 |
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1391 | 1391 |
1392 bool RenderTableCell::hasLineIfEmpty() const | 1392 bool RenderTableCell::hasLineIfEmpty() const |
1393 { | 1393 { |
1394 if (element() && element()->hasEditableStyle()) | 1394 if (element() && element()->hasEditableStyle()) |
1395 return true; | 1395 return true; |
1396 | 1396 |
1397 return RenderBlock::hasLineIfEmpty(); | 1397 return RenderBlock::hasLineIfEmpty(); |
1398 } | 1398 } |
1399 | 1399 |
1400 } // namespace WebCore | 1400 } // namespace WebCore |
OLD | NEW |