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

Unified Diff: Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 14280004: Revert removal of events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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/page/scrolling/ScrollingCoordinator.h ('k') | Source/core/platform/PlatformEvent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/scrolling/ScrollingCoordinator.cpp
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp
index e16195fbc7fcead75dd744f1a7a6566873738834..413e592cf3aa72013114d6570190f5f00f3bd190 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -113,9 +113,11 @@ void ScrollingCoordinator::frameViewLayoutUpdated(FrameView* frameView)
// is not the main frame.
Region nonFastScrollableRegion = computeNonFastScrollableRegion(m_page->mainFrame(), IntPoint());
setNonFastScrollableRegion(nonFastScrollableRegion);
+#if ENABLE(TOUCH_EVENT_TRACKING)
Vector<IntRect> touchEventTargetRects;
computeAbsoluteTouchEventTargetRects(m_page->mainFrame()->document(), touchEventTargetRects);
setTouchEventTargetRects(touchEventTargetRects);
+#endif
if (WebLayer* scrollLayer = scrollingWebLayerForScrollableArea(frameView))
scrollLayer->setBounds(frameView->contentsSize());
}
@@ -296,6 +298,7 @@ void ScrollingCoordinator::setTouchEventTargetRects(const Vector<IntRect>& absol
void ScrollingCoordinator::touchEventTargetRectsDidChange(const Document*)
{
+#if ENABLE(TOUCH_EVENT_TRACKING)
// The rects are always evaluated and used in the main frame coordinates.
FrameView* frameView = m_page->mainFrame()->view();
Document* document = m_page->mainFrame()->document();
@@ -307,6 +310,7 @@ void ScrollingCoordinator::touchEventTargetRectsDidChange(const Document*)
Vector<IntRect> touchEventTargetRects;
computeAbsoluteTouchEventTargetRects(document, touchEventTargetRects);
setTouchEventTargetRects(touchEventTargetRects);
+#endif
}
void ScrollingCoordinator::setWheelEventHandlerCount(unsigned count)
@@ -389,6 +393,7 @@ Region ScrollingCoordinator::computeNonFastScrollableRegion(const Frame* frame,
return nonFastScrollableRegion;
}
+#if ENABLE(TOUCH_EVENT_TRACKING)
static void accumulateRendererTouchEventTargetRects(Vector<IntRect>& rects, const RenderObject* renderer, const IntRect& parentRect = IntRect())
{
IntRect adjustedParentRect = parentRect;
@@ -459,6 +464,7 @@ void ScrollingCoordinator::computeAbsoluteTouchEventTargetRects(const Document*
// FIXME: These rects won't be properly updated if the renderers are in a sub-tree that scrolls.
accumulateDocumentEventTargetRects(rects, document);
}
+#endif
unsigned ScrollingCoordinator::computeCurrentWheelEventHandlerCount()
{
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.h ('k') | Source/core/platform/PlatformEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698