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

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

Issue 1843603002: [Layout API] Add LocalFrame::contentLayoutItem and use in VisualViewport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 } 388 }
389 389
390 void VisualViewport::registerLayersWithTreeView(WebLayerTreeView* layerTreeView) const 390 void VisualViewport::registerLayersWithTreeView(WebLayerTreeView* layerTreeView) const
391 { 391 {
392 TRACE_EVENT0("blink", "VisualViewport::registerLayersWithTreeView"); 392 TRACE_EVENT0("blink", "VisualViewport::registerLayersWithTreeView");
393 ASSERT(layerTreeView); 393 ASSERT(layerTreeView);
394 394
395 if (!mainFrame()) 395 if (!mainFrame())
396 return; 396 return;
397 397
398 ASSERT(frameHost().page().deprecatedLocalMainFrame()->contentLayoutObject()) ; 398 ASSERT(!frameHost().page().deprecatedLocalMainFrame()->contentLayoutItem().i sNull());
399 399
400 PaintLayerCompositor* compositor = frameHost().page().deprecatedLocalMainFra me()->contentLayoutObject()->compositor(); 400 PaintLayerCompositor* compositor = frameHost().page().deprecatedLocalMainFra me()->contentLayoutItem().compositor();
401 // Get the outer viewport scroll layer. 401 // Get the outer viewport scroll layer.
402 WebLayer* scrollLayer = compositor->scrollLayer() ? compositor->scrollLayer( )->platformLayer() : 0; 402 WebLayer* scrollLayer = compositor->scrollLayer() ? compositor->scrollLayer( )->platformLayer() : 0;
403 403
404 m_webOverlayScrollbarHorizontal->setScrollLayer(scrollLayer); 404 m_webOverlayScrollbarHorizontal->setScrollLayer(scrollLayer);
405 m_webOverlayScrollbarVertical->setScrollLayer(scrollLayer); 405 m_webOverlayScrollbarVertical->setScrollLayer(scrollLayer);
406 406
407 ASSERT(compositor); 407 ASSERT(compositor);
408 layerTreeView->registerViewportLayers( 408 layerTreeView->registerViewportLayers(
409 m_overscrollElasticityLayer->platformLayer(), 409 m_overscrollElasticityLayer->platformLayer(),
410 m_pageScaleLayer->platformLayer(), 410 m_pageScaleLayer->platformLayer(),
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 } else if (graphicsLayer == m_rootTransformLayer) { 743 } else if (graphicsLayer == m_rootTransformLayer) {
744 name = "Root Transform Layer"; 744 name = "Root Transform Layer";
745 } else { 745 } else {
746 ASSERT_NOT_REACHED(); 746 ASSERT_NOT_REACHED();
747 } 747 }
748 748
749 return name; 749 return name;
750 } 750 }
751 751
752 } // namespace blink 752 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698