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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2113483002: Make RootScroller set the outer viewport scroll layer in the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 1854 matching lines...) Expand 10 before | Expand all | Expand 10 after
1865 topControls().layoutHeight() - topControls().contentOffset(); 1865 topControls().layoutHeight() - topControls().contentOffset();
1866 visualViewport.setTopControlsAdjustment(topControlsViewportAdjustment); 1866 visualViewport.setTopControlsAdjustment(topControlsViewportAdjustment);
1867 1867
1868 // Since the FrameView is sized to be the visual viewport at minimum 1868 // Since the FrameView is sized to be the visual viewport at minimum
1869 // scale, its adjustment must also be scaled by the minimum scale. 1869 // scale, its adjustment must also be scaled by the minimum scale.
1870 view->setTopControlsViewportAdjustment( 1870 view->setTopControlsViewportAdjustment(
1871 topControlsViewportAdjustment / minimumPageScaleFactor()); 1871 topControlsViewportAdjustment / minimumPageScaleFactor());
1872 } 1872 }
1873 } 1873 }
1874 1874
1875 void WebViewImpl::didUpdateRootScrollerLayer(WebLayer* rootScrollerLayer)
1876 {
1877 if (!m_layerTreeView)
1878 return;
1879
1880 if (!page()->mainFrame() || !page()->mainFrame()->isLocalFrame())
dcheng 2016/06/29 22:34:29 I'm out of the loop on the root scroller work: is
bokan 2016/06/29 22:37:02 It is in the sense that an iframe can set document
1881 return;
1882
1883 m_layerTreeView->setRootScrollerLayer(rootScrollerLayer);
1884 }
1885
1875 TopControls& WebViewImpl::topControls() 1886 TopControls& WebViewImpl::topControls()
1876 { 1887 {
1877 return page()->frameHost().topControls(); 1888 return page()->frameHost().topControls();
1878 } 1889 }
1879 1890
1880 void WebViewImpl::resizeViewWhileAnchored( 1891 void WebViewImpl::resizeViewWhileAnchored(
1881 FrameView* view, float topControlsHeight, bool topControlsShrinkLayout) 1892 FrameView* view, float topControlsHeight, bool topControlsShrinkLayout)
1882 { 1893 {
1883 DCHECK(mainFrameImpl()); 1894 DCHECK(mainFrameImpl());
1884 1895
(...skipping 2638 matching lines...) Expand 10 before | Expand all | Expand 10 after
4523 { 4534 {
4524 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4535 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4525 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4536 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4526 if (!page()) 4537 if (!page())
4527 return 1; 4538 return 1;
4528 4539
4529 return page()->deviceScaleFactor(); 4540 return page()->deviceScaleFactor();
4530 } 4541 }
4531 4542
4532 } // namespace blink 4543 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698