Commit 2832f264 authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Get rid of unused function NGPaintFragment::GetForInlineContainer()

This patch gets rid of unused function |GetForInlineContainer()| in
|NGPaintFragment| for improving code health.

Note: The CL[1] gets rid of the last caller of this.

[1] http://crrev.com/c/1877505 Utilize NGInlineCursor
ComputeNGLocal{Caret,Selection}Rect()

Change-Id: I0f191f711a4d55b5a67e92068a7cb4522dcb19f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1881001
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710239}
parent d5cf4dc4
......@@ -605,24 +605,6 @@ void NGPaintFragment::ClearAssociationWithLayoutObject() {
}
}
const NGPaintFragment* NGPaintFragment::GetForInlineContainer(
const LayoutObject* layout_object) {
DCHECK(layout_object && layout_object->IsInline());
if (LayoutBlockFlow* block_flow = layout_object->ContainingNGBlockFlow()) {
if (const NGPaintFragment* fragment = block_flow->PaintFragment())
return fragment;
// TODO(kojii): IsLayoutFlowThread should probably be done in
// ContainingNGBlockFlow(), but there seem to be both expectations today.
// This needs cleanup.
if (block_flow->IsLayoutFlowThread()) {
DCHECK(block_flow->Parent() && block_flow->Parent()->IsLayoutBlockFlow());
return block_flow->Parent()->PaintFragment();
}
}
return nullptr;
}
NGPaintFragment::FragmentRange NGPaintFragment::InlineFragmentsFor(
const LayoutObject* layout_object) {
DCHECK(layout_object);
......
......@@ -252,14 +252,6 @@ class CORE_EXPORT NGPaintFragment : public RefCounted<NGPaintFragment>,
bool is_in_layout_ng_inline_formatting_context_;
};
// Returns NGPaintFragment for the inline formatting context the LayoutObject
// belongs to.
//
// When the LayoutObject is an inline block, it belongs to an inline
// formatting context while it creates its own for its descendants. This
// function always returns the one it belongs to.
static const NGPaintFragment* GetForInlineContainer(const LayoutObject*);
// Returns a range of NGPaintFragment in an inline formatting context that are
// for a LayoutObject.
static FragmentRange InlineFragmentsFor(const LayoutObject*);
......
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