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

Unified Diff: Source/core/layout/HitTestCache.h

Issue 1185923002: Oilpan: fix build after r197063, move HitTestCache to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add TODO for HitTestResult's trait override Created 5 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
« no previous file with comments | « no previous file | Source/core/layout/HitTestCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/HitTestCache.h
diff --git a/Source/core/layout/HitTestCache.h b/Source/core/layout/HitTestCache.h
index c128e30624c9ade3bb63d1ec7a28292dc268839c..2289c115c0a7453fb61aa521411f8da26d98e5c1 100644
--- a/Source/core/layout/HitTestCache.h
+++ b/Source/core/layout/HitTestCache.h
@@ -6,6 +6,7 @@
#define HitTestCache_h
#include "core/layout/HitTestResult.h"
+#include "platform/heap/Handle.h"
#include "wtf/Vector.h"
namespace blink {
@@ -31,9 +32,12 @@ namespace blink {
// size of 1.
#define HIT_TEST_CACHE_SIZE (2)
-class HitTestCache {
+class HitTestCache final : public NoBaseWillBeGarbageCollectedFinalized<HitTestCache> {
public:
- HitTestCache() = default;
+ static PassOwnPtrWillBeRawPtr<HitTestCache> create()
+ {
+ return adoptPtrWillBeNoop(new HitTestCache);
+ }
// Check the cache for a possible hit and update |result| if
// hit encountered; returning true. Otherwise false.
@@ -48,7 +52,11 @@ public:
// Adds a HitTestResult to the cache.
void addCachedResult(const HitTestResult&, uint64_t domTreeVersion);
+ DECLARE_TRACE();
+
private:
+ HitTestCache() = default;
+
// These values are reported in UMA as the "EventHitTest" enumeration.
// Do not reorder, append new values at the end, deprecate old
// values and update histograms.xml.
« no previous file with comments | « no previous file | Source/core/layout/HitTestCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698