Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTable.cpp

Issue 2786463004: Paint backgrounds of a table section/row in one display item (Closed)
Patch Set: - Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) 9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
10 * 10 *
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 (bottomBorderOverflow - topBorderOverflow).toInt()); 816 (bottomBorderOverflow - topBorderOverflow).toInt());
817 if (borderOverflowRect != pixelSnappedBorderBoxRect()) { 817 if (borderOverflowRect != pixelSnappedBorderBoxRect()) {
818 LayoutRect borderLayoutRect(borderOverflowRect); 818 LayoutRect borderLayoutRect(borderOverflowRect);
819 addLayoutOverflow(borderLayoutRect); 819 addLayoutOverflow(borderLayoutRect);
820 addContentsVisualOverflow(borderLayoutRect); 820 addContentsVisualOverflow(borderLayoutRect);
821 } 821 }
822 } 822 }
823 823
824 // Add overflow from our caption. 824 // Add overflow from our caption.
825 for (unsigned i = 0; i < m_captions.size(); i++) 825 for (unsigned i = 0; i < m_captions.size(); i++)
826 addOverflowFromChild(m_captions[i]); 826 addOverflowFromChild(*m_captions[i]);
827 827
828 // Add overflow from our sections. 828 // Add overflow from our sections.
829 for (LayoutTableSection* section = topSection(); section; 829 for (LayoutTableSection* section = topSection(); section;
830 section = sectionBelow(section)) 830 section = sectionBelow(section))
831 addOverflowFromChild(section); 831 addOverflowFromChild(*section);
832 } 832 }
833 833
834 void LayoutTable::paintObject(const PaintInfo& paintInfo, 834 void LayoutTable::paintObject(const PaintInfo& paintInfo,
835 const LayoutPoint& paintOffset) const { 835 const LayoutPoint& paintOffset) const {
836 TablePainter(*this).paintObject(paintInfo, paintOffset); 836 TablePainter(*this).paintObject(paintInfo, paintOffset);
837 } 837 }
838 838
839 void LayoutTable::subtractCaptionRect(LayoutRect& rect) const { 839 void LayoutTable::subtractCaptionRect(LayoutRect& rect) const {
840 for (unsigned i = 0; i < m_captions.size(); i++) { 840 for (unsigned i = 0; i < m_captions.size(); i++) {
841 LayoutUnit captionLogicalHeight = m_captions[i]->logicalHeight() + 841 LayoutUnit captionLogicalHeight = m_captions[i]->logicalHeight() +
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
1711 } 1711 }
1712 1712
1713 LayoutUnit LayoutTable::paddingRight() const { 1713 LayoutUnit LayoutTable::paddingRight() const {
1714 if (collapseBorders()) 1714 if (collapseBorders())
1715 return LayoutUnit(); 1715 return LayoutUnit();
1716 1716
1717 return LayoutBlock::paddingRight(); 1717 return LayoutBlock::paddingRight();
1718 } 1718 }
1719 1719
1720 } // namespace blink 1720 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.h ('k') | third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698