| 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, 2009, 2013 Apple Inc. All rights
reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2013 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 #if ENABLE(ASSERT) | 267 #if ENABLE(ASSERT) |
| 268 bool isFirstOrLastCellInRow() const { | 268 bool isFirstOrLastCellInRow() const { |
| 269 return !table()->cellAfter(this) || !table()->cellBefore(this); | 269 return !table()->cellAfter(this) || !table()->cellBefore(this); |
| 270 } | 270 } |
| 271 #endif | 271 #endif |
| 272 | 272 |
| 273 const char* name() const override { return "LayoutTableCell"; } | 273 const char* name() const override { return "LayoutTableCell"; } |
| 274 | 274 |
| 275 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const override; | 275 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const override; |
| 276 void invalidateDisplayItemClients(PaintInvalidationReason) const override; |
| 276 | 277 |
| 277 struct CollapsedBorderValues { | 278 // TODO(wkorman): Consider renaming to more clearly differentiate from |
| 278 CollapsedBorderValue startBorder; | 279 // CollapsedBorderValue. |
| 279 CollapsedBorderValue endBorder; | 280 class CollapsedBorderValues : public DisplayItemClient { |
| 280 CollapsedBorderValue beforeBorder; | 281 public: |
| 281 CollapsedBorderValue afterBorder; | 282 CollapsedBorderValues(const LayoutTable&, |
| 283 const CollapsedBorderValue& startBorder, |
| 284 const CollapsedBorderValue& endBorder, |
| 285 const CollapsedBorderValue& beforeBorder, |
| 286 const CollapsedBorderValue& afterBorder); |
| 287 |
| 288 const CollapsedBorderValue& startBorder() const { return m_startBorder; } |
| 289 const CollapsedBorderValue& endBorder() const { return m_endBorder; } |
| 290 const CollapsedBorderValue& beforeBorder() const { return m_beforeBorder; } |
| 291 const CollapsedBorderValue& afterBorder() const { return m_afterBorder; } |
| 292 |
| 293 void setCollapsedBorderValues(const CollapsedBorderValues& other); |
| 294 |
| 295 // DisplayItemClient methods. |
| 296 String debugName() const; |
| 297 LayoutRect visualRect() const; |
| 298 |
| 299 private: |
| 300 const LayoutTable& m_layoutTable; |
| 301 CollapsedBorderValue m_startBorder; |
| 302 CollapsedBorderValue m_endBorder; |
| 303 CollapsedBorderValue m_beforeBorder; |
| 304 CollapsedBorderValue m_afterBorder; |
| 282 }; | 305 }; |
| 306 |
| 307 bool usesTableAsAdditionalDisplayItemClient() const; |
| 283 const CollapsedBorderValues* collapsedBorderValues() const { | 308 const CollapsedBorderValues* collapsedBorderValues() const { |
| 284 return m_collapsedBorderValues.get(); | 309 return m_collapsedBorderValues.get(); |
| 285 } | 310 } |
| 286 | 311 |
| 287 LayoutRect debugRect() const override; | 312 LayoutRect debugRect() const override; |
| 288 | 313 |
| 289 void adjustChildDebugRect(LayoutRect&) const override; | 314 void adjustChildDebugRect(LayoutRect&) const override; |
| 290 | 315 |
| 291 // A table cell's location is relative to its containing section. | 316 // A table cell's location is relative to its containing section. |
| 292 LayoutBox* locationContainer() const override { return section(); } | 317 LayoutBox* locationContainer() const override { return section(); } |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 return toLayoutTableCell(firstChild()); | 434 return toLayoutTableCell(firstChild()); |
| 410 } | 435 } |
| 411 | 436 |
| 412 inline LayoutTableCell* LayoutTableRow::lastCell() const { | 437 inline LayoutTableCell* LayoutTableRow::lastCell() const { |
| 413 return toLayoutTableCell(lastChild()); | 438 return toLayoutTableCell(lastChild()); |
| 414 } | 439 } |
| 415 | 440 |
| 416 } // namespace blink | 441 } // namespace blink |
| 417 | 442 |
| 418 #endif // LayoutTableCell_h | 443 #endif // LayoutTableCell_h |
| OLD | NEW |