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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableCol.h

Issue 1781463002: Fix table background painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sample code for improved collapsed border painting Created 3 years, 11 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/LayoutTableCol.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCol.h b/third_party/WebKit/Source/core/layout/LayoutTableCol.h
index a028b3b73ac374db8fd72ff02c5fd5b908f956bd..659c1574f93087ca928e6b8228cddcbd6c169daf 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableCol.h
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCol.h
@@ -76,11 +76,12 @@ public:
// For CSS table columns or colgroups, this is always 1.
unsigned span() const { return m_span; }
- bool isTableColumnGroupWithColumnChildren() { return firstChild(); }
+ bool isTableColumnGroupWithColumnChildren() const { return firstChild(); }
bool isTableColumn() const { return style()->display() == TABLE_COLUMN; }
bool isTableColumnGroup() const { return style()->display() == TABLE_COLUMN_GROUP; }
LayoutTableCol* enclosingColumnGroup() const;
+ LayoutTableCol* lastColumnInGroup() const;
// Returns the next column or column-group.
LayoutTableCol* nextColumn() const;
@@ -92,6 +93,22 @@ public:
const char* name() const override { return "LayoutTableCol"; }
+ // Returns col/colgroup table-relative position.
+ // <col> elements need to provide absoluteColumnIndex
+ // This is because <col> element with span N is treated for display as
+ // N <col> elements with span 1. So, visually, it makes no sense
+ // to talk about <col> position, only about <col> position at particular
+ // column
+ LayoutRect positionByCellSpan(unsigned absoluteColumnIndex) const;
+
+ // Return indexes to all columns inside this element.
+ // Can return vector with size 0 if LayoutTableCol is out of range.
+ // <col> element can return size() > 2 if it spans multiple columns
+ // <colgroup> element can return any size.
+ Vector<unsigned> getEffectiveColumnIndexes() const;
+
+ Vector<LayoutTableCell*> getColumnCells() const;
+
private:
LayoutObjectChildList* virtualChildren() override { return children(); }
const LayoutObjectChildList* virtualChildren() const override { return children(); }
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTableCol.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698