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. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2013 Apple Inc. |
8 * All rights reserved. | 8 * All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 | 340 |
341 LayoutRect DebugRect() const override; | 341 LayoutRect DebugRect() const override; |
342 | 342 |
343 void AdjustChildDebugRect(LayoutRect&) const override; | 343 void AdjustChildDebugRect(LayoutRect&) const override; |
344 | 344 |
345 // A table cell's location is relative to its containing section. | 345 // A table cell's location is relative to its containing section. |
346 LayoutBox* LocationContainer() const override { return Section(); } | 346 LayoutBox* LocationContainer() const override { return Section(); } |
347 | 347 |
348 bool HasLineIfEmpty() const override; | 348 bool HasLineIfEmpty() const override; |
349 | 349 |
| 350 static bool CompareInDOMOrder(const LayoutTableCell* cell1, |
| 351 const LayoutTableCell* cell2) { |
| 352 DCHECK(cell1->Section() == cell2->Section()); |
| 353 if (cell1->RowIndex() == cell2->RowIndex()) |
| 354 return cell1->absolute_column_index_ < cell2->absolute_column_index_; |
| 355 return cell1->RowIndex() < cell2->RowIndex(); |
| 356 } |
| 357 |
350 protected: | 358 protected: |
351 void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override; | 359 void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override; |
352 void ComputePreferredLogicalWidths() override; | 360 void ComputePreferredLogicalWidths() override; |
353 | 361 |
354 void AddLayerHitTestRects(LayerHitTestRects&, | 362 void AddLayerHitTestRects(LayerHitTestRects&, |
355 const PaintLayer* current_composited_layer, | 363 const PaintLayer* current_composited_layer, |
356 const LayoutPoint& layer_offset, | 364 const LayoutPoint& layer_offset, |
357 const LayoutRect& container_rect) const override; | 365 const LayoutRect& container_rect) const override; |
358 | 366 |
359 PaintInvalidationReason InvalidatePaint( | 367 PaintInvalidationReason InvalidatePaint( |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 return ToLayoutTableCell(FirstChild()); | 486 return ToLayoutTableCell(FirstChild()); |
479 } | 487 } |
480 | 488 |
481 inline LayoutTableCell* LayoutTableRow::LastCell() const { | 489 inline LayoutTableCell* LayoutTableRow::LastCell() const { |
482 return ToLayoutTableCell(LastChild()); | 490 return ToLayoutTableCell(LastChild()); |
483 } | 491 } |
484 | 492 |
485 } // namespace blink | 493 } // namespace blink |
486 | 494 |
487 #endif // LayoutTableCell_h | 495 #endif // LayoutTableCell_h |
OLD | NEW |