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

Side by Side Diff: third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 1577263004: Communicate whether passive event listeners exist to cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_passive_listeners
Patch Set: Fix nits Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 if (subFrame->isLocalFrame()) 785 if (subFrame->isLocalFrame())
786 shouldHandleScrollGestureOnMainThreadRegion.unite(computeShouldHandl eScrollGestureOnMainThreadRegion(toLocalFrame(subFrame), offset)); 786 shouldHandleScrollGestureOnMainThreadRegion.unite(computeShouldHandl eScrollGestureOnMainThreadRegion(toLocalFrame(subFrame), offset));
787 } 787 }
788 788
789 return shouldHandleScrollGestureOnMainThreadRegion; 789 return shouldHandleScrollGestureOnMainThreadRegion;
790 } 790 }
791 791
792 static void accumulateDocumentTouchEventTargetRects(LayerHitTestRects& rects, co nst Document* document) 792 static void accumulateDocumentTouchEventTargetRects(LayerHitTestRects& rects, co nst Document* document)
793 { 793 {
794 ASSERT(document); 794 ASSERT(document);
795 const EventTargetSet* targets = document->frameHost()->eventHandlerRegistry( ).eventHandlerTargets(EventHandlerRegistry::TouchEvent); 795 const EventTargetSet* targets = document->frameHost()->eventHandlerRegistry( ).eventHandlerTargets(EventHandlerRegistry::TouchEventBlocking);
796 if (!targets) 796 if (!targets)
797 return; 797 return;
798 798
799 // If there's a handler on the window, document, html or body element (fairl y common in practice), 799 // If there's a handler on the window, document, html or body element (fairl y common in practice),
800 // then we can quickly mark the entire document and skip looking at any othe r handlers. 800 // then we can quickly mark the entire document and skip looking at any othe r handlers.
801 // Note that technically a handler on the body doesn't cover the whole docum ent, but it's 801 // Note that technically a handler on the body doesn't cover the whole docum ent, but it's
802 // reasonable to be conservative and report the whole document anyway. 802 // reasonable to be conservative and report the whole document anyway.
803 // 803 //
804 // Fullscreen HTML5 video when OverlayFullscreenVideo is enabled is implemen ted by replacing the 804 // Fullscreen HTML5 video when OverlayFullscreenVideo is enabled is implemen ted by replacing the
805 // root cc::layer with the video layer so doing this optimization causes the compositor to think 805 // root cc::layer with the video layer so doing this optimization causes the compositor to think
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 bool frameIsScrollable = frameView && frameView->isScrollable(); 1051 bool frameIsScrollable = frameView && frameView->isScrollable();
1052 if (frameIsScrollable != m_wasFrameScrollable) 1052 if (frameIsScrollable != m_wasFrameScrollable)
1053 return true; 1053 return true;
1054 1054
1055 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : nullptr) 1055 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : nullptr)
1056 return WebSize(frameView->contentsSize()) != scrollLayer->bounds(); 1056 return WebSize(frameView->contentsSize()) != scrollLayer->bounds();
1057 return false; 1057 return false;
1058 } 1058 }
1059 1059
1060 } // namespace blink 1060 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/ChromeClient.h ('k') | third_party/WebKit/Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698