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 2238343002: Remove apparently redundant uses of updatePageOverlays in WebViewImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 years, 4 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 | « no previous file | 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) 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 3808 matching lines...) Expand 10 before | Expand all | Expand 10 after
3819 } 3819 }
3820 3820
3821 if (m_client) { 3821 if (m_client) {
3822 if (m_layerTreeView) { 3822 if (m_layerTreeView) {
3823 updateLayerTreeViewport(); 3823 updateLayerTreeViewport();
3824 } else { 3824 } else {
3825 WebRect damagedRect(0, 0, m_size.width, m_size.height); 3825 WebRect damagedRect(0, 0, m_size.width, m_size.height);
3826 m_client->widgetClient()->didInvalidateRect(damagedRect); 3826 m_client->widgetClient()->didInvalidateRect(damagedRect);
3827 } 3827 }
3828 } 3828 }
3829 updatePageOverlays();
3830 } 3829 }
3831 3830
3832 void WebViewImpl::configureAutoResizeMode() 3831 void WebViewImpl::configureAutoResizeMode()
3833 { 3832 {
3834 if (!mainFrameImpl() || !mainFrameImpl()->frame() || !mainFrameImpl()->frame ()->view()) 3833 if (!mainFrameImpl() || !mainFrameImpl()->frame() || !mainFrameImpl()->frame ()->view())
3835 return; 3834 return;
3836 3835
3837 if (m_shouldAutoResize) 3836 if (m_shouldAutoResize)
3838 mainFrameImpl()->frame()->view()->enableAutoSizeMode(m_minAutoSize, m_ma xAutoSize); 3837 mainFrameImpl()->frame()->view()->enableAutoSizeMode(m_minAutoSize, m_ma xAutoSize);
3839 else 3838 else
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
4081 4080
4082 FrameView* view = webframe->frame()->view(); 4081 FrameView* view = webframe->frame()->view();
4083 4082
4084 postLayoutResize(webframe); 4083 postLayoutResize(webframe);
4085 4084
4086 // Relayout immediately to avoid violating the rule that needsLayout() 4085 // Relayout immediately to avoid violating the rule that needsLayout()
4087 // isn't set at the end of a layout. 4086 // isn't set at the end of a layout.
4088 if (view->needsLayout()) 4087 if (view->needsLayout())
4089 view->layout(); 4088 view->layout();
4090 4089
4090 updatePageOverlays();
4091
4091 m_fullscreenController->didUpdateLayout(); 4092 m_fullscreenController->didUpdateLayout();
4092
4093 m_client->didUpdateLayout(); 4093 m_client->didUpdateLayout();
4094 } 4094 }
4095 4095
4096 void WebViewImpl::didChangeContentsSize() 4096 void WebViewImpl::didChangeContentsSize()
4097 { 4097 {
4098 pageScaleConstraintsSet().didChangeContentsSize(contentsSize(), pageScaleFac tor()); 4098 pageScaleConstraintsSet().didChangeContentsSize(contentsSize(), pageScaleFac tor());
4099 } 4099 }
4100 4100
4101 void WebViewImpl::pageScaleFactorChanged() 4101 void WebViewImpl::pageScaleFactorChanged()
4102 { 4102 {
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
4265 visualViewport.attachToLayerTree(layer); 4265 visualViewport.attachToLayerTree(layer);
4266 if (layer) { 4266 if (layer) {
4267 m_rootGraphicsLayer = visualViewport.rootGraphicsLayer(); 4267 m_rootGraphicsLayer = visualViewport.rootGraphicsLayer();
4268 m_visualViewportContainerLayer = visualViewport.containerLayer(); 4268 m_visualViewportContainerLayer = visualViewport.containerLayer();
4269 m_rootLayer = m_rootGraphicsLayer->platformLayer(); 4269 m_rootLayer = m_rootGraphicsLayer->platformLayer();
4270 updateRootLayerTransform(); 4270 updateRootLayerTransform();
4271 m_layerTreeView->setRootLayer(*m_rootLayer); 4271 m_layerTreeView->setRootLayer(*m_rootLayer);
4272 // We register viewport layers here since there may not be a layer 4272 // We register viewport layers here since there may not be a layer
4273 // tree view prior to this point. 4273 // tree view prior to this point.
4274 registerViewportLayersWithCompositor(); 4274 registerViewportLayersWithCompositor();
4275 updatePageOverlays(); 4275
4276 // TODO(enne): Work around page visibility changes not being 4276 // TODO(enne): Work around page visibility changes not being
4277 // propagated to the WebView in some circumstances. This needs to 4277 // propagated to the WebView in some circumstances. This needs to
4278 // be refreshed here when setting a new root layer to avoid being 4278 // be refreshed here when setting a new root layer to avoid being
4279 // stuck in a presumed incorrectly invisible state. 4279 // stuck in a presumed incorrectly invisible state.
4280 m_layerTreeView->setVisible(page()->isPageVisible()); 4280 m_layerTreeView->setVisible(page()->isPageVisible());
4281 } else { 4281 } else {
4282 m_rootGraphicsLayer = nullptr; 4282 m_rootGraphicsLayer = nullptr;
4283 m_visualViewportContainerLayer = nullptr; 4283 m_visualViewportContainerLayer = nullptr;
4284 m_rootLayer = nullptr; 4284 m_rootLayer = nullptr;
4285 // This means that we're transitioning to a new page. Suppress 4285 // This means that we're transitioning to a new page. Suppress
4286 // commits until Blink generates invalidations so we don't 4286 // commits until Blink generates invalidations so we don't
4287 // attempt to paint too early in the next page load. 4287 // attempt to paint too early in the next page load.
4288 m_layerTreeView->setDeferCommits(true); 4288 m_layerTreeView->setDeferCommits(true);
4289 m_layerTreeView->clearRootLayer(); 4289 m_layerTreeView->clearRootLayer();
4290 m_layerTreeView->clearViewportLayers(); 4290 m_layerTreeView->clearViewportLayers();
4291 } 4291 }
4292 } 4292 }
4293 4293
4294 void WebViewImpl::invalidateRect(const IntRect& rect) 4294 void WebViewImpl::invalidateRect(const IntRect& rect)
4295 { 4295 {
4296 if (m_layerTreeView) 4296 if (m_layerTreeView) {
4297 updateLayerTreeViewport(); 4297 updateLayerTreeViewport();
4298 else if (m_client) 4298 } else if (m_client) {
4299 // This is only for WebViewPlugin.
4299 m_client->widgetClient()->didInvalidateRect(rect); 4300 m_client->widgetClient()->didInvalidateRect(rect);
4301 }
4300 } 4302 }
4301 4303
4302 PaintLayerCompositor* WebViewImpl::compositor() const 4304 PaintLayerCompositor* WebViewImpl::compositor() const
4303 { 4305 {
4304 WebLocalFrameImpl* frame = mainFrameImpl(); 4306 WebLocalFrameImpl* frame = mainFrameImpl();
4305 if (!frame) 4307 if (!frame)
4306 return nullptr; 4308 return nullptr;
4307 4309
4308 Document* document = frame->frame()->document(); 4310 Document* document = frame->frame()->document();
4309 if (!document || document->layoutViewItem().isNull()) 4311 if (!document || document->layoutViewItem().isNull())
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
4611 return nullptr; 4613 return nullptr;
4612 return focusedFrame; 4614 return focusedFrame;
4613 } 4615 }
4614 4616
4615 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const 4617 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const
4616 { 4618 {
4617 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4619 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4618 } 4620 }
4619 4621
4620 } // namespace blink 4622 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698