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

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

Issue 1142283004: Implement a Hit Test Cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove stray file 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
Index: Source/core/layout/LayoutView.h
diff --git a/Source/core/layout/LayoutView.h b/Source/core/layout/LayoutView.h
index 45d9a416b822c5fba03b600a3f430fe290984a52..b6c6e0108cb67f81139b6b6384ac99b15ed1cc75 100644
--- a/Source/core/layout/LayoutView.h
+++ b/Source/core/layout/LayoutView.h
@@ -25,6 +25,8 @@
#include "core/CoreExport.h"
#include "core/dom/Position.h"
#include "core/frame/FrameView.h"
+#include "core/layout/HitTestCache.h"
+#include "core/layout/HitTestResult.h"
#include "core/layout/LayoutBlockFlow.h"
#include "core/layout/LayoutState.h"
#include "core/layout/PaintInvalidationState.h"
@@ -51,10 +53,12 @@ public:
void willBeDestroyed() override;
bool hitTest(HitTestResult&);
- bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&);
// Returns the total count of calls to HitTest, for testing.
unsigned hitTestCount() const { return m_hitTestCount; }
+ unsigned hitTestCacheHits() const { return m_hitTestCacheHits; }
+
+ void clearHitTestCache() { m_hitTestCache.clear(); }
virtual const char* name() const override { return "LayoutView"; }
@@ -211,6 +215,8 @@ private:
unsigned m_layoutCounterCount;
unsigned m_hitTestCount;
+ unsigned m_hitTestCacheHits;
+ HitTestCache m_hitTestCache;
sof 2015/06/09 18:59:18 Oilpan-wise, to make this work on LayoutView, it n
dtapuska 2015/06/09 19:39:15 In the posted version: The pointers inside the Hit
OwnPtrWillBePersistent<PendingSelection> m_pendingSelection;
};

Powered by Google App Engine
This is Rietveld 408576698