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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 GraphicsLayer* horizontalScrollbarLayer = scrollableArea->layerForHorizo
ntalScrollbar(); | 383 GraphicsLayer* horizontalScrollbarLayer = scrollableArea->layerForHorizo
ntalScrollbar(); |
384 if (horizontalScrollbarLayer) | 384 if (horizontalScrollbarLayer) |
385 setupScrollbarLayer(horizontalScrollbarLayer, scrollbarLayer, webLay
er, containerLayer); | 385 setupScrollbarLayer(horizontalScrollbarLayer, scrollbarLayer, webLay
er, containerLayer); |
386 } | 386 } |
387 if (WebScrollbarLayer* scrollbarLayer = getWebScrollbarLayer(scrollableArea,
VerticalScrollbar)) { | 387 if (WebScrollbarLayer* scrollbarLayer = getWebScrollbarLayer(scrollableArea,
VerticalScrollbar)) { |
388 GraphicsLayer* verticalScrollbarLayer = scrollableArea->layerForVertical
Scrollbar(); | 388 GraphicsLayer* verticalScrollbarLayer = scrollableArea->layerForVertical
Scrollbar(); |
389 if (verticalScrollbarLayer) | 389 if (verticalScrollbarLayer) |
390 setupScrollbarLayer(verticalScrollbarLayer, scrollbarLayer, webLayer
, containerLayer); | 390 setupScrollbarLayer(verticalScrollbarLayer, scrollbarLayer, webLayer
, containerLayer); |
391 } | 391 } |
392 | 392 |
| 393 scrollableArea->layerForScrollingDidChange(); |
393 return !!webLayer; | 394 return !!webLayer; |
394 } | 395 } |
395 | 396 |
396 typedef WTF::HashMap<const GraphicsLayer*, Vector<LayoutRect> > GraphicsLayerHit
TestRects; | 397 typedef WTF::HashMap<const GraphicsLayer*, Vector<LayoutRect> > GraphicsLayerHit
TestRects; |
397 | 398 |
398 // In order to do a DFS cross-frame walk of the RenderLayer tree, we need to kno
w which | 399 // In order to do a DFS cross-frame walk of the RenderLayer tree, we need to kno
w which |
399 // RenderLayers have child frames inside of them. This computes a mapping for th
e | 400 // RenderLayers have child frames inside of them. This computes a mapping for th
e |
400 // current frame which we can consult while walking the layers of that frame. | 401 // current frame which we can consult while walking the layers of that frame. |
401 // Whenever we descend into a new frame, a new map will be created. | 402 // Whenever we descend into a new frame, a new map will be created. |
402 typedef HashMap<const RenderLayer*, Vector<const LocalFrame*> > LayerFrameMap; | 403 typedef HashMap<const RenderLayer*, Vector<const LocalFrame*> > LayerFrameMap; |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
961 bool frameIsScrollable = frameView && frameView->isScrollable(); | 962 bool frameIsScrollable = frameView && frameView->isScrollable(); |
962 if (frameIsScrollable != m_wasFrameScrollable) | 963 if (frameIsScrollable != m_wasFrameScrollable) |
963 return true; | 964 return true; |
964 | 965 |
965 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll
ing()) : 0) | 966 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll
ing()) : 0) |
966 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds(
); | 967 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds(
); |
967 return false; | 968 return false; |
968 } | 969 } |
969 | 970 |
970 } // namespace WebCore | 971 } // namespace WebCore |
OLD | NEW |