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

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

Issue 2884573002: Replace LayoutTableCell::AbsoluteColumnIndex() with EffectiveColumnIndex()
Patch Set: - Created 3 years, 7 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.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCol.cpp b/third_party/WebKit/Source/core/layout/LayoutTableCol.cpp
index c9512243146cebe50c59992febd843cc6ddeb21f..6fc1e149163cec50fa9310cfe0de38e96a68b778 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableCol.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCol.cpp
@@ -167,6 +167,13 @@ LayoutTableCol* LayoutTableCol::NextColumn() const {
return ToLayoutTableCol(next);
}
+LayoutTableCol* LayoutTableCol::NextInnermostColumn() const {
+ auto* col = NextColumn();
+ while (col && !col->IsInnermost())
+ col = col->NextColumn();
+ return col;
+}
+
BorderValue LayoutTableCol::BorderAdjoiningCellStartBorder(
const LayoutTableCell*) const {
return Style()->BorderStart();
@@ -180,8 +187,8 @@ BorderValue LayoutTableCol::BorderAdjoiningCellEndBorder(
BorderValue LayoutTableCol::BorderAdjoiningCellBefore(
const LayoutTableCell* cell) const {
DCHECK_EQ(Table()
- ->ColElementAtAbsoluteColumn(cell->AbsoluteColumnIndex() +
- cell->ColSpan())
+ ->ColAndColGroupAtEffectiveColumn(
+ cell->EffectiveColumnIndexOfCellAfter())
.InnermostColOrColGroup(),
this);
return Style()->BorderStart();
@@ -189,10 +196,11 @@ BorderValue LayoutTableCol::BorderAdjoiningCellBefore(
BorderValue LayoutTableCol::BorderAdjoiningCellAfter(
const LayoutTableCell* cell) const {
- DCHECK_EQ(Table()
- ->ColElementAtAbsoluteColumn(cell->AbsoluteColumnIndex() - 1)
- .InnermostColOrColGroup(),
- this);
+ DCHECK_EQ(
+ Table()
+ ->ColAndColGroupAtEffectiveColumn(cell->EffectiveColumnIndex() - 1)
+ .InnermostColOrColGroup(),
+ this);
return Style()->BorderEnd();
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableCol.h ('k') | third_party/WebKit/Source/core/layout/LayoutTableSection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698