Index: LayoutTests/fast/events/hit-test-counts.html |
diff --git a/LayoutTests/fast/events/hit-test-counts.html b/LayoutTests/fast/events/hit-test-counts.html |
index cfef9cf58136aab4bdc53b2c9fd47f0be9a6635e..4e39d6d9fba12e0feb2929439384ecdbec356cee 100644 |
--- a/LayoutTests/fast/events/hit-test-counts.html |
+++ b/LayoutTests/fast/events/hit-test-counts.html |
@@ -43,6 +43,16 @@ function hitTestCountDelta(doc) |
return newCount - lastCount; |
} |
+function hitTestCacheHitsDelta(doc) |
+{ |
+ var lastCount = 0; |
+ if ('lastHitTestCacheHits' in doc) |
+ lastCount = doc.lastHitTestCacheHits; |
+ var newCount = internals.hitTestCacheHits(doc); |
+ doc.lastHitTestCacheHits = newCount; |
+ return newCount - lastCount; |
+} |
+ |
function logCounts(label, documents, multiTapNotification, eventSenderFunction) |
{ |
if (eventSenderFunction) |
@@ -50,7 +60,7 @@ function logCounts(label, documents, multiTapNotification, eventSenderFunction) |
var countStr = ''; |
for(var i = 0; i < documents.length; i++) |
- countStr += ' ' + hitTestCountDelta(documents[i]); |
+ countStr += ' ' + hitTestCountDelta(documents[i]) + "/" + hitTestCacheHitsDelta(documents[i]); |
Rick Byers
2015/06/05 20:48:59
nit: I'd find this more readable if it was "<misse
dtapuska
2015/06/09 18:21:23
Done.
|
if (multiTapNotification) { |
debug(label + ':' + eventCounts[label] |
@@ -64,8 +74,10 @@ function logCounts(label, documents, multiTapNotification, eventSenderFunction) |
function clearCounts(documents) |
{ |
- for(var i = 0; i < documents.length; i++) |
+ for(var i = 0; i < documents.length; i++) { |
documents[i].lastHitTestCount = internals.hitTestCount(documents[i]); |
+ documents[i].lastHitTestCacheHits = internals.hitTestCacheHits(documents[i]); |
+ } |
} |
function sendEvents(targetX, targetY, documents, multiTapNotification) |