Index: Source/core/layout/LayoutView.cpp |
diff --git a/Source/core/layout/LayoutView.cpp b/Source/core/layout/LayoutView.cpp |
index 6a6419d91d6bbfc57de34fdf7748911a7464bc4a..d539a246990f2e71852302c2e000900088fac610 100644 |
--- a/Source/core/layout/LayoutView.cpp |
+++ b/Source/core/layout/LayoutView.cpp |
@@ -75,10 +75,15 @@ LayoutView::LayoutView(Document* document) |
setPreferredLogicalWidthsDirty(MarkOnlyThis); |
setPositionState(AbsolutePosition); // to 0,0 :) |
+ |
+ if (document->page()) |
+ document->page()->memoryPurgeController().addListener(this); |
} |
LayoutView::~LayoutView() |
{ |
+ if (document().page()) |
+ document().page()->memoryPurgeController().removeListener(this); |
} |
bool LayoutView::hitTest(HitTestResult& result) |
@@ -1012,4 +1017,10 @@ void LayoutView::willBeDestroyed() |
m_compositor.clear(); |
} |
+// TODO(bashi): Remove |
+void LayoutView::purgeMemory(MemoryPurgeMode, DeviceKind) |
+{ |
+ m_hitTestCache.clear(); |
+} |
+ |
} // namespace blink |