Commit 4774eb07 authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

Remove unused bits in NGInlineItem

This patch removes |shape_options_| from |NGInlineItem|.
The bit field is not used currently. Also reorders more
frequently used multi-bits bit fields to lower bits.

This is part of preparations to avoid creating intermediate
|NGPhysicalTextFragment| when |NGFragmentItem| is enabled.

This patch has no behavior changes.

Bug: 982194
Change-Id: I4e921add325f051101bec0557034e7bd203e6826
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2154425
Auto-Submit: Koji Ishii <kojii@chromium.org>
Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#759994}
parent fa1ad598
......@@ -75,13 +75,12 @@ NGInlineItem::NGInlineItem(NGInlineItemType type,
end_offset_(end),
layout_object_(layout_object),
type_(type),
segment_data_(0),
style_variant_(static_cast<unsigned>(NGStyleVariant::kStandard)),
end_collapse_type_(kNotCollapsible),
bidi_level_(UBIDI_LTR),
shape_options_(kPreContext | kPostContext),
segment_data_(0),
is_empty_item_(false),
is_block_level_(false),
style_variant_(static_cast<unsigned>(NGStyleVariant::kStandard)),
end_collapse_type_(kNotCollapsible),
is_end_collapsible_newline_(false),
is_symbol_marker_(false),
is_generated_for_line_break_(false),
......@@ -99,13 +98,12 @@ NGInlineItem::NGInlineItem(const NGInlineItem& other,
shape_result_(shape_result),
layout_object_(other.layout_object_),
type_(other.type_),
segment_data_(other.segment_data_),
style_variant_(other.style_variant_),
end_collapse_type_(other.end_collapse_type_),
bidi_level_(other.bidi_level_),
shape_options_(other.shape_options_),
segment_data_(other.segment_data_),
is_empty_item_(other.is_empty_item_),
is_block_level_(other.is_block_level_),
style_variant_(other.style_variant_),
end_collapse_type_(other.end_collapse_type_),
is_end_collapsible_newline_(other.is_end_collapsible_newline_),
is_symbol_marker_(other.is_symbol_marker_),
is_generated_for_line_break_(other.is_generated_for_line_break_),
......
......@@ -43,13 +43,6 @@ class CORE_EXPORT NGInlineItem {
kBidiControl
};
// Whether pre- and post-context should be used for shaping.
enum NGLayoutInlineShapeOptions {
kNoContext = 0,
kPreContext = 1,
kPostContext = 2
};
enum NGCollapseType {
// No collapsible spaces.
kNotCollapsible,
......@@ -80,9 +73,6 @@ class CORE_EXPORT NGInlineItem {
const char* NGInlineItemTypeToString(int val) const;
const ShapeResult* TextShapeResult() const { return shape_result_.get(); }
NGLayoutInlineShapeOptions ShapeOptions() const {
return static_cast<NGLayoutInlineShapeOptions>(shape_options_);
}
// If this item is "empty" for the purpose of empty block calculation.
bool IsEmptyItem() const { return is_empty_item_; }
......@@ -248,14 +238,13 @@ class CORE_EXPORT NGInlineItem {
LayoutObject* layout_object_;
NGInlineItemType type_;
unsigned style_variant_ : 2; // NGStyleVariant
unsigned end_collapse_type_ : 2; // NGCollapseType
unsigned bidi_level_ : 8; // UBiDiLevel is defined as uint8_t.
// |segment_data_| is valid only for |type_ == NGInlineItem::kText|.
unsigned segment_data_ : NGInlineItemSegment::kSegmentDataBits;
unsigned bidi_level_ : 8; // UBiDiLevel is defined as uint8_t.
unsigned shape_options_ : 2;
unsigned is_empty_item_ : 1;
unsigned is_block_level_ : 1;
unsigned style_variant_ : 2;
unsigned end_collapse_type_ : 2; // NGCollapseType
unsigned is_end_collapsible_newline_ : 1;
unsigned is_symbol_marker_ : 1;
unsigned is_generated_for_line_break_ : 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment