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

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: Various fixes and test additions 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/LayerRectList.cpp
diff --git a/Source/core/dom/ClientRect.cpp b/Source/core/testing/LayerRectList.cpp
similarity index 72%
copy from Source/core/dom/ClientRect.cpp
copy to Source/core/testing/LayerRectList.cpp
index bff5d8091a33497146bbf2374f3161f20f5aa0a5..7216ad14855998b1923e7887c2a591460ee78e29 100644
--- a/Source/core/dom/ClientRect.cpp
+++ b/Source/core/testing/LayerRectList.cpp
@@ -20,30 +20,43 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "config.h"
+#include "core/testing/LayerRectList.h"
+
#include "core/dom/ClientRect.h"
+#include "core/dom/Node.h"
+#include "core/testing/LayerRect.h"
namespace WebCore {
-ClientRect::ClientRect()
+LayerRectList::LayerRectList()
+{
+}
+
+LayerRectList::~LayerRectList()
{
- ScriptWrappable::init(this);
}
-ClientRect::ClientRect(const IntRect& rect)
- : m_rect(rect)
+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();
}
-ClientRect::ClientRect(const FloatRect& rect)
- : m_rect(rect)
+void LayerRectList::append(PassRefPtr<Node> layerRootNode, PassRefPtr<ClientRect> layerRelativeRect)
{
- ScriptWrappable::init(this);
+ m_list.append(LayerRect::create(layerRootNode, layerRelativeRect));
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698