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

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

Issue 2548333003: Revert of Paint collapsed borders of a table as one display item (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « third_party/WebKit/Source/core/BUILD.gn ('k') | third_party/WebKit/Source/core/layout/LayoutTable.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2148c7826fff75c30e0ac0c190561f2046cd6917..09ac5911a0a9a7e58e472106b7f2094866f6b5e8 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTable.h
+++ b/third_party/WebKit/Source/core/layout/LayoutTable.h
@@ -29,9 +29,7 @@
#include "core/CSSPropertyNames.h"
#include "core/CoreExport.h"
#include "core/layout/LayoutBlock.h"
-#include "core/paint/PaintResult.h"
#include "core/style/CollapsedBorderValue.h"
-#include "platform/graphics/paint/CullRect.h"
#include "wtf/Vector.h"
#include <memory>
@@ -379,7 +377,8 @@
LayoutTableCell* cellBefore(const LayoutTableCell*) const;
LayoutTableCell* cellAfter(const LayoutTableCell*) const;
- void invalidateCollapsedBorders(PaintInvalidationReason);
+ typedef Vector<CollapsedBorderValue> CollapsedBorderValues;
+ void invalidateCollapsedBorders();
bool hasSections() const { return m_head || m_foot || m_firstBody; }
@@ -408,23 +407,9 @@
void paintMask(const PaintInfo&, const LayoutPoint&) const final;
- struct CollapsedBordersInfo {
- explicit CollapsedBordersInfo(const Vector<CollapsedBorderValue>& values)
- : values(std::move(values)) {}
-
- PaintResult lastPaintResult = FullyPainted;
- CullRect lastPaintRect;
- const Vector<CollapsedBorderValue> values;
- };
-
- bool hasCollapsedBorders() const {
- DCHECK(m_collapsedBordersValid);
- DCHECK(!m_collapsedBordersInfo || collapseBorders());
- return !!m_collapsedBordersInfo;
- }
- CollapsedBordersInfo& getCollapsedBordersInfo() const {
- DCHECK(hasCollapsedBorders());
- return *m_collapsedBordersInfo;
+ const CollapsedBorderValues& collapsedBorders() const {
+ ASSERT(m_collapsedBordersValid);
+ return m_collapsedBorders;
}
void subtractCaptionRect(LayoutRect&) const;
@@ -567,7 +552,7 @@
// need to compare a cells border against all the adjoining cells, rows,
// row groups, column, column groups and table. Thus we cache them in this
// field.
- std::unique_ptr<CollapsedBordersInfo> m_collapsedBordersInfo;
+ CollapsedBorderValues m_collapsedBorders;
bool m_collapsedBordersValid : 1;
mutable bool m_hasColElements : 1;
« no previous file with comments | « third_party/WebKit/Source/core/BUILD.gn ('k') | third_party/WebKit/Source/core/layout/LayoutTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698