Commit b703e1b0 authored by Yoichi Osato's avatar Yoichi Osato Committed by Commit Bot

Get rid of unused function LayoutBoxModelObject::SetSelectionState()

After we remove LayoutBoxModelObject::SetSelectionState() implementation,
LayoutObject::SetSelectionState() is no longer needed to be virtual
since there are no other calls.
Thus, we can remove |virtual| from LayoutObject::SetSelectionState().

Bug: 739062
Change-Id: I49b1426f9fc89586d1e818b10385c18c5223399e
Reviewed-on: https://chromium-review.googlesource.com/802603
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Reviewed-by: default avataryosin (OOO Dec 11 to Jan 8) <yosin@chromium.org>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522048}
parent 5af8fa7c
......@@ -78,27 +78,6 @@ typedef HashMap<const LayoutBoxModelObject*, LayoutBoxModelObject*>
ContinuationMap;
static ContinuationMap* g_continuation_map = nullptr;
void LayoutBoxModelObject::SetSelectionState(SelectionState state) {
if (state == SelectionState::kInside &&
GetSelectionState() != SelectionState::kNone)
return;
if ((state == SelectionState::kStart &&
GetSelectionState() == SelectionState::kEnd) ||
(state == SelectionState::kEnd &&
GetSelectionState() == SelectionState::kStart))
LayoutObject::SetSelectionState(SelectionState::kStartAndEnd);
else
LayoutObject::SetSelectionState(state);
// FIXME: We should consider whether it is OK propagating to ancestor
// LayoutInlines. This is a workaround for http://webkit.org/b/32123
// The containing block can be null in case of an orphaned tree.
LayoutBlock* containing_block = ContainingBlock();
if (containing_block && !containing_block->IsLayoutView())
containing_block->SetSelectionState(state);
}
void LayoutBoxModelObject::ContentChanged(ContentChangeType change_type) {
if (!HasLayer())
return;
......
......@@ -418,8 +418,6 @@ class CORE_EXPORT LayoutBoxModelObject : public LayoutObject {
const LayoutBoxModelObject* ancestor_to_stop_at,
LayoutGeometryMap&) const override;
void SetSelectionState(SelectionState) override;
void ContentChanged(ContentChangeType);
bool HasAcceleratedCompositing() const;
......
......@@ -1484,7 +1484,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
SelectionState GetSelectionState() const {
return bitfields_.GetSelectionState();
}
virtual void SetSelectionState(SelectionState state) {
void SetSelectionState(SelectionState state) {
bitfields_.SetSelectionState(state);
}
bool CanUpdateSelectionOnRootLineBoxes() const;
......
......@@ -1444,15 +1444,6 @@ float LayoutText::FirstRunY() const {
return first_text_box_ ? first_text_box_->Y().ToFloat() : 0;
}
void LayoutText::SetSelectionState(SelectionState state) {
LayoutObject::SetSelectionState(state);
// The containing block can be null in case of an orphaned tree.
LayoutBlock* containing_block = ContainingBlock();
if (containing_block && !containing_block->IsLayoutView())
containing_block->SetSelectionState(state);
}
void LayoutText::SetTextWithOffset(scoped_refptr<StringImpl> text,
unsigned offset,
unsigned len,
......
......@@ -189,7 +189,6 @@ class CORE_EXPORT LayoutText : public LayoutObject {
virtual void TransformText();
void SetSelectionState(SelectionState) final;
LayoutRect LocalSelectionRect() const final;
LayoutRect LocalCaretRect(
const InlineBox*,
......
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