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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 setupScrollbarLayer(horizontalScrollbarLayer, scrollbarLayer, webLay
er); | 410 setupScrollbarLayer(horizontalScrollbarLayer, scrollbarLayer, webLay
er); |
411 } | 411 } |
412 if (WebScrollbarLayer* scrollbarLayer = getWebScrollbarLayer(scrollableArea,
VerticalScrollbar)) { | 412 if (WebScrollbarLayer* scrollbarLayer = getWebScrollbarLayer(scrollableArea,
VerticalScrollbar)) { |
413 GraphicsLayer* verticalScrollbarLayer = scrollableArea->layerForVertical
Scrollbar(); | 413 GraphicsLayer* verticalScrollbarLayer = scrollableArea->layerForVertical
Scrollbar(); |
414 | 414 |
415 if (verticalScrollbarLayer) | 415 if (verticalScrollbarLayer) |
416 setupScrollbarLayer(verticalScrollbarLayer, scrollbarLayer, webLayer
); | 416 setupScrollbarLayer(verticalScrollbarLayer, scrollbarLayer, webLayer
); |
417 } | 417 } |
418 | 418 |
419 // Update the viewport layer registration if the outer viewport may have cha
nged. | 419 // Update the viewport layer registration if the outer viewport may have cha
nged. |
420 if (m_page->settings().rootLayerScrolls() && isForRootLayer(scrollableArea)) | 420 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled() && isForRootLayer(sc
rollableArea)) |
421 m_page->chromeClient().registerViewportLayers(); | 421 m_page->chromeClient().registerViewportLayers(); |
422 | 422 |
423 scrollableArea->layerForScrollingDidChange(m_programmaticScrollAnimatorTimel
ine.get()); | 423 scrollableArea->layerForScrollingDidChange(m_programmaticScrollAnimatorTimel
ine.get()); |
424 | 424 |
425 return !!webLayer; | 425 return !!webLayer; |
426 } | 426 } |
427 | 427 |
428 using GraphicsLayerHitTestRects = WTF::HashMap<const GraphicsLayer*, Vector<Layo
utRect>>; | 428 using GraphicsLayerHitTestRects = WTF::HashMap<const GraphicsLayer*, Vector<Layo
utRect>>; |
429 | 429 |
430 // In order to do a DFS cross-frame walk of the Layer tree, we need to know whic
h | 430 // In order to do a DFS cross-frame walk of the Layer tree, we need to know whic
h |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 bool frameIsScrollable = frameView && frameView->isScrollable(); | 1069 bool frameIsScrollable = frameView && frameView->isScrollable(); |
1070 if (frameIsScrollable != m_wasFrameScrollable) | 1070 if (frameIsScrollable != m_wasFrameScrollable) |
1071 return true; | 1071 return true; |
1072 | 1072 |
1073 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll
ing()) : nullptr) | 1073 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll
ing()) : nullptr) |
1074 return WebSize(frameView->contentsSize()) != scrollLayer->bounds(); | 1074 return WebSize(frameView->contentsSize()) != scrollLayer->bounds(); |
1075 return false; | 1075 return false; |
1076 } | 1076 } |
1077 | 1077 |
1078 } // namespace blink | 1078 } // namespace blink |
OLD | NEW |