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

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: Field instead of global HashMap Created 5 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
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 5e4c6a44a734d582b07f109d1f715e19ede2259f..e138287ff3f4bf3bb310bfcb0a51717a1ec08b21 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableCell.h
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.h
@@ -270,6 +270,14 @@ public:
const char* name() const override { return "LayoutTableCell"; }
+ 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;
@@ -355,6 +363,8 @@ private:
// because we don't do fractional arithmetic on tables.
int m_intrinsicPaddingBefore;
int m_intrinsicPaddingAfter;
+
+ OwnPtr<CollapsedBorderValues> m_collapsedBorderValues;
Xianzhu 2015/12/28 21:27:16 Using this field (instead of global maps), we will
Julien - ping for review 2016/01/08 14:18:15 I also think it's a good tradeoff to make but do w
Xianzhu 2016/01/08 17:50:45 For the performance issue of small mutation in a l
Julien - ping for review 2016/01/11 18:11:36 I also prefer having the code separated. FF has th
};
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableCell, isTableCell());

Powered by Google App Engine
This is Rietveld 408576698