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

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

Issue 1549693002: Optimize collapsed border painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/LayoutTableCell.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCell.h b/third_party/WebKit/Source/core/layout/LayoutTableCell.h
index 643d7e3289f8fd64bb8c974f241f479a1c2e4f34..da49efd6fe78cc9c3bf52b6b162eec3af2c8ceda 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableCell.h
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.h
@@ -272,6 +272,14 @@ public:
bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const override;
+ struct CollapsedBorderValues {
+ CollapsedBorderValue startBorder;
+ CollapsedBorderValue endBorder;
+ CollapsedBorderValue beforeBorder;
+ CollapsedBorderValue afterBorder;
+ };
+ const CollapsedBorderValues* collapsedBorderValues() const { return m_collapsedBorderValues.get(); }
+
protected:
void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override;
void computePreferredLogicalWidths() override;
@@ -357,6 +365,8 @@ private:
// because we don't do fractional arithmetic on tables.
int m_intrinsicPaddingBefore;
int m_intrinsicPaddingAfter;
+
+ OwnPtr<CollapsedBorderValues> m_collapsedBorderValues;
chrishtr 2016/05/04 23:24:18 Is border collapsing common enough that we should
Xianzhu 2016/05/05 00:15:51 It's not common: 6.9% cells have visible collapsed
};
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableCell, isTableCell());

Powered by Google App Engine
This is Rietveld 408576698