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

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

Issue 2140263002: Early out of registerViewportLayerWithCompositor if there's no local MainFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix 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
« 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 4175 matching lines...) Expand 10 before | Expand all | Expand 10 after
4186 } 4186 }
4187 4187
4188 bool WebViewImpl::tabsToLinks() const 4188 bool WebViewImpl::tabsToLinks() const
4189 { 4189 {
4190 return m_tabsToLinks; 4190 return m_tabsToLinks;
4191 } 4191 }
4192 4192
4193 void WebViewImpl::registerViewportLayersWithCompositor() 4193 void WebViewImpl::registerViewportLayersWithCompositor()
4194 { 4194 {
4195 DCHECK(m_layerTreeView); 4195 DCHECK(m_layerTreeView);
4196 DCHECK(page()->deprecatedLocalMainFrame()); 4196
4197 if (!page()->mainFrame() || !page()->mainFrame()->isLocalFrame())
4198 return;
4197 4199
4198 Document* document = page()->deprecatedLocalMainFrame()->document(); 4200 Document* document = page()->deprecatedLocalMainFrame()->document();
4199 4201
4200 DCHECK(document); 4202 DCHECK(document);
4201 4203
4202 // Get the outer viewport scroll layer. 4204 // Get the outer viewport scroll layer.
4203 GraphicsLayer* layoutViewportScrollLayer = 4205 GraphicsLayer* layoutViewportScrollLayer =
4204 document->rootScrollerController()->rootScrollerLayer(); 4206 document->rootScrollerController()->rootScrollerLayer();
4205 WebLayer* layoutViewportWebLayer = layoutViewportScrollLayer 4207 WebLayer* layoutViewportWebLayer = layoutViewportScrollLayer
4206 ? layoutViewportScrollLayer->platformLayer() 4208 ? layoutViewportScrollLayer->platformLayer()
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
4571 { 4573 {
4572 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4574 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4573 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4575 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4574 if (!page()) 4576 if (!page())
4575 return 1; 4577 return 1;
4576 4578
4577 return page()->deviceScaleFactor(); 4579 return page()->deviceScaleFactor();
4578 } 4580 }
4579 4581
4580 } // namespace blink 4582 } // 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