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

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

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 | « Source/core/layout/LayoutView.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutView.cpp
diff --git a/Source/core/layout/LayoutView.cpp b/Source/core/layout/LayoutView.cpp
index 2d0d8aaa1f1c769adb942329cbc1df38df103853..7a238a869915e265c84a237673b426aad83a2e71 100644
--- a/Source/core/layout/LayoutView.cpp
+++ b/Source/core/layout/LayoutView.cpp
@@ -64,6 +64,7 @@ LayoutView::LayoutView(Document* document)
, m_layoutCounterCount(0)
, m_hitTestCount(0)
, m_hitTestCacheHits(0)
+ , m_hitTestCache(HitTestCache::create())
, m_pendingSelection(PendingSelection::create())
{
// init LayoutObject attributes
@@ -98,7 +99,7 @@ bool LayoutView::hitTest(HitTestResult& result)
uint64_t domTreeVersion = document().domTreeVersion();
HitTestResult cacheResult = result;
- bool cacheHit = m_hitTestCache.lookupCachedResult(cacheResult, domTreeVersion);
+ bool cacheHit = m_hitTestCache->lookupCachedResult(cacheResult, domTreeVersion);
bool hitLayer = layer()->hitTest(result);
// FrameView scrollbars are not the same as Layer scrollbars tested by Layer::hitTestOverflowControls,
@@ -110,11 +111,11 @@ bool LayoutView::hitTest(HitTestResult& result)
if (cacheHit) {
m_hitTestCacheHits++;
- m_hitTestCache.verifyCachedResult(result, cacheResult);
+ m_hitTestCache->verifyCachedResult(result, cacheResult);
}
if (hitLayer) {
- m_hitTestCache.addCachedResult(result, domTreeVersion);
+ m_hitTestCache->addCachedResult(result, domTreeVersion);
if (layer()->graphicsLayerBacking()) {
layer()->graphicsLayerBacking()->platformLayer()->setHitTestCacheRect(enclosingIntRect(result.validityRect()));
« no previous file with comments | « Source/core/layout/LayoutView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698