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

Side by Side Diff: third_party/WebKit/Source/core/frame/VisualViewport.cpp

Issue 1526093006: Fix paint code so that overlays and views paint their own layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 setScaleAndLocation(newPageScale, newLocation); 266 setScaleAndLocation(newPageScale, newLocation);
267 return true; 267 return true;
268 } 268 }
269 269
270 // Modifies the top of the graphics layer tree to add layers needed to support 270 // Modifies the top of the graphics layer tree to add layers needed to support
271 // the inner/outer viewport fixed-position model for pinch zoom. When finished, 271 // the inner/outer viewport fixed-position model for pinch zoom. When finished,
272 // the tree will look like this (with * denoting added layers): 272 // the tree will look like this (with * denoting added layers):
273 // 273 //
274 // *rootTransformLayer 274 // *rootTransformLayer
275 // +- *innerViewportContainerLayer (fixed pos container) 275 // +- *innerViewportContainerLayer (fixed pos container)
276 // | +- *overscrollElasticityLayer 276 // +- *overscrollElasticityLayer
277 // | +- *pageScaleLayer 277 // | +- *pageScaleLayer
278 // | +- *innerViewportScrollLayer 278 // | +- *innerViewportScrollLayer
279 // | +-- overflowControlsHostLayer (root layer) 279 // | +-- overflowControlsHostLayer (root layer) [ owned by PaintLa yerCompositor ]
280 // | +-- outerViewportContainerLayer (fixed pos container) [f rame container layer in PaintLayerCompositor] 280 // | +-- outerViewportContainerLayer (fixed pos container) [fr ame container layer in PaintLayerCompositor]
281 // | | +-- outerViewportScrollLayer [frame scroll layer in PaintLayerCompositor] 281 // | | +-- outerViewportScrollLayer [frame scroll layer in P aintLayerCompositor]
282 // | | +-- content layers ... 282 // | | +-- content layers ...
283 // +- horizontalScrollbarLayer 283 // +- *PageOverlay for InspectorOverlay
284 // +- verticalScrollbarLayer 284 // +- *PageOverlay for ColorOverlay
285 // +- scroll corner (non-overlay only) 285 // +- horizontalScrollbarLayer [ owned by PaintLayerCompositor ]
286 // +- verticalScrollbarLayer [ owned by PaintLayerCompositor ]
287 // +- scroll corner (non-overlay only) [ owned by PaintLayerCompositor ]
286 // 288 //
287 void VisualViewport::attachToLayerTree(GraphicsLayer* currentLayerTreeRoot, Grap hicsLayerFactory* graphicsLayerFactory) 289 void VisualViewport::attachToLayerTree(GraphicsLayer* currentLayerTreeRoot, Grap hicsLayerFactory* graphicsLayerFactory)
288 { 290 {
289 TRACE_EVENT1("blink", "VisualViewport::attachToLayerTree", "currentLayerTree Root", (bool)currentLayerTreeRoot); 291 TRACE_EVENT1("blink", "VisualViewport::attachToLayerTree", "currentLayerTree Root", (bool)currentLayerTreeRoot);
290 if (!currentLayerTreeRoot) { 292 if (!currentLayerTreeRoot) {
291 if (m_innerViewportScrollLayer) 293 if (m_innerViewportScrollLayer)
292 m_innerViewportScrollLayer->removeAllChildren(); 294 m_innerViewportScrollLayer->removeAllChildren();
293 return; 295 return;
294 } 296 }
295 297
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 } else if (graphicsLayer == m_rootTransformLayer) { 748 } else if (graphicsLayer == m_rootTransformLayer) {
747 name = "Root Transform Layer"; 749 name = "Root Transform Layer";
748 } else { 750 } else {
749 ASSERT_NOT_REACHED(); 751 ASSERT_NOT_REACHED();
750 } 752 }
751 753
752 return name; 754 return name;
753 } 755 }
754 756
755 } // namespace blink 757 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698