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 2117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2128 void RenderLayerCompositor::setTracksRepaints(bool tracksRepaints) | 2128 void RenderLayerCompositor::setTracksRepaints(bool tracksRepaints) |
2129 { | 2129 { |
2130 m_isTrackingRepaints = tracksRepaints; | 2130 m_isTrackingRepaints = tracksRepaints; |
2131 } | 2131 } |
2132 | 2132 |
2133 bool RenderLayerCompositor::isTrackingRepaints() const | 2133 bool RenderLayerCompositor::isTrackingRepaints() const |
2134 { | 2134 { |
2135 return m_isTrackingRepaints; | 2135 return m_isTrackingRepaints; |
2136 } | 2136 } |
2137 | 2137 |
2138 float RenderLayerCompositor::deviceScaleFactor() const | |
2139 { | |
2140 Page* page = this->page(); | |
2141 return page ? page->deviceScaleFactor() : 1; | |
2142 } | |
2143 | |
2144 float RenderLayerCompositor::pageScaleFactor() const | |
2145 { | |
2146 Page* page = this->page(); | |
2147 return page ? page->pageScaleFactor() : 1; | |
2148 } | |
2149 | |
2150 void RenderLayerCompositor::didCommitChangesForLayer(const GraphicsLayer*) const | 2138 void RenderLayerCompositor::didCommitChangesForLayer(const GraphicsLayer*) const |
2151 { | 2139 { |
2152 // Nothing to do here yet. | 2140 // Nothing to do here yet. |
2153 } | 2141 } |
2154 | 2142 |
2155 bool RenderLayerCompositor::keepLayersPixelAligned() const | |
2156 { | |
2157 // When scaling, attempt to align compositing layers to pixel boundaries. | |
2158 return true; | |
2159 } | |
2160 | |
2161 static bool shouldCompositeOverflowControls(FrameView* view) | 2143 static bool shouldCompositeOverflowControls(FrameView* view) |
2162 { | 2144 { |
2163 if (Page* page = view->frame()->page()) { | 2145 if (Page* page = view->frame()->page()) { |
2164 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordina
tor()) | 2146 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordina
tor()) |
2165 if (scrollingCoordinator->coordinatesScrollingForFrameView(view)) | 2147 if (scrollingCoordinator->coordinatesScrollingForFrameView(view)) |
2166 return true; | 2148 return true; |
2167 } | 2149 } |
2168 | 2150 |
2169 return true; | 2151 return true; |
2170 } | 2152 } |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2626 size_t listSize = normalFlowList->size(); | 2608 size_t listSize = normalFlowList->size(); |
2627 for (size_t i = 0; i < listSize; ++i) { | 2609 for (size_t i = 0; i < listSize; ++i) { |
2628 RenderLayer* curLayer = normalFlowList->at(i); | 2610 RenderLayer* curLayer = normalFlowList->at(i); |
2629 if (layerHas3DContent(curLayer)) | 2611 if (layerHas3DContent(curLayer)) |
2630 return true; | 2612 return true; |
2631 } | 2613 } |
2632 } | 2614 } |
2633 return false; | 2615 return false; |
2634 } | 2616 } |
2635 | 2617 |
2636 void RenderLayerCompositor::deviceOrPageScaleFactorChanged() | |
2637 { | |
2638 // Start at the RenderView's layer, since that's where the scale is applied. | |
2639 RenderLayer* viewLayer = m_renderView->layer(); | |
2640 if (!viewLayer->isComposited()) | |
2641 return; | |
2642 | |
2643 if (GraphicsLayer* rootLayer = viewLayer->backing()->childForSuperlayers()) | |
2644 rootLayer->noteDeviceOrPageScaleFactorChangedIncludingDescendants(); | |
2645 } | |
2646 | |
2647 static bool isRootmostFixedOrStickyLayer(RenderLayer* layer) | 2618 static bool isRootmostFixedOrStickyLayer(RenderLayer* layer) |
2648 { | 2619 { |
2649 if (layer->renderer()->isStickyPositioned()) | 2620 if (layer->renderer()->isStickyPositioned()) |
2650 return true; | 2621 return true; |
2651 | 2622 |
2652 if (layer->renderer()->style()->position() != FixedPosition) | 2623 if (layer->renderer()->style()->position() != FixedPosition) |
2653 return false; | 2624 return false; |
2654 | 2625 |
2655 for (RenderLayer* stackingContainer = layer->ancestorStackingContainer(); st
ackingContainer; stackingContainer = stackingContainer->ancestorStackingContaine
r()) { | 2626 for (RenderLayer* stackingContainer = layer->ancestorStackingContainer(); st
ackingContainer; stackingContainer = stackingContainer->ancestorStackingContaine
r()) { |
2656 if (stackingContainer->isComposited() && stackingContainer->renderer()->
style()->position() == FixedPosition) | 2627 if (stackingContainer->isComposited() && stackingContainer->renderer()->
style()->position() == FixedPosition) |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2778 info.addMember(m_layerForScrollCorner, "layerForScrollCorner"); | 2749 info.addMember(m_layerForScrollCorner, "layerForScrollCorner"); |
2779 #if ENABLE(RUBBER_BANDING) | 2750 #if ENABLE(RUBBER_BANDING) |
2780 info.addMember(m_layerForOverhangAreas, "layerForOverhangAreas"); | 2751 info.addMember(m_layerForOverhangAreas, "layerForOverhangAreas"); |
2781 info.addMember(m_contentShadowLayer, "contentShadowLayer"); | 2752 info.addMember(m_contentShadowLayer, "contentShadowLayer"); |
2782 info.addMember(m_layerForTopOverhangArea, "layerForTopOverhangArea"); | 2753 info.addMember(m_layerForTopOverhangArea, "layerForTopOverhangArea"); |
2783 info.addMember(m_layerForBottomOverhangArea, "layerForBottomOverhangArea"); | 2754 info.addMember(m_layerForBottomOverhangArea, "layerForBottomOverhangArea"); |
2784 #endif | 2755 #endif |
2785 } | 2756 } |
2786 | 2757 |
2787 } // namespace WebCore | 2758 } // namespace WebCore |
OLD | NEW |