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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 if (WebScrollbarLayer* scrollbarLayer = getWebScrollbarLayer(scrollableArea,
VerticalScrollbar)) { | 408 if (WebScrollbarLayer* scrollbarLayer = getWebScrollbarLayer(scrollableArea,
VerticalScrollbar)) { |
409 GraphicsLayer* verticalScrollbarLayer = scrollableArea->layerForVertical
Scrollbar(); | 409 GraphicsLayer* verticalScrollbarLayer = scrollableArea->layerForVertical
Scrollbar(); |
410 if (verticalScrollbarLayer) | 410 if (verticalScrollbarLayer) |
411 setupScrollbarLayer(verticalScrollbarLayer, scrollbarLayer, webLayer
, containerLayer); | 411 setupScrollbarLayer(verticalScrollbarLayer, scrollbarLayer, webLayer
, containerLayer); |
412 } | 412 } |
413 | 413 |
414 // Update the viewport layer registration if the outer viewport may have cha
nged. | 414 // Update the viewport layer registration if the outer viewport may have cha
nged. |
415 if (m_page->settings().rootLayerScrolls() && isForRootLayer(scrollableArea)) | 415 if (m_page->settings().rootLayerScrolls() && isForRootLayer(scrollableArea)) |
416 m_page->chrome().registerViewportLayers(); | 416 m_page->chrome().registerViewportLayers(); |
417 | 417 |
| 418 scrollableArea->layerForScrollingDidChange(); |
| 419 |
418 return !!webLayer; | 420 return !!webLayer; |
419 } | 421 } |
420 | 422 |
421 using GraphicsLayerHitTestRects = WTF::HashMap<const GraphicsLayer*, Vector<Layo
utRect>>; | 423 using GraphicsLayerHitTestRects = WTF::HashMap<const GraphicsLayer*, Vector<Layo
utRect>>; |
422 | 424 |
423 // In order to do a DFS cross-frame walk of the RenderLayer tree, we need to kno
w which | 425 // In order to do a DFS cross-frame walk of the RenderLayer tree, we need to kno
w which |
424 // RenderLayers have child frames inside of them. This computes a mapping for th
e | 426 // RenderLayers have child frames inside of them. This computes a mapping for th
e |
425 // current frame which we can consult while walking the layers of that frame. | 427 // current frame which we can consult while walking the layers of that frame. |
426 // Whenever we descend into a new frame, a new map will be created. | 428 // Whenever we descend into a new frame, a new map will be created. |
427 using LayerFrameMap = HashMap<const RenderLayer*, Vector<const LocalFrame*>>; | 429 using LayerFrameMap = HashMap<const RenderLayer*, Vector<const LocalFrame*>>; |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 bool frameIsScrollable = frameView && frameView->isScrollable(); | 1034 bool frameIsScrollable = frameView && frameView->isScrollable(); |
1033 if (frameIsScrollable != m_wasFrameScrollable) | 1035 if (frameIsScrollable != m_wasFrameScrollable) |
1034 return true; | 1036 return true; |
1035 | 1037 |
1036 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll
ing()) : nullptr) | 1038 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll
ing()) : nullptr) |
1037 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds(
); | 1039 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds(
); |
1038 return false; | 1040 return false; |
1039 } | 1041 } |
1040 | 1042 |
1041 } // namespace blink | 1043 } // namespace blink |
OLD | NEW |