Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Side by Side Diff: Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 13462003: Add support for accelerated fixed root background (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@background-attachment-fixed2
Patch Set: Moved the layout tests. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 } 152 }
153 153
154 void ScrollingCoordinator::updateLayerPositionConstraint(RenderLayer* layer) 154 void ScrollingCoordinator::updateLayerPositionConstraint(RenderLayer* layer)
155 { 155 {
156 ASSERT(layer->backing()); 156 ASSERT(layer->backing());
157 RenderLayerBacking* backing = layer->backing(); 157 RenderLayerBacking* backing = layer->backing();
158 GraphicsLayer* mainLayer = backing->childForSuperlayers(); 158 GraphicsLayer* mainLayer = backing->childForSuperlayers();
159 159
160 // Avoid unnecessary commits 160 // Avoid unnecessary commits
161 clearPositionConstraintExceptForLayer(backing->ancestorClippingLayer(), main Layer); 161 clearPositionConstraintExceptForLayer(backing->ancestorClippingLayer(), main Layer);
162 clearPositionConstraintExceptForLayer(backing->contentsContainmentLayer(), m ainLayer);
163 clearPositionConstraintExceptForLayer(backing->graphicsLayer(), mainLayer); 162 clearPositionConstraintExceptForLayer(backing->graphicsLayer(), mainLayer);
164 163
165 if (WebLayer* scrollableLayer = scrollingWebLayerForGraphicsLayer(mainLayer) ) 164 if (WebLayer* scrollableLayer = scrollingWebLayerForGraphicsLayer(mainLayer) )
166 scrollableLayer->setPositionConstraint(computePositionConstraint(layer)) ; 165 scrollableLayer->setPositionConstraint(computePositionConstraint(layer)) ;
167 } 166 }
168 167
169 void ScrollingCoordinator::willDestroyScrollableArea(ScrollableArea* scrollableA rea) 168 void ScrollingCoordinator::willDestroyScrollableArea(ScrollableArea* scrollableA rea)
170 { 169 {
171 removeWebScrollbarLayer(scrollableArea, HorizontalScrollbar); 170 removeWebScrollbarLayer(scrollableArea, HorizontalScrollbar);
172 removeWebScrollbarLayer(scrollableArea, VerticalScrollbar); 171 removeWebScrollbarLayer(scrollableArea, VerticalScrollbar);
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 stringBuilder.resize(stringBuilder.length() - 2); 633 stringBuilder.resize(stringBuilder.length() - 2);
635 return stringBuilder.toString(); 634 return stringBuilder.toString();
636 } 635 }
637 636
638 String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const 637 String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const
639 { 638 {
640 return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons()); 639 return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons());
641 } 640 }
642 641
643 } // namespace WebCore 642 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698