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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 LayoutRect visualRect() const; | 310 LayoutRect visualRect() const; |
311 | 311 |
312 private: | 312 private: |
313 const LayoutTable& m_layoutTable; | 313 const LayoutTable& m_layoutTable; |
314 CollapsedBorderValue m_startBorder; | 314 CollapsedBorderValue m_startBorder; |
315 CollapsedBorderValue m_endBorder; | 315 CollapsedBorderValue m_endBorder; |
316 CollapsedBorderValue m_beforeBorder; | 316 CollapsedBorderValue m_beforeBorder; |
317 CollapsedBorderValue m_afterBorder; | 317 CollapsedBorderValue m_afterBorder; |
318 }; | 318 }; |
319 | 319 |
320 bool usesTableAsAdditionalDisplayItemClient() const; | 320 class RowBackgroundDisplayItemClient : public DisplayItemClient { |
| 321 public: |
| 322 RowBackgroundDisplayItemClient(const LayoutTableRow&); |
| 323 |
| 324 // DisplayItemClient methods. |
| 325 String debugName() const; |
| 326 LayoutRect visualRect() const; |
| 327 |
| 328 private: |
| 329 const LayoutTableRow& m_layoutTableRow; |
| 330 }; |
| 331 |
| 332 bool usesCompositedCellDisplayItemClients() const; |
| 333 void createCompositedCellDisplayItemClients(); |
321 const CollapsedBorderValues* collapsedBorderValues() const { | 334 const CollapsedBorderValues* collapsedBorderValues() const { |
322 return m_collapsedBorderValues.get(); | 335 return m_collapsedBorderValues.get(); |
323 } | 336 } |
| 337 const RowBackgroundDisplayItemClient* rowBackgroundDisplayItemClient() const { |
| 338 return m_rowBackgroundDisplayItemClient.get(); |
| 339 } |
324 | 340 |
325 LayoutRect debugRect() const override; | 341 LayoutRect debugRect() const override; |
326 | 342 |
327 void adjustChildDebugRect(LayoutRect&) const override; | 343 void adjustChildDebugRect(LayoutRect&) const override; |
328 | 344 |
329 // A table cell's location is relative to its containing section. | 345 // A table cell's location is relative to its containing section. |
330 LayoutBox* locationContainer() const override { return section(); } | 346 LayoutBox* locationContainer() const override { return section(); } |
331 | 347 |
332 protected: | 348 protected: |
| 349 void ensureIsReadyForPaintInvalidation(); |
333 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override; | 350 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override; |
334 void computePreferredLogicalWidths() override; | 351 void computePreferredLogicalWidths() override; |
335 | 352 |
336 void addLayerHitTestRects(LayerHitTestRects&, | 353 void addLayerHitTestRects(LayerHitTestRects&, |
337 const PaintLayer* currentCompositedLayer, | 354 const PaintLayer* currentCompositedLayer, |
338 const LayoutPoint& layerOffset, | 355 const LayoutPoint& layerOffset, |
339 const LayoutRect& containerRect) const override; | 356 const LayoutRect& containerRect) const override; |
340 | 357 |
341 private: | 358 private: |
342 bool isOfType(LayoutObjectType type) const override { | 359 bool isOfType(LayoutObjectType type) const override { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 | 438 |
422 // The intrinsic padding. | 439 // The intrinsic padding. |
423 // See class comment for what they are. | 440 // See class comment for what they are. |
424 // | 441 // |
425 // Note: Those fields are using non-subpixel units (int) | 442 // Note: Those fields are using non-subpixel units (int) |
426 // because we don't do fractional arithmetic on tables. | 443 // because we don't do fractional arithmetic on tables. |
427 int m_intrinsicPaddingBefore; | 444 int m_intrinsicPaddingBefore; |
428 int m_intrinsicPaddingAfter; | 445 int m_intrinsicPaddingAfter; |
429 | 446 |
430 std::unique_ptr<CollapsedBorderValues> m_collapsedBorderValues; | 447 std::unique_ptr<CollapsedBorderValues> m_collapsedBorderValues; |
| 448 std::unique_ptr<RowBackgroundDisplayItemClient> |
| 449 m_rowBackgroundDisplayItemClient; |
431 }; | 450 }; |
432 | 451 |
433 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableCell, isTableCell()); | 452 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableCell, isTableCell()); |
434 | 453 |
435 inline LayoutTableCell* LayoutTableCell::previousCell() const { | 454 inline LayoutTableCell* LayoutTableCell::previousCell() const { |
436 return toLayoutTableCell(LayoutObject::previousSibling()); | 455 return toLayoutTableCell(LayoutObject::previousSibling()); |
437 } | 456 } |
438 | 457 |
439 inline LayoutTableCell* LayoutTableCell::nextCell() const { | 458 inline LayoutTableCell* LayoutTableCell::nextCell() const { |
440 return toLayoutTableCell(LayoutObject::nextSibling()); | 459 return toLayoutTableCell(LayoutObject::nextSibling()); |
441 } | 460 } |
442 | 461 |
443 inline LayoutTableCell* LayoutTableRow::firstCell() const { | 462 inline LayoutTableCell* LayoutTableRow::firstCell() const { |
444 return toLayoutTableCell(firstChild()); | 463 return toLayoutTableCell(firstChild()); |
445 } | 464 } |
446 | 465 |
447 inline LayoutTableCell* LayoutTableRow::lastCell() const { | 466 inline LayoutTableCell* LayoutTableRow::lastCell() const { |
448 return toLayoutTableCell(lastChild()); | 467 return toLayoutTableCell(lastChild()); |
449 } | 468 } |
450 | 469 |
451 } // namespace blink | 470 } // namespace blink |
452 | 471 |
453 #endif // LayoutTableCell_h | 472 #endif // LayoutTableCell_h |
OLD | NEW |