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

Unified Diff: Source/core/testing/LayerRect.h

Issue 17471008: Rework compositor touch hit testing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix lifetime issue with Internals::m_currentTouchEventRects Created 7 years, 5 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/testing/LayerRect.h
diff --git a/Source/core/html/DOMURL.h b/Source/core/testing/LayerRect.h
similarity index 66%
copy from Source/core/html/DOMURL.h
copy to Source/core/testing/LayerRect.h
index a3784de69e5db10db6cd870aecb8ded94829b105..d0a620f554669ce9d3ffdf9184c96e0ed81d9f04 100644
--- a/Source/core/html/DOMURL.h
+++ b/Source/core/testing/LayerRect.h
@@ -1,6 +1,5 @@
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- * Copyright (C) 2012 Motorola Mobility Inc.
+ * Copyright (C) 2013 Google. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -24,30 +23,40 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DOMURL_h
-#define DOMURL_h
+#ifndef LayerRect_h
+#define LayerRect_h
+
+#include "core/dom/ClientRect.h"
-#include "wtf/Forward.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
+#include "wtf/RefPtr.h"
namespace WebCore {
-class Blob;
-class ScriptExecutionContext;
-class URLRegistrable;
-
-class DOMURL : public RefCounted<DOMURL> {
+class Node;
+class LayerRect : public RefCounted<LayerRect> {
public:
- static PassRefPtr<DOMURL> create() { return adoptRef(new DOMURL); }
-
- static String createObjectURL(ScriptExecutionContext*, Blob*);
- static void revokeObjectURL(ScriptExecutionContext*, const String&);
-
- static String createPublicURL(ScriptExecutionContext*, URLRegistrable*);
+ static PassRefPtr<LayerRect> create(PassRefPtr<Node> node, PassRefPtr<ClientRect> rect)
+ {
+ return adoptRef(new LayerRect(node, rect));
+ }
+
+ Node* layerRootNode() const { return m_layerRootNode.get(); }
+ ClientRect* layerRelativeRect() const { return m_rect.get(); }
+
+private:
+ LayerRect(PassRefPtr<Node> node, PassRefPtr<ClientRect> rect)
+ : m_layerRootNode(node)
+ , m_rect(rect)
+ {
+ }
+
+ RefPtr<Node> m_layerRootNode;
+ RefPtr<ClientRect> m_rect;
};
} // namespace WebCore
-#endif // DOMURL_h
+#endif

Powered by Google App Engine
This is Rietveld 408576698