| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 if (scrollLayer) { | 443 if (scrollLayer) { |
| 444 bool isForVisualViewport = | 444 bool isForVisualViewport = |
| 445 scrollableArea == &m_page->frameHost().visualViewport(); | 445 scrollableArea == &m_page->frameHost().visualViewport(); |
| 446 scrollLayer->setScrollableArea(scrollableArea, isForVisualViewport); | 446 scrollLayer->setScrollableArea(scrollableArea, isForVisualViewport); |
| 447 } | 447 } |
| 448 | 448 |
| 449 WebLayer* webLayer = toWebLayer(scrollableArea->layerForScrolling()); | 449 WebLayer* webLayer = toWebLayer(scrollableArea->layerForScrolling()); |
| 450 WebLayer* containerLayer = toWebLayer(scrollableArea->layerForContainer()); | 450 WebLayer* containerLayer = toWebLayer(scrollableArea->layerForContainer()); |
| 451 if (webLayer) { | 451 if (webLayer) { |
| 452 webLayer->setScrollClipLayer(containerLayer); | 452 webLayer->setScrollClipLayer(containerLayer); |
| 453 DoublePoint scrollPosition(scrollableArea->scrollPositionDouble() + | 453 DoublePoint scrollPosition(FloatPoint(scrollableArea->scrollOrigin()) + |
| 454 toDoubleSize(scrollableArea->scrollOrigin())); | 454 scrollableArea->scrollOffset()); |
| 455 webLayer->setScrollPositionDouble(scrollPosition); | 455 webLayer->setScrollPositionDouble(scrollPosition); |
| 456 | 456 |
| 457 webLayer->setBounds(scrollableArea->contentsSize()); | 457 webLayer->setBounds(scrollableArea->contentsSize()); |
| 458 bool canScrollX = scrollableArea->userInputScrollable(HorizontalScrollbar); | 458 bool canScrollX = scrollableArea->userInputScrollable(HorizontalScrollbar); |
| 459 bool canScrollY = scrollableArea->userInputScrollable(VerticalScrollbar); | 459 bool canScrollY = scrollableArea->userInputScrollable(VerticalScrollbar); |
| 460 webLayer->setUserScrollable(canScrollX, canScrollY); | 460 webLayer->setUserScrollable(canScrollX, canScrollY); |
| 461 } | 461 } |
| 462 if (WebScrollbarLayer* scrollbarLayer = | 462 if (WebScrollbarLayer* scrollbarLayer = |
| 463 getWebScrollbarLayer(scrollableArea, HorizontalScrollbar)) { | 463 getWebScrollbarLayer(scrollableArea, HorizontalScrollbar)) { |
| 464 GraphicsLayer* horizontalScrollbarLayer = | 464 GraphicsLayer* horizontalScrollbarLayer = |
| (...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 if (frameIsScrollable != m_wasFrameScrollable) | 1229 if (frameIsScrollable != m_wasFrameScrollable) |
| 1230 return true; | 1230 return true; |
| 1231 | 1231 |
| 1232 if (WebLayer* scrollLayer = | 1232 if (WebLayer* scrollLayer = |
| 1233 frameView ? toWebLayer(frameView->layerForScrolling()) : nullptr) | 1233 frameView ? toWebLayer(frameView->layerForScrolling()) : nullptr) |
| 1234 return WebSize(frameView->contentsSize()) != scrollLayer->bounds(); | 1234 return WebSize(frameView->contentsSize()) != scrollLayer->bounds(); |
| 1235 return false; | 1235 return false; |
| 1236 } | 1236 } |
| 1237 | 1237 |
| 1238 } // namespace blink | 1238 } // namespace blink |
| OLD | NEW |