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

Unified Diff: third_party/WebKit/Source/core/layout/line/InlineBox.h

Issue 2829683010: Optimize sizeof(InlineBox) by eliminating class layout padding (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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/line/InlineBox.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/line/InlineBox.h
diff --git a/third_party/WebKit/Source/core/layout/line/InlineBox.h b/third_party/WebKit/Source/core/layout/line/InlineBox.h
index 7974ba1fe3673fc5dffbc83ed180515ba1df2eb6..bd77dee07414a993e7b32950273ce0f408755675 100644
--- a/third_party/WebKit/Source/core/layout/line/InlineBox.h
+++ b/third_party/WebKit/Source/core/layout/line/InlineBox.h
@@ -63,13 +63,13 @@ class CORE_EXPORT InlineBox : public DisplayItemClient {
InlineBox* next,
InlineBox* prev,
InlineFlowBox* parent)
- : bitfields_(first_line, constructed, dirty, extracted, is_horizontal),
- next_(next),
+ : next_(next),
prev_(prev),
parent_(parent),
line_layout_item_(item),
location_(top_left),
- logical_width_(logical_width) {}
+ logical_width_(logical_width),
+ bitfields_(first_line, constructed, dirty, extracted, is_horizontal) {}
virtual ~InlineBox();
@@ -472,8 +472,6 @@ class CORE_EXPORT InlineBox : public DisplayItemClient {
private:
void SetLineLayoutItemShouldDoFullPaintInvalidationIfNeeded();
- InlineBoxBitfields bitfields_;
-
InlineBox* next_; // The next element on the same line as us.
InlineBox* prev_; // The previous element on the same line as us.
@@ -520,6 +518,8 @@ class CORE_EXPORT InlineBox : public DisplayItemClient {
LayoutUnit logical_width_;
private:
+ InlineBoxBitfields bitfields_;
+
#if DCHECK_IS_ON()
bool has_bad_parent_ = false;
#endif
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/line/InlineBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698