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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 right = std::max(right, below->borderHalfRight(true)); | 354 right = std::max(right, below->borderHalfRight(true)); |
355 } | 355 } |
356 } | 356 } |
357 LayoutPoint location(std::max(LayoutUnit(left), -visualOverflowRect().x()),
std::max(LayoutUnit(top), -visualOverflowRect().y())); | 357 LayoutPoint location(std::max(LayoutUnit(left), -visualOverflowRect().x()),
std::max(LayoutUnit(top), -visualOverflowRect().y())); |
358 LayoutRect r(-location.x(), -location.y(), location.x() + std::max(size().wi
dth() + right, visualOverflowRect().maxX()), location.y() + std::max(size().heig
ht() + bottom, visualOverflowRect().maxY())); | 358 LayoutRect r(-location.x(), -location.y(), location.x() + std::max(size().wi
dth() + right, visualOverflowRect().maxX()), location.y() + std::max(size().heig
ht() + bottom, visualOverflowRect().maxY())); |
359 | 359 |
360 mapToVisibleRectInAncestorSpace(paintInvalidationContainer, r, paintInvalida
tionState); | 360 mapToVisibleRectInAncestorSpace(paintInvalidationContainer, r, paintInvalida
tionState); |
361 return r; | 361 return r; |
362 } | 362 } |
363 | 363 |
364 void LayoutTableCell::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject
* ancestor, LayoutRect& r, const PaintInvalidationState* paintInvalidationState)
const | 364 bool LayoutTableCell::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject
* ancestor, LayoutRect& r, const PaintInvalidationState* paintInvalidationState,
VisibleRectFlags visibleRectFlags) const |
365 { | 365 { |
366 if (ancestor == this) | 366 if (ancestor == this) |
367 return; | 367 return true; |
368 r.setY(r.y()); | 368 r.setY(r.y()); |
369 if ((!paintInvalidationState || !paintInvalidationState->canMapToAncestor(an
cestor)) && parent()) | 369 if ((!paintInvalidationState || !paintInvalidationState->canMapToAncestor(an
cestor)) && parent()) |
370 r.moveBy(-parentBox()->location()); // Rows are in the same coordinate s
pace, so don't add their offset in. | 370 r.moveBy(-parentBox()->location()); // Rows are in the same coordinate s
pace, so don't add their offset in. |
371 LayoutBlockFlow::mapToVisibleRectInAncestorSpace(ancestor, r, paintInvalidat
ionState); | 371 return LayoutBlockFlow::mapToVisibleRectInAncestorSpace(ancestor, r, paintIn
validationState, visibleRectFlags); |
372 } | 372 } |
373 | 373 |
374 int LayoutTableCell::cellBaselinePosition() const | 374 int LayoutTableCell::cellBaselinePosition() const |
375 { | 375 { |
376 // <http://www.w3.org/TR/2007/CR-CSS21-20070719/tables.html#height-layout>:
The baseline of a cell is the baseline of | 376 // <http://www.w3.org/TR/2007/CR-CSS21-20070719/tables.html#height-layout>:
The baseline of a cell is the baseline of |
377 // the first in-flow line box in the cell, or the first in-flow table-row in
the cell, whichever comes first. If there | 377 // the first in-flow line box in the cell, or the first in-flow table-row in
the cell, whichever comes first. If there |
378 // is no such line box or table-row, the baseline is the bottom of content e
dge of the cell box. | 378 // is no such line box or table-row, the baseline is the bottom of content e
dge of the cell box. |
379 int firstLineBaseline = firstLineBoxBaseline(); | 379 int firstLineBaseline = firstLineBoxBaseline(); |
380 if (firstLineBaseline != -1) | 380 if (firstLineBaseline != -1) |
381 return firstLineBaseline; | 381 return firstLineBaseline; |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 bool LayoutTableCell::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR
ect) const | 997 bool LayoutTableCell::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR
ect) const |
998 { | 998 { |
999 // If this object has layer, the area of collapsed borders should be transpa
rent | 999 // If this object has layer, the area of collapsed borders should be transpa
rent |
1000 // to expose the collapsed borders painted on the underlying layer. | 1000 // to expose the collapsed borders painted on the underlying layer. |
1001 if (hasLayer() && table()->collapseBorders()) | 1001 if (hasLayer() && table()->collapseBorders()) |
1002 return false; | 1002 return false; |
1003 return LayoutBlockFlow::backgroundIsKnownToBeOpaqueInRect(localRect); | 1003 return LayoutBlockFlow::backgroundIsKnownToBeOpaqueInRect(localRect); |
1004 } | 1004 } |
1005 | 1005 |
1006 } // namespace blink | 1006 } // namespace blink |
OLD | NEW |