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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 | 380 |
381 if (parent() && section() && oldStyle && style()->height() != oldStyle->heig
ht()) | 381 if (parent() && section() && oldStyle && style()->height() != oldStyle->heig
ht()) |
382 section()->rowLogicalHeightChanged(row()); | 382 section()->rowLogicalHeightChanged(row()); |
383 | 383 |
384 // Our intrinsic padding pushes us down to align with the baseline of other
cells on the row. If our vertical-align | 384 // Our intrinsic padding pushes us down to align with the baseline of other
cells on the row. If our vertical-align |
385 // has changed then so will the padding needed to align with other cells - c
lear it so we can recalculate it from scratch. | 385 // has changed then so will the padding needed to align with other cells - c
lear it so we can recalculate it from scratch. |
386 if (oldStyle && style()->verticalAlign() != oldStyle->verticalAlign()) | 386 if (oldStyle && style()->verticalAlign() != oldStyle->verticalAlign()) |
387 clearIntrinsicPadding(); | 387 clearIntrinsicPadding(); |
388 | 388 |
389 // If border was changed, notify table. | 389 // If border was changed, notify table. |
390 if (parent()) { | 390 if (!parent()) |
391 LayoutTable* table = this->table(); | 391 return; |
392 if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout
()&& oldStyle && oldStyle->border() != style()->border()) | 392 LayoutTable* table = this->table(); |
393 table->invalidateCollapsedBorders(); | 393 if (!table) |
| 394 return; |
| 395 if (!table->selfNeedsLayout() && !table->normalChildNeedsLayout()&& oldStyle
&& oldStyle->border() != style()->border()) |
| 396 table->invalidateCollapsedBorders(); |
| 397 |
| 398 if (LayoutTableBoxComponent::doCellsHaveDirtyWidth(*this, *table, diff, *old
Style)) { |
| 399 if (previousCell()) { |
| 400 // TODO(dgrogan) Add a layout test showing that setChildNeedsLayout
is needed instead of setNeedsLayout. |
| 401 previousCell()->setChildNeedsLayout(); |
| 402 previousCell()->setPreferredLogicalWidthsDirty(MarkOnlyThis); |
| 403 } |
| 404 if (nextCell()) { |
| 405 // TODO(dgrogan) Add a layout test showing that setChildNeedsLayout
is needed instead of setNeedsLayout. |
| 406 nextCell()->setChildNeedsLayout(); |
| 407 nextCell()->setPreferredLogicalWidthsDirty(MarkOnlyThis); |
| 408 } |
394 } | 409 } |
395 } | 410 } |
396 | 411 |
397 // The following rules apply for resolving conflicts and figuring out which bord
er | 412 // The following rules apply for resolving conflicts and figuring out which bord
er |
398 // to use. | 413 // to use. |
399 // (1) Borders with the 'border-style' of 'hidden' take precedence over all othe
r conflicting | 414 // (1) Borders with the 'border-style' of 'hidden' take precedence over all othe
r conflicting |
400 // borders. Any border with this value suppresses all borders at this location. | 415 // borders. Any border with this value suppresses all borders at this location. |
401 // (2) Borders with a style of 'none' have the lowest priority. Only if the bord
er properties of all | 416 // (2) Borders with a style of 'none' have the lowest priority. Only if the bord
er properties of all |
402 // the elements meeting at this edge are 'none' will the border be omitted (but
note that 'none' is | 417 // the elements meeting at this edge are 'none' will the border be omitted (but
note that 'none' is |
403 // the default value for the border style.) | 418 // the default value for the border style.) |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 bool LayoutTableCell::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR
ect) const | 1016 bool LayoutTableCell::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR
ect) const |
1002 { | 1017 { |
1003 // If this object has layer, the area of collapsed borders should be transpa
rent | 1018 // If this object has layer, the area of collapsed borders should be transpa
rent |
1004 // to expose the collapsed borders painted on the underlying layer. | 1019 // to expose the collapsed borders painted on the underlying layer. |
1005 if (hasLayer() && table()->collapseBorders()) | 1020 if (hasLayer() && table()->collapseBorders()) |
1006 return false; | 1021 return false; |
1007 return LayoutBlockFlow::backgroundIsKnownToBeOpaqueInRect(localRect); | 1022 return LayoutBlockFlow::backgroundIsKnownToBeOpaqueInRect(localRect); |
1008 } | 1023 } |
1009 | 1024 |
1010 } // namespace blink | 1025 } // namespace blink |
OLD | NEW |