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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 protected: | 342 protected: |
343 void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override; | 343 void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override; |
344 void ComputePreferredLogicalWidths() override; | 344 void ComputePreferredLogicalWidths() override; |
345 | 345 |
346 void AddLayerHitTestRects(LayerHitTestRects&, | 346 void AddLayerHitTestRects(LayerHitTestRects&, |
347 const PaintLayer* current_composited_layer, | 347 const PaintLayer* current_composited_layer, |
348 const LayoutPoint& layer_offset, | 348 const LayoutPoint& layer_offset, |
349 const LayoutRect& container_rect) const override; | 349 const LayoutRect& container_rect) const override; |
350 | 350 |
351 private: | 351 private: |
| 352 friend class LayoutTableCellTest; |
| 353 |
352 bool IsOfType(LayoutObjectType type) const override { | 354 bool IsOfType(LayoutObjectType type) const override { |
353 return type == kLayoutObjectTableCell || LayoutBlockFlow::IsOfType(type); | 355 return type == kLayoutObjectTableCell || LayoutBlockFlow::IsOfType(type); |
354 } | 356 } |
355 | 357 |
356 void WillBeRemovedFromTree() override; | 358 void WillBeRemovedFromTree() override; |
357 | 359 |
358 void UpdateLogicalWidth() override; | 360 void UpdateLogicalWidth() override; |
359 | 361 |
360 void PaintBoxDecorationBackground(const PaintInfo&, | 362 void PaintBoxDecorationBackground(const PaintInfo&, |
361 const LayoutPoint&) const override; | 363 const LayoutPoint&) const override; |
(...skipping 12 matching lines...) Expand all Loading... |
374 LayoutUnit BorderHalfBefore(bool outer) const; | 376 LayoutUnit BorderHalfBefore(bool outer) const; |
375 LayoutUnit BorderHalfAfter(bool outer) const; | 377 LayoutUnit BorderHalfAfter(bool outer) const; |
376 | 378 |
377 void SetIntrinsicPaddingBefore(int p) { intrinsic_padding_before_ = p; } | 379 void SetIntrinsicPaddingBefore(int p) { intrinsic_padding_before_ = p; } |
378 void SetIntrinsicPaddingAfter(int p) { intrinsic_padding_after_ = p; } | 380 void SetIntrinsicPaddingAfter(int p) { intrinsic_padding_after_ = p; } |
379 void SetIntrinsicPadding(int before, int after) { | 381 void SetIntrinsicPadding(int before, int after) { |
380 SetIntrinsicPaddingBefore(before); | 382 SetIntrinsicPaddingBefore(before); |
381 SetIntrinsicPaddingAfter(after); | 383 SetIntrinsicPaddingAfter(after); |
382 } | 384 } |
383 | 385 |
| 386 inline bool IsInStartColumn() const; |
| 387 inline bool IsInEndColumn() const; |
384 bool HasStartBorderAdjoiningTable() const; | 388 bool HasStartBorderAdjoiningTable() const; |
385 bool HasEndBorderAdjoiningTable() const; | 389 bool HasEndBorderAdjoiningTable() const; |
386 | 390 |
387 // Those functions implement the CSS collapsing border conflict | 391 // Those functions implement the CSS collapsing border conflict |
388 // resolution algorithm. | 392 // resolution algorithm. |
389 // http://www.w3.org/TR/CSS2/tables.html#border-conflict-resolution | 393 // http://www.w3.org/TR/CSS2/tables.html#border-conflict-resolution |
390 // | 394 // |
391 // The code is pretty complicated as it needs to handle mixed directionality | 395 // The code is pretty complicated as it needs to handle mixed directionality |
392 // between the table and the different table parts (cell, row, row group, | 396 // between the table and the different table parts (cell, row, row group, |
393 // column, column group). | 397 // column, column group). |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 return ToLayoutTableCell(FirstChild()); | 458 return ToLayoutTableCell(FirstChild()); |
455 } | 459 } |
456 | 460 |
457 inline LayoutTableCell* LayoutTableRow::LastCell() const { | 461 inline LayoutTableCell* LayoutTableRow::LastCell() const { |
458 return ToLayoutTableCell(LastChild()); | 462 return ToLayoutTableCell(LastChild()); |
459 } | 463 } |
460 | 464 |
461 } // namespace blink | 465 } // namespace blink |
462 | 466 |
463 #endif // LayoutTableCell_h | 467 #endif // LayoutTableCell_h |
OLD | NEW |