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 |