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

Side by Side Diff: Source/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 134443003: Implement CSSOM Smooth Scroll API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
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 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), this); 987 m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
988 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordina tor()) 988 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordina tor())
989 scrollingCoordinator->setLayerIsContainerForFixedPositionLayers(m_sc rollLayer.get(), true); 989 scrollingCoordinator->setLayerIsContainerForFixedPositionLayers(m_sc rollLayer.get(), true);
990 990
991 // Hook them up 991 // Hook them up
992 m_overflowControlsHostLayer->addChild(m_containerLayer.get()); 992 m_overflowControlsHostLayer->addChild(m_containerLayer.get());
993 m_containerLayer->addChild(m_scrollLayer.get()); 993 m_containerLayer->addChild(m_scrollLayer.get());
994 m_scrollLayer->addChild(m_rootContentLayer.get()); 994 m_scrollLayer->addChild(m_rootContentLayer.get());
995 995
996 frameViewDidChangeSize(); 996 frameViewDidChangeSize();
997 m_renderView.frameView()->layerForScrollingDidChange();
997 } 998 }
998 999
999 // Check to see if we have to change the attachment 1000 // Check to see if we have to change the attachment
1000 if (m_rootLayerAttachment != RootLayerUnattached) 1001 if (m_rootLayerAttachment != RootLayerUnattached)
1001 detachRootLayer(); 1002 detachRootLayer();
1002 1003
1003 attachRootLayer(expectedAttachment); 1004 attachRootLayer(expectedAttachment);
1004 } 1005 }
1005 1006
1006 void RenderLayerCompositor::destroyRootLayer() 1007 void RenderLayerCompositor::destroyRootLayer()
(...skipping 30 matching lines...) Expand all
1037 1038
1038 if (m_layerForScrollCorner) { 1039 if (m_layerForScrollCorner) {
1039 m_layerForScrollCorner = nullptr; 1040 m_layerForScrollCorner = nullptr;
1040 m_renderView.frameView()->invalidateScrollCorner(m_renderView.frameView( )->scrollCornerRect()); 1041 m_renderView.frameView()->invalidateScrollCorner(m_renderView.frameView( )->scrollCornerRect());
1041 } 1042 }
1042 1043
1043 if (m_overflowControlsHostLayer) { 1044 if (m_overflowControlsHostLayer) {
1044 m_overflowControlsHostLayer = nullptr; 1045 m_overflowControlsHostLayer = nullptr;
1045 m_containerLayer = nullptr; 1046 m_containerLayer = nullptr;
1046 m_scrollLayer = nullptr; 1047 m_scrollLayer = nullptr;
1048 m_renderView.frameView()->layerForScrollingDidChange();
1047 } 1049 }
1048 ASSERT(!m_scrollLayer); 1050 ASSERT(!m_scrollLayer);
1049 m_rootContentLayer = nullptr; 1051 m_rootContentLayer = nullptr;
1050 m_rootTransformLayer = nullptr; 1052 m_rootTransformLayer = nullptr;
1051 } 1053 }
1052 1054
1053 void RenderLayerCompositor::attachRootLayer(RootLayerAttachment attachment) 1055 void RenderLayerCompositor::attachRootLayer(RootLayerAttachment attachment)
1054 { 1056 {
1055 if (!m_rootContentLayer) 1057 if (!m_rootContentLayer)
1056 return; 1058 return;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 } else if (graphicsLayer == m_scrollLayer.get()) { 1169 } else if (graphicsLayer == m_scrollLayer.get()) {
1168 name = "LocalFrame Scrolling Layer"; 1170 name = "LocalFrame Scrolling Layer";
1169 } else { 1171 } else {
1170 ASSERT_NOT_REACHED(); 1172 ASSERT_NOT_REACHED();
1171 } 1173 }
1172 1174
1173 return name; 1175 return name;
1174 } 1176 }
1175 1177
1176 } // namespace WebCore 1178 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTextControlSingleLine.cpp ('k') | Source/platform/blink_platform.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698