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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
96 | 96 |
97 ScrollingCoordinator::~ScrollingCoordinator() | 97 ScrollingCoordinator::~ScrollingCoordinator() |
98 { | 98 { |
99 } | 99 } |
100 | 100 |
101 bool ScrollingCoordinator::touchHitTestingEnabled() const | 101 bool ScrollingCoordinator::touchHitTestingEnabled() const |
102 { | 102 { |
103 if (!m_page->mainFrame()->isLocalFrame()) | 103 if (!m_page->mainFrame()->isLocalFrame()) |
104 return false; | 104 return false; |
105 RenderView* contentRenderer = m_page->deprecatedLocalMainFrame()->contentRen derer(); | 105 RenderView* contentRenderer = m_page->deprecatedLocalMainFrame()->contentRen derer(); |
106 Settings* settings = m_page->mainFrame()->settings(); | 106 return RuntimeEnabledFeatures::touchEnabled() && contentRenderer && contentR enderer->usesCompositing(); |
jamesr
2014/07/21 19:31:28
i think we can delete this function completely and
Zeeshan Qureshi
2014/07/21 19:52:50
Thanks, I'll double check with Rick and update.
| |
107 return RuntimeEnabledFeatures::touchEnabled() && settings->compositorTouchHi tTesting() && contentRenderer && contentRenderer->usesCompositing(); | |
108 } | 107 } |
109 | 108 |
110 void ScrollingCoordinator::setShouldHandleScrollGestureOnMainThreadRegion(const Region& region) | 109 void ScrollingCoordinator::setShouldHandleScrollGestureOnMainThreadRegion(const Region& region) |
111 { | 110 { |
112 if (!m_page->mainFrame()->isLocalFrame()) | 111 if (!m_page->mainFrame()->isLocalFrame()) |
113 return; | 112 return; |
114 if (WebLayer* scrollLayer = toWebLayer(m_page->deprecatedLocalMainFrame()->v iew()->layerForScrolling())) { | 113 if (WebLayer* scrollLayer = toWebLayer(m_page->deprecatedLocalMainFrame()->v iew()->layerForScrolling())) { |
115 Vector<IntRect> rects = region.rects(); | 114 Vector<IntRect> rects = region.rects(); |
116 WebVector<WebRect> webRects(rects.size()); | 115 WebVector<WebRect> webRects(rects.size()); |
117 for (size_t i = 0; i < rects.size(); ++i) | 116 for (size_t i = 0; i < rects.size(); ++i) |
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
959 bool frameIsScrollable = frameView && frameView->isScrollable(); | 958 bool frameIsScrollable = frameView && frameView->isScrollable(); |
960 if (frameIsScrollable != m_wasFrameScrollable) | 959 if (frameIsScrollable != m_wasFrameScrollable) |
961 return true; | 960 return true; |
962 | 961 |
963 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : 0) | 962 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : 0) |
964 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds( ); | 963 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds( ); |
965 return false; | 964 return false; |
966 } | 965 } |
967 | 966 |
968 } // namespace WebCore | 967 } // namespace WebCore |
OLD | NEW |