| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 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 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 } | 1122 } |
| 1123 | 1123 |
| 1124 void RenderLayerCompositor::frameViewDidChangeLocation(const IntPoint& contentsO
ffset) | 1124 void RenderLayerCompositor::frameViewDidChangeLocation(const IntPoint& contentsO
ffset) |
| 1125 { | 1125 { |
| 1126 if (m_overflowControlsHostLayer) | 1126 if (m_overflowControlsHostLayer) |
| 1127 m_overflowControlsHostLayer->setPosition(contentsOffset); | 1127 m_overflowControlsHostLayer->setPosition(contentsOffset); |
| 1128 } | 1128 } |
| 1129 | 1129 |
| 1130 void RenderLayerCompositor::frameViewDidChangeSize() | 1130 void RenderLayerCompositor::frameViewDidChangeSize() |
| 1131 { | 1131 { |
| 1132 FrameView* frameView = m_renderView->frameView(); |
| 1132 if (m_containerLayer) { | 1133 if (m_containerLayer) { |
| 1133 FrameView* frameView = m_renderView->frameView(); | |
| 1134 m_containerLayer->setSize(frameView->unscaledVisibleContentSize()); | 1134 m_containerLayer->setSize(frameView->unscaledVisibleContentSize()); |
| 1135 | 1135 |
| 1136 frameViewDidScroll(); | 1136 frameViewDidScroll(); |
| 1137 updateOverflowControlsLayers(); | 1137 updateOverflowControlsLayers(); |
| 1138 | 1138 |
| 1139 #if ENABLE(RUBBER_BANDING) | 1139 #if ENABLE(RUBBER_BANDING) |
| 1140 if (m_layerForOverhangAreas) | 1140 if (m_layerForOverhangAreas) |
| 1141 m_layerForOverhangAreas->setSize(frameView->frameRect().size()); | 1141 m_layerForOverhangAreas->setSize(frameView->frameRect().size()); |
| 1142 #endif | 1142 #endif |
| 1143 } | 1143 } |
| 1144 if (m_overflowControlsHostLayer) |
| 1145 m_overflowControlsHostLayer->setSize(frameView->unscaledVisibleContentSi
ze(ScrollableArea::IncludeScrollbars)); |
| 1144 } | 1146 } |
| 1145 | 1147 |
| 1146 void RenderLayerCompositor::frameViewDidScroll() | 1148 void RenderLayerCompositor::frameViewDidScroll() |
| 1147 { | 1149 { |
| 1148 FrameView* frameView = m_renderView->frameView(); | 1150 FrameView* frameView = m_renderView->frameView(); |
| 1149 IntPoint scrollPosition = frameView->scrollPosition(); | 1151 IntPoint scrollPosition = frameView->scrollPosition(); |
| 1150 | 1152 |
| 1151 if (!m_scrollLayer) | 1153 if (!m_scrollLayer) |
| 1152 return; | 1154 return; |
| 1153 | 1155 |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1481 clearBackingForLayerIncludingDescendants(m_renderView->layer()); | 1483 clearBackingForLayerIncludingDescendants(m_renderView->layer()); |
| 1482 } | 1484 } |
| 1483 | 1485 |
| 1484 void RenderLayerCompositor::updateRootLayerPosition() | 1486 void RenderLayerCompositor::updateRootLayerPosition() |
| 1485 { | 1487 { |
| 1486 if (m_rootContentLayer) { | 1488 if (m_rootContentLayer) { |
| 1487 const IntRect& documentRect = m_renderView->documentRect(); | 1489 const IntRect& documentRect = m_renderView->documentRect(); |
| 1488 m_rootContentLayer->setSize(documentRect.size()); | 1490 m_rootContentLayer->setSize(documentRect.size()); |
| 1489 m_rootContentLayer->setPosition(documentRect.location()); | 1491 m_rootContentLayer->setPosition(documentRect.location()); |
| 1490 } | 1492 } |
| 1491 if (m_containerLayer) { | 1493 FrameView* frameView = m_renderView->frameView(); |
| 1492 FrameView* frameView = m_renderView->frameView(); | 1494 if (m_containerLayer) |
| 1493 m_containerLayer->setSize(frameView->unscaledVisibleContentSize()); | 1495 m_containerLayer->setSize(frameView->unscaledVisibleContentSize()); |
| 1494 } | 1496 if (m_overflowControlsHostLayer) |
| 1497 m_overflowControlsHostLayer->setSize(frameView->unscaledVisibleContentSi
ze(ScrollableArea::IncludeScrollbars)); |
| 1495 | 1498 |
| 1496 #if ENABLE(RUBBER_BANDING) | 1499 #if ENABLE(RUBBER_BANDING) |
| 1497 if (m_contentShadowLayer) { | 1500 if (m_contentShadowLayer) { |
| 1498 m_contentShadowLayer->setPosition(m_rootContentLayer->position()); | 1501 m_contentShadowLayer->setPosition(m_rootContentLayer->position()); |
| 1499 | 1502 |
| 1500 FloatSize rootContentLayerSize = m_rootContentLayer->size(); | 1503 FloatSize rootContentLayerSize = m_rootContentLayer->size(); |
| 1501 if (m_contentShadowLayer->size() != rootContentLayerSize) { | 1504 if (m_contentShadowLayer->size() != rootContentLayerSize) { |
| 1502 m_contentShadowLayer->setSize(rootContentLayerSize); | 1505 m_contentShadowLayer->setSize(rootContentLayerSize); |
| 1503 ScrollbarTheme::theme()->setUpContentShadowLayer(m_contentShadowLaye
r.get()); | 1506 ScrollbarTheme::theme()->setUpContentShadowLayer(m_contentShadowLaye
r.get()); |
| 1504 } | 1507 } |
| (...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2715 | 2718 |
| 2716 Page* RenderLayerCompositor::page() const | 2719 Page* RenderLayerCompositor::page() const |
| 2717 { | 2720 { |
| 2718 if (Frame* frame = m_renderView->frameView()->frame()) | 2721 if (Frame* frame = m_renderView->frameView()->frame()) |
| 2719 return frame->page(); | 2722 return frame->page(); |
| 2720 | 2723 |
| 2721 return 0; | 2724 return 0; |
| 2722 } | 2725 } |
| 2723 | 2726 |
| 2724 } // namespace WebCore | 2727 } // namespace WebCore |
| OLD | NEW |