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

Unified Diff: Source/core/testing/Internals.cpp

Issue 517293002: Convert some Internals APIs to use DOMPoint instead of WebKitPoint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 045a9f748c46e30e009f92764da0d86d54974228..6cff2610f63fed7f01c1f033141420464b094552 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -42,6 +42,7 @@
#include "core/css/resolver/ViewportStyleResolver.h"
#include "core/dom/ClientRect.h"
#include "core/dom/ClientRectList.h"
+#include "core/dom/DOMPoint.h"
#include "core/dom/DOMStringList.h"
#include "core/dom/Document.h"
#include "core/dom/DocumentMarker.h"
@@ -72,7 +73,6 @@
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Settings.h"
-#include "core/frame/WebKitPoint.h"
#include "core/html/HTMLContentElement.h"
#include "core/html/HTMLIFrameElement.h"
#include "core/html/HTMLInputElement.h"
@@ -962,12 +962,12 @@ String Internals::rangeAsText(const Range* range)
// FIXME: The next four functions are very similar - combine them once
// bestClickableNode/bestContextMenuNode have been combined..
-PassRefPtrWillBeRawPtr<WebKitPoint> Internals::touchPositionAdjustedToBestClickableNode(long x, long y, long width, long height, Document* document, ExceptionState& exceptionState)
+DOMPoint* Internals::touchPositionAdjustedToBestClickableNode(long x, long y, long width, long height, Document* document, ExceptionState& exceptionState)
{
ASSERT(document);
if (!document->frame()) {
exceptionState.throwDOMException(InvalidAccessError, "The document provided is invalid.");
- return nullptr;
+ return 0;
}
document->updateLayout();
@@ -984,9 +984,9 @@ PassRefPtrWillBeRawPtr<WebKitPoint> Internals::touchPositionAdjustedToBestClicka
bool foundNode = eventHandler.bestClickableNodeForHitTestResult(result, adjustedPoint, targetNode);
if (foundNode)
- return WebKitPoint::create(adjustedPoint.x(), adjustedPoint.y());
+ return DOMPoint::create(adjustedPoint.x(), adjustedPoint.y());
- return nullptr;
+ return 0;
}
Node* Internals::touchNodeAdjustedToBestClickableNode(long x, long y, long width, long height, Document* document, ExceptionState& exceptionState)
@@ -1012,12 +1012,12 @@ Node* Internals::touchNodeAdjustedToBestClickableNode(long x, long y, long width
return targetNode;
}
-PassRefPtrWillBeRawPtr<WebKitPoint> Internals::touchPositionAdjustedToBestContextMenuNode(long x, long y, long width, long height, Document* document, ExceptionState& exceptionState)
+DOMPoint* Internals::touchPositionAdjustedToBestContextMenuNode(long x, long y, long width, long height, Document* document, ExceptionState& exceptionState)
{
ASSERT(document);
if (!document->frame()) {
exceptionState.throwDOMException(InvalidAccessError, "The document provided is invalid.");
- return nullptr;
+ return 0;
}
document->updateLayout();
@@ -1034,9 +1034,9 @@ PassRefPtrWillBeRawPtr<WebKitPoint> Internals::touchPositionAdjustedToBestContex
bool foundNode = eventHandler.bestContextMenuNodeForHitTestResult(result, adjustedPoint, targetNode);
if (foundNode)
- return WebKitPoint::create(adjustedPoint.x(), adjustedPoint.y());
+ return DOMPoint::create(adjustedPoint.x(), adjustedPoint.y());
- return WebKitPoint::create(x, y);
+ return DOMPoint::create(x, y);
}
Node* Internals::touchNodeAdjustedToBestContextMenuNode(long x, long y, long width, long height, Document* document, ExceptionState& exceptionState)
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698