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

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

Issue 317373007: Report correct touch hit rects for fullscreen HTML5 video on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update description Created 6 years, 6 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/page/scrolling/ScrollingCoordinator.cpp
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp
index 44e1df16a7fe1d7cd0d587a3403a4ccef6081f5b..f2c4e57befdec2f126cda631f828e2d8ad2c84b5 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -790,13 +790,19 @@ static void accumulateDocumentTouchEventTargetRects(LayerHitTestRects& rects, co
// then we can quickly mark the entire document and skip looking at any other handlers.
// Note that technically a handler on the body doesn't cover the whole document, but it's
// reasonable to be conservative and report the whole document anyway.
- for (TouchEventTargetSet::const_iterator iter = targets->begin(); iter != targets->end(); ++iter) {
- Node* target = iter->key;
- if (target == document || target == document->documentElement() || target == document->body()) {
- if (RenderView* rendererView = document->renderView()) {
- rendererView->computeLayerHitTestRects(rects);
+ //
+ // Fullscreen HTML5 video when OverlayFullscreenVideo is enabled is implemented by replacing the
+ // root cc::layer with the video layer so doing this optimization causes the compositor to think
+ // that there are no handlers, therefore skip it.
+ if (!document->renderView()->compositor()->inOverlayFullscreenVideo()) {
+ for (TouchEventTargetSet::const_iterator iter = targets->begin(); iter != targets->end(); ++iter) {
+ Node* target = iter->key;
+ if (target == document || target == document->documentElement() || target == document->body()) {
+ if (RenderView* rendererView = document->renderView()) {
+ rendererView->computeLayerHitTestRects(rects);
+ }
+ return;
}
- return;
}
}
@@ -805,8 +811,7 @@ static void accumulateDocumentTouchEventTargetRects(LayerHitTestRects& rects, co
if (!target->inDocument())
continue;
- if (target->isDocumentNode()) {
- ASSERT(target != document);
+ if (target->isDocumentNode() && target != document) {
accumulateDocumentTouchEventTargetRects(rects, toDocument(target));
} else if (RenderObject* renderer = target->renderer()) {
// If the set also contains one of our ancestor nodes then processing

Powered by Google App Engine
This is Rietveld 408576698