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

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

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/LayerRectList.h ('k') | Source/core/testing/LayerRectList.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/LayerRectList.cpp
diff --git a/Source/core/html/ime/Composition.cpp b/Source/core/testing/LayerRectList.cpp
similarity index 75%
copy from Source/core/html/ime/Composition.cpp
copy to Source/core/testing/LayerRectList.cpp
index e74501bcd8637afa85872dae701e91f04827e1ee..578b407a6f499f084798bd36ba2d7d3ce9452d21 100644
--- a/Source/core/html/ime/Composition.cpp
+++ b/Source/core/testing/LayerRectList.cpp
@@ -29,27 +29,38 @@
*/
#include "config.h"
-#include "core/html/ime/Composition.h"
+#include "core/testing/LayerRectList.h"
+#include "core/dom/ClientRect.h"
#include "core/dom/Node.h"
-#include "core/dom/Range.h"
+#include "core/testing/LayerRect.h"
namespace WebCore {
-Composition::~Composition()
+LayerRectList::LayerRectList()
{
}
-PassRefPtr<Composition> Composition::create(Node* text, Range* caret)
+LayerRectList::~LayerRectList()
{
- return adoptRef(new Composition(text, caret));
}
-Composition::Composition(Node* text, Range* caret)
- : m_text(text)
- , m_caret(caret)
+unsigned LayerRectList::length() const
{
- ScriptWrappable::init(this);
+ return m_list.size();
+}
+
+LayerRect* LayerRectList::item(unsigned index)
+{
+ if (index >= m_list.size())
+ return 0;
+
+ return m_list[index].get();
+}
+
+void LayerRectList::append(PassRefPtr<Node> layerRootNode, PassRefPtr<ClientRect> layerRelativeRect)
+{
+ m_list.append(LayerRect::create(layerRootNode, layerRelativeRect));
}
} // namespace WebCore
« no previous file with comments | « Source/core/testing/LayerRectList.h ('k') | Source/core/testing/LayerRectList.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698