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 87 matching lines...) Loading... |
98 for (ScrollbarMap::iterator it = m_horizontalScrollbars.begin(); it != m_hor
izontalScrollbars.end(); ++it) | 98 for (ScrollbarMap::iterator it = m_horizontalScrollbars.begin(); it != m_hor
izontalScrollbars.end(); ++it) |
99 GraphicsLayer::unregisterContentsLayer(it->value->layer()); | 99 GraphicsLayer::unregisterContentsLayer(it->value->layer()); |
100 for (ScrollbarMap::iterator it = m_verticalScrollbars.begin(); it != m_verti
calScrollbars.end(); ++it) | 100 for (ScrollbarMap::iterator it = m_verticalScrollbars.begin(); it != m_verti
calScrollbars.end(); ++it) |
101 GraphicsLayer::unregisterContentsLayer(it->value->layer()); | 101 GraphicsLayer::unregisterContentsLayer(it->value->layer()); |
102 | 102 |
103 } | 103 } |
104 | 104 |
105 bool ScrollingCoordinator::touchHitTestingEnabled() const | 105 bool ScrollingCoordinator::touchHitTestingEnabled() const |
106 { | 106 { |
107 RenderView* contentRenderer = m_page->mainFrame()->contentRenderer(); | 107 RenderView* contentRenderer = m_page->mainFrame()->contentRenderer(); |
108 return RuntimeEnabledFeatures::touchEnabled() && contentRenderer && contentR
enderer->usesCompositing(); | 108 Settings* settings = m_page->mainFrame()->document()->settings(); |
| 109 return RuntimeEnabledFeatures::touchEnabled() && settings->compositorTouchHi
tTesting() && contentRenderer && contentRenderer->usesCompositing(); |
109 } | 110 } |
110 | 111 |
111 void ScrollingCoordinator::setShouldHandleScrollGestureOnMainThreadRegion(const
Region& region) | 112 void ScrollingCoordinator::setShouldHandleScrollGestureOnMainThreadRegion(const
Region& region) |
112 { | 113 { |
113 if (WebLayer* scrollLayer = scrollingWebLayerForScrollableArea(m_page->mainF
rame()->view())) { | 114 if (WebLayer* scrollLayer = scrollingWebLayerForScrollableArea(m_page->mainF
rame()->view())) { |
114 Vector<IntRect> rects = region.rects(); | 115 Vector<IntRect> rects = region.rects(); |
115 WebVector<WebRect> webRects(rects.size()); | 116 WebVector<WebRect> webRects(rects.size()); |
116 for (size_t i = 0; i < rects.size(); ++i) | 117 for (size_t i = 0; i < rects.size(); ++i) |
117 webRects[i] = rects[i]; | 118 webRects[i] = rects[i]; |
118 scrollLayer->setNonFastScrollableRegion(webRects); | 119 scrollLayer->setNonFastScrollableRegion(webRects); |
(...skipping 736 matching lines...) Loading... |
855 stringBuilder.resize(stringBuilder.length() - 2); | 856 stringBuilder.resize(stringBuilder.length() - 2); |
856 return stringBuilder.toString(); | 857 return stringBuilder.toString(); |
857 } | 858 } |
858 | 859 |
859 String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const | 860 String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const |
860 { | 861 { |
861 return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons()); | 862 return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons()); |
862 } | 863 } |
863 | 864 |
864 } // namespace WebCore | 865 } // namespace WebCore |
OLD | NEW |