| 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, 2010, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc.
All rights reserved. |
| 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 , m_collapsedBordersValid(false) | 58 , m_collapsedBordersValid(false) |
| 59 , m_hasColElements(false) | 59 , m_hasColElements(false) |
| 60 , m_needsSectionRecalc(false) | 60 , m_needsSectionRecalc(false) |
| 61 , m_columnLogicalWidthChanged(false) | 61 , m_columnLogicalWidthChanged(false) |
| 62 , m_columnRenderersValid(false) | 62 , m_columnRenderersValid(false) |
| 63 , m_hasCellColspanThatDeterminesTableWidth(false) | 63 , m_hasCellColspanThatDeterminesTableWidth(false) |
| 64 , m_hSpacing(0) | 64 , m_hSpacing(0) |
| 65 , m_vSpacing(0) | 65 , m_vSpacing(0) |
| 66 , m_borderStart(0) | 66 , m_borderStart(0) |
| 67 , m_borderEnd(0) | 67 , m_borderEnd(0) |
| 68 , m_boxPainter(*this) |
| 68 { | 69 { |
| 69 ASSERT(!childrenInline()); | 70 ASSERT(!childrenInline()); |
| 70 m_columnPos.fill(0, 1); | 71 m_columnPos.fill(0, 1); |
| 71 } | 72 } |
| 72 | 73 |
| 73 RenderTable::~RenderTable() | 74 RenderTable::~RenderTable() |
| 74 { | 75 { |
| 75 } | 76 } |
| 76 | 77 |
| 77 void RenderTable::styleDidChange(StyleDifference diff, const RenderStyle* oldSty
le) | 78 void RenderTable::styleDidChange(StyleDifference diff, const RenderStyle* oldSty
le) |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 } | 703 } |
| 703 } | 704 } |
| 704 | 705 |
| 705 void RenderTable::paintBoxDecorationBackground(PaintInfo& paintInfo, const Layou
tPoint& paintOffset) | 706 void RenderTable::paintBoxDecorationBackground(PaintInfo& paintInfo, const Layou
tPoint& paintOffset) |
| 706 { | 707 { |
| 707 if (!paintInfo.shouldPaintWithinRoot(this)) | 708 if (!paintInfo.shouldPaintWithinRoot(this)) |
| 708 return; | 709 return; |
| 709 | 710 |
| 710 LayoutRect rect(paintOffset, size()); | 711 LayoutRect rect(paintOffset, size()); |
| 711 subtractCaptionRect(rect); | 712 subtractCaptionRect(rect); |
| 712 paintBoxDecorationBackgroundWithRect(paintInfo, paintOffset, rect); | 713 m_boxPainter.paintBoxDecorationBackgroundWithRect(paintInfo, paintOffset, re
ct); |
| 713 } | 714 } |
| 714 | 715 |
| 715 void RenderTable::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset
) | 716 void RenderTable::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset
) |
| 716 { | 717 { |
| 717 if (style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask) | 718 if (style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask) |
| 718 return; | 719 return; |
| 719 | 720 |
| 720 LayoutRect rect(paintOffset, size()); | 721 LayoutRect rect(paintOffset, size()); |
| 721 subtractCaptionRect(rect); | 722 subtractCaptionRect(rect); |
| 722 | 723 |
| 723 paintMaskImages(paintInfo, rect); | 724 m_boxPainter.paintMaskImages(paintInfo, rect); |
| 724 } | 725 } |
| 725 | 726 |
| 726 void RenderTable::computeIntrinsicLogicalWidths(LayoutUnit& minWidth, LayoutUnit
& maxWidth) const | 727 void RenderTable::computeIntrinsicLogicalWidths(LayoutUnit& minWidth, LayoutUnit
& maxWidth) const |
| 727 { | 728 { |
| 728 recalcSectionsIfNeeded(); | 729 recalcSectionsIfNeeded(); |
| 729 // FIXME: Do the recalc in borderStart/borderEnd and make those const_cast t
his call. | 730 // FIXME: Do the recalc in borderStart/borderEnd and make those const_cast t
his call. |
| 730 // Then m_borderStart/m_borderEnd will be transparent a cache and it removes
the possibility | 731 // Then m_borderStart/m_borderEnd will be transparent a cache and it removes
the possibility |
| 731 // of reading out stale values. | 732 // of reading out stale values. |
| 732 const_cast<RenderTable*>(this)->recalcBordersInRowDirection(); | 733 const_cast<RenderTable*>(this)->recalcBordersInRowDirection(); |
| 733 // FIXME: Restructure the table layout code so that we can make this method
const. | 734 // FIXME: Restructure the table layout code so that we can make this method
const. |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1417 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel
l* cell) const | 1418 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel
l* cell) const |
| 1418 { | 1419 { |
| 1419 ASSERT(cell->isFirstOrLastCellInRow()); | 1420 ASSERT(cell->isFirstOrLastCellInRow()); |
| 1420 if (hasSameDirectionAs(cell->row())) | 1421 if (hasSameDirectionAs(cell->row())) |
| 1421 return style()->borderEnd(); | 1422 return style()->borderEnd(); |
| 1422 | 1423 |
| 1423 return style()->borderStart(); | 1424 return style()->borderStart(); |
| 1424 } | 1425 } |
| 1425 | 1426 |
| 1426 } | 1427 } |
| OLD | NEW |