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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTable.cpp

Issue 1819073004: Fix table cell background painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cr fixes, remove tiling algorithm Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutTable.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTable.cpp b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
index bbcf8f535af38fc826047c784e00c1691ea15bf9..0c2025304835c0c4068e6511177a221acc2ec407 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
@@ -734,6 +734,14 @@ LayoutTableSection* LayoutTable::topNonEmptySection() const
return section;
}
+LayoutTableSection* LayoutTable::bottomNonEmptySection() const
+{
+ LayoutTableSection* section = bottomSection();
+ if (section && !section->numRows())
+ section = sectionAbove(section, SkipEmptySections);
+ return section;
+}
+
void LayoutTable::splitEffectiveColumn(unsigned index, unsigned firstSpan)
{
// We split the column at |index|, taking |firstSpan| cells from the span.
@@ -844,6 +852,23 @@ LayoutTable::ColAndColGroup LayoutTable::slowColElementAtAbsoluteColumn(unsigned
return ColAndColGroup();
}
+unsigned LayoutTable::colElementToAbsoluteColumn(const LayoutTableCol* colElement) const
+{
+ unsigned col = 0;
+
+ for (LayoutTableCol* columnLayoutObject = firstColumn(); columnLayoutObject; columnLayoutObject = columnLayoutObject->nextColumn()) {
+ if (columnLayoutObject == colElement)
+ return col;
+ if (columnLayoutObject->isTableColumnGroupWithColumnChildren()) {
+ // Count spans of leaf col elements only.
+ } else {
+ col += columnLayoutObject->span();
+ }
+ }
+ ASSERT_NOT_REACHED();
+ return 0;
+}
+
void LayoutTable::recalcSections() const
{
ASSERT(m_needsSectionRecalc);
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.h ('k') | third_party/WebKit/Source/core/layout/LayoutTableCol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698