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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 left = std::max(left, below->borderHalfLeft(true)); | 353 left = std::max(left, below->borderHalfLeft(true)); |
354 right = std::max(right, below->borderHalfRight(true)); | 354 right = std::max(right, below->borderHalfRight(true)); |
355 } | 355 } |
356 } | 356 } |
357 | 357 |
358 LayoutRect selfVisualOverflowRect = this->selfVisualOverflowRect(); | 358 LayoutRect selfVisualOverflowRect = this->selfVisualOverflowRect(); |
359 LayoutPoint location(std::max(LayoutUnit(left), -selfVisualOverflowRect.x())
, std::max(LayoutUnit(top), -selfVisualOverflowRect.y())); | 359 LayoutPoint location(std::max(LayoutUnit(left), -selfVisualOverflowRect.x())
, std::max(LayoutUnit(top), -selfVisualOverflowRect.y())); |
360 return LayoutRect(-location.x(), -location.y(), location.x() + std::max(size
().width() + right, selfVisualOverflowRect.maxX()), location.y() + std::max(size
().height() + bottom, selfVisualOverflowRect.maxY())); | 360 return LayoutRect(-location.x(), -location.y(), location.x() + std::max(size
().width() + right, selfVisualOverflowRect.maxX()), location.y() + std::max(size
().height() + bottom, selfVisualOverflowRect.maxY())); |
361 } | 361 } |
362 | 362 |
363 bool LayoutTableCell::mapToVisualRectInAncestorSpace(const LayoutBoxModelObject*
ancestor, LayoutRect& r, VisualRectFlags visualRectFlags) const | |
364 { | |
365 if (ancestor == this) | |
366 return true; | |
367 if (parent()) | |
368 r.moveBy(-parentBox()->location()); // Rows are in the same coordinate s
pace, so don't add their offset in. | |
369 return LayoutBlockFlow::mapToVisualRectInAncestorSpace(ancestor, r, visualRe
ctFlags); | |
370 } | |
371 | |
372 int LayoutTableCell::cellBaselinePosition() const | 363 int LayoutTableCell::cellBaselinePosition() const |
373 { | 364 { |
374 // <http://www.w3.org/TR/2007/CR-CSS21-20070719/tables.html#height-layout>:
The baseline of a cell is the baseline of | 365 // <http://www.w3.org/TR/2007/CR-CSS21-20070719/tables.html#height-layout>:
The baseline of a cell is the baseline of |
375 // the first in-flow line box in the cell, or the first in-flow table-row in
the cell, whichever comes first. If there | 366 // the first in-flow line box in the cell, or the first in-flow table-row in
the cell, whichever comes first. If there |
376 // is no such line box or table-row, the baseline is the bottom of content e
dge of the cell box. | 367 // is no such line box or table-row, the baseline is the bottom of content e
dge of the cell box. |
377 int firstLineBaseline = firstLineBoxBaseline(); | 368 int firstLineBaseline = firstLineBoxBaseline(); |
378 if (firstLineBaseline != -1) | 369 if (firstLineBaseline != -1) |
379 return firstLineBaseline; | 370 return firstLineBaseline; |
380 return borderBefore() + paddingBefore() + contentLogicalHeight(); | 371 return borderBefore() + paddingBefore() + contentLogicalHeight(); |
381 } | 372 } |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 bool LayoutTableCell::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR
ect) const | 1001 bool LayoutTableCell::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR
ect) const |
1011 { | 1002 { |
1012 // If this object has layer, the area of collapsed borders should be transpa
rent | 1003 // If this object has layer, the area of collapsed borders should be transpa
rent |
1013 // to expose the collapsed borders painted on the underlying layer. | 1004 // to expose the collapsed borders painted on the underlying layer. |
1014 if (hasLayer() && table()->collapseBorders()) | 1005 if (hasLayer() && table()->collapseBorders()) |
1015 return false; | 1006 return false; |
1016 return LayoutBlockFlow::backgroundIsKnownToBeOpaqueInRect(localRect); | 1007 return LayoutBlockFlow::backgroundIsKnownToBeOpaqueInRect(localRect); |
1017 } | 1008 } |
1018 | 1009 |
1019 } // namespace blink | 1010 } // namespace blink |
OLD | NEW |