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

Unified Diff: webkit/compositor_bindings/web_layer_impl.cc

Issue 11377013: Add touchEventHandlerRegion to Layer and LayerImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed OVERRIDE from web_layer_impl Created 8 years, 1 month 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 | « webkit/compositor_bindings/web_layer_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/compositor_bindings/web_layer_impl.cc
diff --git a/webkit/compositor_bindings/web_layer_impl.cc b/webkit/compositor_bindings/web_layer_impl.cc
index c92d9891a196a5652fde90da28922145b1742a33..68414625ab15145549862dbfc8b26e055fbb4538 100644
--- a/webkit/compositor_bindings/web_layer_impl.cc
+++ b/webkit/compositor_bindings/web_layer_impl.cc
@@ -411,6 +411,24 @@ WebVector<WebRect> WebLayerImpl::nonFastScrollableRegion() const
return result;
}
+void WebLayerImpl::setTouchEventHandlerRegion(const WebVector<WebRect>& rects)
+{
+ cc::Region region;
+ for (size_t i = 0; i < rects.size(); ++i)
+ region.Union(rects[i]);
+ m_layer->setTouchEventHandlerRegion(region);
+
+}
+
+WebVector<WebRect> WebLayerImpl::touchEventHandlerRegion() const
+{
+ cc::Region::Iterator regionRects(m_layer->touchEventHandlerRegion());
+ WebVector<WebRect> result(regionRects.size());
+ for (size_t i = 0; regionRects.has_rect(); regionRects.next(), ++i)
+ result[i] = regionRects.rect();
+ return result;
+}
+
void WebLayerImpl::setIsContainerForFixedPositionLayers(bool enable)
{
m_layer->setIsContainerForFixedPositionLayers(enable);
« no previous file with comments | « webkit/compositor_bindings/web_layer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698