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

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: CR feedback - accumulate LayoutRects instead of IntRects, disable when page isn't composited. Also… 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
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | Source/core/testing/LayerRect.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/LayerRect.h
diff --git a/Source/core/html/ime/Composition.h b/Source/core/testing/LayerRect.h
similarity index 73%
copy from Source/core/html/ime/Composition.h
copy to Source/core/testing/LayerRect.h
index 6562b5f75fd19cc8e80409327f7f8a5881bcf1df..f945681417ff788255e29f66eca4932b87855dd2 100644
--- a/Source/core/html/ime/Composition.h
+++ b/Source/core/testing/LayerRect.h
@@ -28,10 +28,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef Composition_h
-#define Composition_h
+#ifndef LayerRect_h
+#define LayerRect_h
+
+#include "core/dom/ClientRect.h"
-#include "bindings/v8/ScriptWrappable.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
#include "wtf/RefPtr.h"
@@ -39,23 +40,28 @@
namespace WebCore {
class Node;
-class Range;
-class Composition : public RefCounted<Composition>, public ScriptWrappable {
+class LayerRect : public RefCounted<LayerRect> {
public:
- static PassRefPtr<Composition> create(Node*, Range*);
- ~Composition();
+ static PassRefPtr<LayerRect> create(PassRefPtr<Node> node, PassRefPtr<ClientRect> rect)
+ {
+ return adoptRef(new LayerRect(node, rect));
+ }
- Node* text() const { return m_text.get(); }
- Range* caret() const { return m_caret.get(); }
+ Node* layerRootNode() const { return m_layerRootNode.get(); }
+ ClientRect* layerRelativeRect() const { return m_rect.get(); }
private:
- Composition(Node*, Range*);
+ LayerRect(PassRefPtr<Node> node, PassRefPtr<ClientRect> rect)
+ : m_layerRootNode(node)
+ , m_rect(rect)
+ {
+ }
- RefPtr<Node> m_text;
- RefPtr<Range> m_caret;
+ RefPtr<Node> m_layerRootNode;
+ RefPtr<ClientRect> m_rect;
};
} // namespace WebCore
-#endif // Composition_h
+#endif
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | Source/core/testing/LayerRect.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698