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

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

Issue 1676933004: Table cell background painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix for LayoutTableCol::clippedOverflowRectForPaintInvalidation 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 c25bb9d453251f636249256fd426f2f68264bab7..f22824692ff6612a64168d1f5c787a9f124e3a78 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,25 @@ LayoutTable::ColAndColGroup LayoutTable::slowColElementAtAbsoluteColumn(unsigned
return ColAndColGroup();
}
+// Inverse of slowColElement:
Xianzhu 2016/03/09 18:40:55 There is no more slowColElement. It's renamed to s
atotic1 2016/03/15 16:50:48 Done.
+// maps LayoutTableCol to effectiveColumnIndex useful for columnPositions
Xianzhu 2016/03/09 18:40:55 Start a sentence with an uppercase letter. Add a '
atotic1 2016/03/15 16:50:48 Done.
+// returns npos if out of range
Xianzhu 2016/03/09 18:40:55 Add a '.' at the end. We should always find the co
atotic1 2016/03/15 16:50:48 You are correct. I was finding absolute columns, n
+unsigned LayoutTable::colElementToEffectiveColumn(const LayoutTableCol * colElement) const
+{
+ unsigned col = 0;
+ unsigned i;
+ for (i = 0; i < m_columnLayoutObjects.size(); i++) {
+ if (colElement == m_columnLayoutObjects[i]) {
+ break;
+ }
+ col += m_columnLayoutObjects[i]->span();
Xianzhu 2016/03/09 18:40:55 m_columnLayoutObjects[i].span is in number of abso
atotic1 2016/03/15 16:50:48 Done.
+ }
+ if (col < numEffectiveColumns())
+ return col;
+ // else
+ return npos;
+}
+
void LayoutTable::recalcSections() const
{
ASSERT(m_needsSectionRecalc);

Powered by Google App Engine
This is Rietveld 408576698