Index: third_party/WebKit/Source/core/layout/LayoutTableCell.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp |
index 14dc86695534739603ece0f62b1be09ef692d49e..5c6f73698211c508f3a4329a9cce5f2fe3f05536 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp |
@@ -572,32 +572,28 @@ static CollapsedBorderValue ChooseBorder(const CollapsedBorderValue& border1, |
return CompareBorders(border1, border2) ? border2 : border1; |
} |
-bool LayoutTableCell::HasStartBorderAdjoiningTable() const { |
- bool is_start_column = !AbsoluteColumnIndex(); |
- bool is_end_column = Table()->AbsoluteColumnToEffectiveColumn( |
- AbsoluteColumnIndex() + ColSpan() - 1) == |
- Table()->NumEffectiveColumns() - 1; |
- bool has_same_direction_as_table = HasSameDirectionAs(Table()); |
+bool LayoutTableCell::IsInStartColumn() const { |
+ return !AbsoluteColumnIndex(); |
+} |
+ |
+bool LayoutTableCell::IsInEndColumn() const { |
+ return Table()->AbsoluteColumnToEffectiveColumn(AbsoluteColumnIndex() + |
+ ColSpan() - 1) == |
+ Table()->NumEffectiveColumns() - 1; |
+} |
+bool LayoutTableCell::HasStartBorderAdjoiningTable() const { |
// The table direction determines the row direction. In mixed directionality, |
// we cannot guarantee that we have a common border with the table (think a |
// ltr table with rtl start cell). |
- return (is_start_column && has_same_direction_as_table) || |
- (is_end_column && !has_same_direction_as_table); |
+ return HasSameDirectionAs(Table()) ? IsInStartColumn() : IsInEndColumn(); |
} |
bool LayoutTableCell::HasEndBorderAdjoiningTable() const { |
- bool is_start_column = !AbsoluteColumnIndex(); |
- bool is_end_column = Table()->AbsoluteColumnToEffectiveColumn( |
- AbsoluteColumnIndex() + ColSpan() - 1) == |
- Table()->NumEffectiveColumns() - 1; |
- bool has_same_direction_as_table = HasSameDirectionAs(Table()); |
- |
// The table direction determines the row direction. In mixed directionality, |
// we cannot guarantee that we have a common border with the table (think a |
// ltr table with ltr end cell). |
- return (is_start_column && !has_same_direction_as_table) || |
- (is_end_column && has_same_direction_as_table); |
+ return HasSameDirectionAs(Table()) ? IsInEndColumn() : IsInStartColumn(); |
} |
CollapsedBorderValue LayoutTableCell::ComputeCollapsedStartBorder( |