Commit 0ee20be7 authored by Nicolás Peña Moreno's avatar Nicolás Peña Moreno Committed by Commit Bot

Remove DOMNodeId check from TextPaintTimingDetector

Given that the RecordsManager is now based on LayoutObject and not on
the DOMNodeId, there is no need to explicitly consider objects which do
not have an Id. This will speed up ShouldWalkObject() a bit.

Bug: 999264
Change-Id: I169d30c1a6187bce0e84ec8502e04e1cde9ec9d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1834271Reviewed-by: default avatarSteve Kobes <skobes@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702069}
parent 51cdc5e9
......@@ -161,12 +161,10 @@ bool TextPaintTimingDetector::ShouldWalkObject(
// shadow element or has no elementtiming attribute, then we should not record
// its text.
if (!records_manager_.IsRecordingLargestTextPaint() &&
!TextElementTiming::NeededForElementTiming(*node))
!TextElementTiming::NeededForElementTiming(*node)) {
return false;
}
DOMNodeId node_id = DOMNodeIds::ExistingIdForNode(node);
if (node_id == kInvalidDOMNodeId)
return true;
// This metric defines the size of a text block by its first size, so we
// should not walk the object if it has been recorded.
return !records_manager_.HasRecorded(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