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

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

Issue 2840723005: Don't always invalidate collapsed borders during table layout (Closed)
Patch Set: Created 3 years, 8 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.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutTable.h b/third_party/WebKit/Source/core/layout/LayoutTable.h
index 7d0ffa078a7cbd2a620cd2a3d3a513cbc42e709f..a803b6f9efd7f44136230548ae6626e9e9b9c967 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTable.h
+++ b/third_party/WebKit/Source/core/layout/LayoutTable.h
@@ -392,6 +392,10 @@ class CORE_EXPORT LayoutTable final : public LayoutBlock {
needs_section_recalc_ = true;
SetNeedsLayoutAndFullPaintInvalidation(
LayoutInvalidationReason::kTableChanged);
+
+ // Grid structure affects cell adjacence relationships which affect
+ // conflict resolution of collapsed borders.
+ InvalidateCollapsedBorders();
}
LayoutTableSection* SectionAbove(
@@ -406,7 +410,11 @@ class CORE_EXPORT LayoutTable final : public LayoutBlock {
LayoutTableCell* CellBefore(const LayoutTableCell*) const;
LayoutTableCell* CellAfter(const LayoutTableCell*) const;
- typedef Vector<CollapsedBorderValue> CollapsedBorderValues;
+ using CollapsedBorderValues = Vector<CollapsedBorderValue>;
+ const CollapsedBorderValues& CollapsedBorders() const {
+ DCHECK(collapsed_borders_valid_);
+ return collapsed_borders_;
+ }
void InvalidateCollapsedBorders();
bool HasSections() const { return Header() || Footer() || FirstBody(); }
@@ -436,11 +444,6 @@ class CORE_EXPORT LayoutTable final : public LayoutBlock {
void PaintMask(const PaintInfo&, const LayoutPoint&) const final;
- const CollapsedBorderValues& CollapsedBorders() const {
- DCHECK(collapsed_borders_valid_);
- return collapsed_borders_;
- }
-
void SubtractCaptionRect(LayoutRect&) const;
bool IsLogicalWidthAuto() const;

Powered by Google App Engine
This is Rietveld 408576698