Commit 7f50fe32 authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

Remove unused class NGInlineItemRange

This class was once used in NGLineBreaker but is no longer used.

Bug: 636993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Ic6823fa745b2d3722c434f009b1b56cbf680dd2b
Reviewed-on: https://chromium-review.googlesource.com/1046290Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556424}
parent b8bc2ac3
...@@ -210,14 +210,4 @@ bool NGInlineItem::HasEndEdge() const { ...@@ -210,14 +210,4 @@ bool NGInlineItem::HasEndEdge() const {
!ToLayoutInline(GetLayoutObject())->Continuation(); !ToLayoutInline(GetLayoutObject())->Continuation();
} }
NGInlineItemRange::NGInlineItemRange(Vector<NGInlineItem>* items,
unsigned start_index,
unsigned end_index)
: start_item_(&(*items)[start_index]),
size_(end_index - start_index),
start_index_(start_index) {
CHECK_LE(start_index, end_index);
CHECK_LE(end_index, items->size());
}
} // namespace blink } // namespace blink
...@@ -172,43 +172,6 @@ inline void NGInlineItem::AssertEndOffset(unsigned offset) const { ...@@ -172,43 +172,6 @@ inline void NGInlineItem::AssertEndOffset(unsigned offset) const {
DCHECK_LE(offset, end_offset_); DCHECK_LE(offset, end_offset_);
} }
// A vector-like object that points to a subset of an array of |NGInlineItem|.
// The source vector must keep alive and must not resize while this object
// is alive.
class NGInlineItemRange {
STACK_ALLOCATED();
public:
NGInlineItemRange(Vector<NGInlineItem>*,
unsigned start_index,
unsigned end_index);
unsigned StartIndex() const { return start_index_; }
unsigned EndIndex() const { return start_index_ + size_; }
unsigned Size() const { return size_; }
NGInlineItem& operator[](unsigned index) {
CHECK_LT(index, size_);
return start_item_[index];
}
const NGInlineItem& operator[](unsigned index) const {
CHECK_LT(index, size_);
return start_item_[index];
}
using iterator = NGInlineItem*;
using const_iterator = const NGInlineItem*;
iterator begin() { return start_item_; }
iterator end() { return start_item_ + size_; }
const_iterator begin() const { return start_item_; }
const_iterator end() const { return start_item_ + size_; }
private:
NGInlineItem* start_item_;
unsigned size_;
unsigned start_index_;
};
} // namespace blink } // namespace blink
#endif // NGInlineItem_h #endif // NGInlineItem_h
...@@ -205,10 +205,6 @@ const Vector<NGInlineItem>& NGInlineNode::Items(bool is_first_line) const { ...@@ -205,10 +205,6 @@ const Vector<NGInlineItem>& NGInlineNode::Items(bool is_first_line) const {
return *data.first_line_items_; return *data.first_line_items_;
} }
NGInlineItemRange NGInlineNode::Items(unsigned start, unsigned end) {
return NGInlineItemRange(&MutableData()->items_, start, end);
}
void NGInlineNode::InvalidatePrepareLayoutForTest() { void NGInlineNode::InvalidatePrepareLayoutForTest() {
GetLayoutBlockFlow()->ResetNGInlineNodeData(); GetLayoutBlockFlow()->ResetNGInlineNodeData();
DCHECK(!IsPrepareLayoutFinished()); DCHECK(!IsPrepareLayoutFinished());
......
...@@ -22,7 +22,6 @@ class LayoutBlockFlow; ...@@ -22,7 +22,6 @@ class LayoutBlockFlow;
struct MinMaxSize; struct MinMaxSize;
class NGConstraintSpace; class NGConstraintSpace;
class NGInlineItem; class NGInlineItem;
class NGInlineItemRange;
using NGInlineItemsBuilder = using NGInlineItemsBuilder =
NGInlineItemsBuilderTemplate<EmptyOffsetMappingBuilder>; NGInlineItemsBuilderTemplate<EmptyOffsetMappingBuilder>;
struct NGInlineNodeData; struct NGInlineNodeData;
...@@ -64,7 +63,6 @@ class CORE_EXPORT NGInlineNode : public NGLayoutInputNode { ...@@ -64,7 +63,6 @@ class CORE_EXPORT NGInlineNode : public NGLayoutInputNode {
} }
const Vector<NGInlineItem>& Items(bool is_first_line = false) const; const Vector<NGInlineItem>& Items(bool is_first_line = false) const;
NGInlineItemRange Items(unsigned start_index, unsigned end_index);
// Returns the DOM to text content offset mapping of this block. If it is not // Returns the DOM to text content offset mapping of this block. If it is not
// computed before, compute and store it in NGInlineNodeData. // computed before, compute and store it in NGInlineNodeData.
......
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