Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1628)

Unified Diff: Source/core/rendering/RenderView.cpp

Issue 354613002: Add test to track the number of hit tests on various events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merge with trunk Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/RenderView.cpp
diff --git a/Source/core/rendering/RenderView.cpp b/Source/core/rendering/RenderView.cpp
index 5002d370fdcecf565f1151986941fa3225aa1c18..9fe7c72970a18f46ba13ec8d992f9783e78947c5 100644
--- a/Source/core/rendering/RenderView.cpp
+++ b/Source/core/rendering/RenderView.cpp
@@ -60,6 +60,7 @@ RenderView::RenderView(Document* document)
, m_layoutState(0)
, m_renderQuoteHead(0)
, m_renderCounterCount(0)
+ , m_hitTestCount(0)
{
// init RenderObject attributes
setInline(false);
@@ -84,6 +85,7 @@ bool RenderView::hitTest(const HitTestRequest& request, HitTestResult& result)
bool RenderView::hitTest(const HitTestRequest& request, const HitTestLocation& location, HitTestResult& result)
{
TRACE_EVENT0("blink", "RenderView::hitTest");
+ m_hitTestCount++;
// We have to recursively update layout/style here because otherwise, when the hit test recurses
// into a child document, it could trigger a layout on the parent document, which can destroy RenderLayers
@@ -94,6 +96,13 @@ bool RenderView::hitTest(const HitTestRequest& request, const HitTestLocation& l
return layer()->hitTest(request, location, result);
}
+unsigned RenderView::hitTestCountDelta()
esprehn 2014/06/26 02:33:50 This should just be a const inline getter, remove
Rick Byers 2014/06/26 15:35:18 Done.
+{
+ unsigned count = m_hitTestCount;
+ m_hitTestCount = 0;
+ return count;
+}
+
void RenderView::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit, LogicalExtentComputedValues& computedValues) const
{
computedValues.m_extent = (!shouldUsePrintingLayout() && m_frameView) ? LayoutUnit(viewLogicalHeight()) : logicalHeight;

Powered by Google App Engine
This is Rietveld 408576698