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

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

Issue 2728253002: Remove indirection: setup scrollbar scroll layers in the scrollbar constructor (Closed)
Patch Set: Really fix reivewer comment Created 3 years, 9 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 3806 matching lines...) Expand 10 before | Expand all | Expand 10 after
3817 DCHECK(document); 3817 DCHECK(document);
3818 3818
3819 // Get the outer viewport scroll layer. 3819 // Get the outer viewport scroll layer.
3820 GraphicsLayer* layoutViewportScrollLayer = 3820 GraphicsLayer* layoutViewportScrollLayer =
3821 page()->frameHost().globalRootScrollerController().rootScrollerLayer(); 3821 page()->frameHost().globalRootScrollerController().rootScrollerLayer();
3822 WebLayer* layoutViewportWebLayer = 3822 WebLayer* layoutViewportWebLayer =
3823 layoutViewportScrollLayer ? layoutViewportScrollLayer->platformLayer() 3823 layoutViewportScrollLayer ? layoutViewportScrollLayer->platformLayer()
3824 : nullptr; 3824 : nullptr;
3825 3825
3826 VisualViewport& visualViewport = page()->frameHost().visualViewport(); 3826 VisualViewport& visualViewport = page()->frameHost().visualViewport();
3827
3828 // TODO(bokan): This was moved here from when registerViewportLayers was a
3829 // part of VisualViewport and maybe doesn't belong here. See comment inside
3830 // the mehtod.
3831 visualViewport.setScrollLayerOnScrollbars(layoutViewportWebLayer);
3832
3833 m_layerTreeView->registerViewportLayers( 3827 m_layerTreeView->registerViewportLayers(
3834 visualViewport.overscrollElasticityLayer()->platformLayer(), 3828 visualViewport.overscrollElasticityLayer()->platformLayer(),
3835 visualViewport.pageScaleLayer()->platformLayer(), 3829 visualViewport.pageScaleLayer()->platformLayer(),
3836 visualViewport.scrollLayer()->platformLayer(), layoutViewportWebLayer); 3830 visualViewport.scrollLayer()->platformLayer(), layoutViewportWebLayer);
3837 } 3831 }
3838 3832
3839 void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* graphicsLayer) { 3833 void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* graphicsLayer) {
3840 if (!m_layerTreeView) 3834 if (!m_layerTreeView)
3841 return; 3835 return;
3842 3836
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
4166 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) 4160 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame())
4167 return nullptr; 4161 return nullptr;
4168 return focusedFrame; 4162 return focusedFrame;
4169 } 4163 }
4170 4164
4171 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { 4165 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const {
4172 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4166 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4173 } 4167 }
4174 4168
4175 } // namespace blink 4169 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698