Commit e1b80797 authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

[FragmentItem] Remove |NGPaintFragment::NodeForHitTest|

Following r719562 <crrev.com/c/1937953> that moves the logic
for |NodeForHitTest| from |NGPaintFragment| to
|NGPhysicalFragment|, this patch removes the function and all
references to it.

Bug: 982194
Change-Id: Ie43a51a22e829249a9ef21791d42c1e3a702e06e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1941456Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719898}
parent 63b48821
......@@ -1489,7 +1489,7 @@ bool NGBoxFragmentPainter::NodeAtPoint(HitTestResult& result,
if (fragment.IsInlineBox())
bounds_rect = PhysicalRect(PixelSnappedIntRect(bounds_rect));
if (hit_test_location.Intersects(bounds_rect)) {
Node* node = paint_fragment_->NodeForHitTest();
Node* node = fragment.NodeForHitTest();
if (!result.InnerNode() && node) {
PhysicalOffset point = hit_test_location.Point() - physical_offset;
result.SetNodeAndPosition(node, point);
......@@ -1535,7 +1535,7 @@ bool NGBoxFragmentPainter::HitTestTextFragment(
if (FragmentVisibleToHitTestRequest(text_paint_fragment,
result.GetHitTestRequest()) &&
hit_test_location.Intersects(rect)) {
Node* node = text_paint_fragment.NodeForHitTest();
Node* node = text_fragment.NodeForHitTest();
if (!result.InnerNode() && node) {
PhysicalOffset point = hit_test_location.Point() - physical_offset +
text_paint_fragment.InlineOffsetToContainerBox();
......@@ -1601,7 +1601,7 @@ bool NGBoxFragmentPainter::HitTestLineBoxFragment(
}
}
Node* node = fragment.NodeForHitTest();
Node* node = line.NodeForHitTest();
if (!result.InnerNode() && node) {
const PhysicalOffset point = hit_test_location.Point() - physical_offset +
fragment.InlineOffsetToContainerBox();
......
......@@ -215,10 +215,6 @@ class CORE_EXPORT NGPaintFragment : public RefCounted<NGPaintFragment>,
// in DOM tree.
PositionWithAffinity PositionForPoint(const PhysicalOffset&) const;
// The node to return when hit-testing on this fragment. This can be different
// from GetNode() when this fragment is content of a pseudo node.
Node* NodeForHitTest() const { return PhysicalFragment().NodeForHitTest(); }
// Returns true when associated fragment of |layout_object| has line box.
static bool TryMarkFirstLineBoxDirtyFor(const LayoutObject& layout_object);
static bool TryMarkLastLineBoxDirtyFor(const LayoutObject& layout_object);
......
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