OLD | NEW |
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 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 scrollableArea->resizerCornerRect(bounds, ResizerForTouch); | 987 scrollableArea->resizerCornerRect(bounds, ResizerForTouch); |
988 // Map corner to top-frame coords. | 988 // Map corner to top-frame coords. |
989 corner = scrollableArea->box() | 989 corner = scrollableArea->box() |
990 .localToAbsoluteQuad(FloatRect(corner), | 990 .localToAbsoluteQuad(FloatRect(corner), |
991 TraverseDocumentBoundaries) | 991 TraverseDocumentBoundaries) |
992 .enclosingBoundingBox(); | 992 .enclosingBoundingBox(); |
993 shouldHandleScrollGestureOnMainThreadRegion.unite(corner); | 993 shouldHandleScrollGestureOnMainThreadRegion.unite(corner); |
994 } | 994 } |
995 } | 995 } |
996 | 996 |
997 if (const FrameView::ChildrenSet* children = frameView->children()) { | 997 if (const FrameView::PluginsSet* plugins = frameView->plugins()) { |
998 for (const Member<FrameViewBase>& child : *children) { | 998 for (const Member<PluginView>& plugin : *plugins) { |
999 if (!(*child).isPluginView()) | 999 if (plugin->wantsWheelEvents()) { |
1000 continue; | 1000 IntRect box = frameView->convertToRootFrame(plugin->frameRect()); |
1001 | |
1002 PluginView* pluginView = toPluginView(child.get()); | |
1003 if (pluginView->wantsWheelEvents()) { | |
1004 IntRect box = frameView->convertToRootFrame(pluginView->frameRect()); | |
1005 shouldHandleScrollGestureOnMainThreadRegion.unite(box); | 1001 shouldHandleScrollGestureOnMainThreadRegion.unite(box); |
1006 } | 1002 } |
1007 } | 1003 } |
1008 } | 1004 } |
1009 | 1005 |
1010 const FrameTree& tree = frame->tree(); | 1006 const FrameTree& tree = frame->tree(); |
1011 for (Frame* subFrame = tree.firstChild(); subFrame; | 1007 for (Frame* subFrame = tree.firstChild(); subFrame; |
1012 subFrame = subFrame->tree().nextSibling()) { | 1008 subFrame = subFrame->tree().nextSibling()) { |
1013 if (subFrame->isLocalFrame()) { | 1009 if (subFrame->isLocalFrame()) { |
1014 shouldHandleScrollGestureOnMainThreadRegion.unite( | 1010 shouldHandleScrollGestureOnMainThreadRegion.unite( |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1193 frameView ? toWebLayer(frameView->layoutViewportScrollableArea() | 1189 frameView ? toWebLayer(frameView->layoutViewportScrollableArea() |
1194 ->layerForScrolling()) | 1190 ->layerForScrolling()) |
1195 : nullptr) { | 1191 : nullptr) { |
1196 return WebSize(frameView->layoutViewportScrollableArea()->contentsSize()) != | 1192 return WebSize(frameView->layoutViewportScrollableArea()->contentsSize()) != |
1197 scrollLayer->bounds(); | 1193 scrollLayer->bounds(); |
1198 } | 1194 } |
1199 return false; | 1195 return false; |
1200 } | 1196 } |
1201 | 1197 |
1202 } // namespace blink | 1198 } // namespace blink |
OLD | NEW |