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

Unified Diff: Source/WebKit/chromium/src/ViewportAnchor.cpp

Issue 68303004: [oilpan] Move EventHandler to the heap (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 1 month 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/WebKit/chromium/src/ViewportAnchor.h ('k') | Source/WebKit/chromium/src/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/ViewportAnchor.cpp
diff --git a/Source/WebKit/chromium/src/ViewportAnchor.cpp b/Source/WebKit/chromium/src/ViewportAnchor.cpp
index 03c377694ece1046cc666f2e05081a6794b61169..f3b4e7946cc55e33cf2bf2be5a58bc3627f2c137 100644
--- a/Source/WebKit/chromium/src/ViewportAnchor.cpp
+++ b/Source/WebKit/chromium/src/ViewportAnchor.cpp
@@ -50,7 +50,7 @@ int area(const RectType& rect) {
return rect.width() * rect.height();
}
-RESULT(Node) findNonEmptyAnchorNode(const IntPoint& point, const IntRect& viewRect, EventHandler* eventHandler)
+RESULT(Node) findNonEmptyAnchorNode(const IntPoint& point, const IntRect& viewRect, HANDLE_FORMAL(EventHandler) eventHandler)
{
HANDLE(Node) node = eventHandler->hitTestResultAtPoint(point).innerNode();
@@ -74,8 +74,8 @@ RESULT(Node) findNonEmptyAnchorNode(const IntPoint& point, const IntRect& viewRe
} // namespace
-ViewportAnchor::ViewportAnchor(EventHandler* eventHandler)
- : m_eventHandler(eventHandler) { }
+ViewportAnchor::ViewportAnchor(HANDLE_FORMAL(EventHandler) eventHandler)
+ : m_eventHandler(DOT_RAW(eventHandler)) { }
void ViewportAnchor::setAnchor(const IntRect& viewRect, const FloatSize& anchorInViewCoords)
{
@@ -96,7 +96,7 @@ void ViewportAnchor::setAnchor(const IntRect& viewRect, const FloatSize& anchorI
anchorOffset.scale(anchorInViewCoords.width(), anchorInViewCoords.height());
const FloatPoint anchorPoint = FloatPoint(viewRect.location()) + anchorOffset;
- HANDLE(Node) node = findNonEmptyAnchorNode(flooredIntPoint(anchorPoint), viewRect, m_eventHandler);
+ HANDLE(Node) node = findNonEmptyAnchorNode(flooredIntPoint(anchorPoint), viewRect, adoptRawResult( m_eventHandler));
if (!node)
return;
« no previous file with comments | « Source/WebKit/chromium/src/ViewportAnchor.h ('k') | Source/WebKit/chromium/src/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698