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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 if (scrollLayer) { | 315 if (scrollLayer) { |
316 bool isMainFrame = isForMainFrame(scrollableArea); | 316 bool isMainFrame = isForMainFrame(scrollableArea); |
317 scrollLayer->setScrollableArea(scrollableArea, isMainFrame); | 317 scrollLayer->setScrollableArea(scrollableArea, isMainFrame); |
318 } | 318 } |
319 | 319 |
320 WebLayer* webLayer = scrollingWebLayerForScrollableArea(scrollableArea); | 320 WebLayer* webLayer = scrollingWebLayerForScrollableArea(scrollableArea); |
321 if (webLayer) { | 321 if (webLayer) { |
322 webLayer->setScrollable(true); | 322 webLayer->setScrollable(true); |
323 webLayer->setScrollPosition(IntPoint(scrollableArea->scrollPosition() -
scrollableArea->minimumScrollPosition())); | 323 webLayer->setScrollPosition(IntPoint(scrollableArea->scrollPosition() -
scrollableArea->minimumScrollPosition())); |
324 webLayer->setMaxScrollPosition(IntSize(scrollableArea->scrollSize(Horizo
ntalScrollbar), scrollableArea->scrollSize(VerticalScrollbar))); | 324 webLayer->setMaxScrollPosition(IntSize(scrollableArea->scrollSize(Horizo
ntalScrollbar), scrollableArea->scrollSize(VerticalScrollbar))); |
| 325 bool canScrollX = scrollableArea->userInputScrollable(HorizontalScrollba
r); |
| 326 bool canScrollY = scrollableArea->userInputScrollable(VerticalScrollbar)
; |
| 327 webLayer->setUserScrollable(canScrollX, canScrollY); |
325 } | 328 } |
326 if (WebScrollbarLayer* scrollbarLayer = getWebScrollbarLayer(scrollableArea,
HorizontalScrollbar)) { | 329 if (WebScrollbarLayer* scrollbarLayer = getWebScrollbarLayer(scrollableArea,
HorizontalScrollbar)) { |
327 GraphicsLayer* horizontalScrollbarLayer = horizontalScrollbarLayerForScr
ollableArea(scrollableArea); | 330 GraphicsLayer* horizontalScrollbarLayer = horizontalScrollbarLayerForScr
ollableArea(scrollableArea); |
328 if (horizontalScrollbarLayer) | 331 if (horizontalScrollbarLayer) |
329 setupScrollbarLayer(horizontalScrollbarLayer, scrollbarLayer, webLay
er); | 332 setupScrollbarLayer(horizontalScrollbarLayer, scrollbarLayer, webLay
er); |
330 } | 333 } |
331 if (WebScrollbarLayer* scrollbarLayer = getWebScrollbarLayer(scrollableArea,
VerticalScrollbar)) { | 334 if (WebScrollbarLayer* scrollbarLayer = getWebScrollbarLayer(scrollableArea,
VerticalScrollbar)) { |
332 GraphicsLayer* verticalScrollbarLayer = verticalScrollbarLayerForScrolla
bleArea(scrollableArea); | 335 GraphicsLayer* verticalScrollbarLayer = verticalScrollbarLayerForScrolla
bleArea(scrollableArea); |
333 if (verticalScrollbarLayer) | 336 if (verticalScrollbarLayer) |
334 setupScrollbarLayer(verticalScrollbarLayer, scrollbarLayer, webLayer
); | 337 setupScrollbarLayer(verticalScrollbarLayer, scrollbarLayer, webLayer
); |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 stringBuilder.resize(stringBuilder.length() - 2); | 862 stringBuilder.resize(stringBuilder.length() - 2); |
860 return stringBuilder.toString(); | 863 return stringBuilder.toString(); |
861 } | 864 } |
862 | 865 |
863 String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const | 866 String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const |
864 { | 867 { |
865 return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons()); | 868 return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons()); |
866 } | 869 } |
867 | 870 |
868 } // namespace WebCore | 871 } // namespace WebCore |
OLD | NEW |