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

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

Issue 604463004: Remove default args to several PageWidgetDelegate members, try 2. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add a NULL check Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/WebPagePopupImpl.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) 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 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1812 IntSize(), 0, false, false, false, false, 1812 IntSize(), 0, false, false, false, false,
1813 0, 0, 0, 0); 1813 0, 0, 0, 0);
1814 1814
1815 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS crollEvent); 1815 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS crollEvent);
1816 } 1816 }
1817 } 1817 }
1818 1818
1819 if (!m_page) 1819 if (!m_page)
1820 return; 1820 return;
1821 1821
1822 PageWidgetDelegate::animate(m_page.get(), validFrameTime.lastFrameTimeMonoto nic); 1822 // FIXME: This should probably be using the local root?
1823 if (m_page->mainFrame()->isLocalFrame())
1824 PageWidgetDelegate::animate(m_page.get(), validFrameTime.lastFrameTimeMo notonic, m_page->deprecatedLocalMainFrame());
1823 1825
1824 if (m_continuousPaintingEnabled) { 1826 if (m_continuousPaintingEnabled) {
1825 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageO verlays.get()); 1827 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageO verlays.get());
1826 m_client->scheduleAnimation(); 1828 m_client->scheduleAnimation();
1827 } 1829 }
1828 } 1830 }
1829 1831
1830 void WebViewImpl::didCommitFrameToCompositor() 1832 void WebViewImpl::didCommitFrameToCompositor()
1831 { 1833 {
1832 Scheduler::shared()->didCommitFrameToCompositor(); 1834 Scheduler::shared()->didCommitFrameToCompositor();
(...skipping 15 matching lines...) Expand all
1848 m_devToolsAgent->didLayout(); 1850 m_devToolsAgent->didLayout();
1849 } 1851 }
1850 1852
1851 void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect) 1853 void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect)
1852 { 1854 {
1853 // This should only be used when compositing is not being used for this 1855 // This should only be used when compositing is not being used for this
1854 // WebView, and it is painting into the recording of its parent. 1856 // WebView, and it is painting into the recording of its parent.
1855 ASSERT(!isAcceleratedCompositingActive()); 1857 ASSERT(!isAcceleratedCompositingActive());
1856 1858
1857 double paintStart = currentTime(); 1859 double paintStart = currentTime();
1858 PageWidgetDelegate::paint(m_page.get(), pageOverlays(), canvas, rect, isTran sparent() ? PageWidgetDelegate::Translucent : PageWidgetDelegate::Opaque); 1860 PageWidgetDelegate::paint(m_page.get(), pageOverlays(), canvas, rect, isTran sparent() ? PageWidgetDelegate::Translucent : PageWidgetDelegate::Opaque, m_page ->deprecatedLocalMainFrame());
1859 double paintEnd = currentTime(); 1861 double paintEnd = currentTime();
1860 double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart); 1862 double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart);
1861 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintDurationM S", (paintEnd - paintStart) * 1000, 0, 120, 30); 1863 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintDurationM S", (paintEnd - paintStart) * 1000, 0, 120, 30);
1862 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintMegapixPe rSecond", pixelsPerSec / 1000000, 10, 210, 30); 1864 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintMegapixPe rSecond", pixelsPerSec / 1000000, 10, 210, 30);
1863 } 1865 }
1864 1866
1865 #if OS(ANDROID) 1867 #if OS(ANDROID)
1866 void WebViewImpl::paintCompositedDeprecated(WebCanvas* canvas, const WebRect& re ct) 1868 void WebViewImpl::paintCompositedDeprecated(WebCanvas* canvas, const WebRect& re ct)
1867 { 1869 {
1868 // Note: This method exists on OS(ANDROID) and will hopefully be 1870 // Note: This method exists on OS(ANDROID) and will hopefully be
1869 // removed once the link disambiguation feature renders using 1871 // removed once the link disambiguation feature renders using
1870 // the compositor. 1872 // the compositor.
1871 ASSERT(isAcceleratedCompositingActive()); 1873 ASSERT(isAcceleratedCompositingActive());
1872 1874
1873 FrameView* view = page()->deprecatedLocalMainFrame()->view(); 1875 FrameView* view = page()->deprecatedLocalMainFrame()->view();
1874 PaintBehavior oldPaintBehavior = view->paintBehavior(); 1876 PaintBehavior oldPaintBehavior = view->paintBehavior();
1875 view->setPaintBehavior(oldPaintBehavior | PaintBehaviorFlattenCompositingLay ers); 1877 view->setPaintBehavior(oldPaintBehavior | PaintBehaviorFlattenCompositingLay ers);
1876 1878
1877 PageWidgetDelegate::paint(m_page.get(), pageOverlays(), canvas, rect, isTran sparent() ? PageWidgetDelegate::Translucent : PageWidgetDelegate::Opaque); 1879 PageWidgetDelegate::paint(m_page.get(), pageOverlays(), canvas, rect, isTran sparent() ? PageWidgetDelegate::Translucent : PageWidgetDelegate::Opaque, m_page ->deprecatedLocalMainFrame());
1878 1880
1879 view->setPaintBehavior(oldPaintBehavior); 1881 view->setPaintBehavior(oldPaintBehavior);
1880 } 1882 }
1881 #endif 1883 #endif
1882 1884
1883 void WebViewImpl::compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback * callback) 1885 void WebViewImpl::compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback * callback)
1884 { 1886 {
1885 ASSERT(isAcceleratedCompositingActive()); 1887 ASSERT(isAcceleratedCompositingActive());
1886 m_layerTreeView->compositeAndReadbackAsync(callback); 1888 m_layerTreeView->compositeAndReadbackAsync(callback);
1887 } 1889 }
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
2058 default: 2060 default:
2059 ASSERT_NOT_REACHED(); 2061 ASSERT_NOT_REACHED();
2060 } 2062 }
2061 2063
2062 node->dispatchMouseEvent( 2064 node->dispatchMouseEvent(
2063 PlatformMouseEventBuilder(mainFrameImpl()->frameView(), static_cast< const WebMouseEvent&>(inputEvent)), 2065 PlatformMouseEventBuilder(mainFrameImpl()->frameView(), static_cast< const WebMouseEvent&>(inputEvent)),
2064 eventType, static_cast<const WebMouseEvent&>(inputEvent).clickCount) ; 2066 eventType, static_cast<const WebMouseEvent&>(inputEvent).clickCount) ;
2065 return true; 2067 return true;
2066 } 2068 }
2067 2069
2068 return PageWidgetDelegate::handleInputEvent(m_page.get(), *this, inputEvent) ; 2070 return PageWidgetDelegate::handleInputEvent(m_page.get(), *this, inputEvent, m_page->deprecatedLocalMainFrame());
2069 } 2071 }
2070 2072
2071 void WebViewImpl::setCursorVisibilityState(bool isVisible) 2073 void WebViewImpl::setCursorVisibilityState(bool isVisible)
2072 { 2074 {
2073 if (m_page) 2075 if (m_page)
2074 m_page->setIsCursorVisible(isVisible); 2076 m_page->setIsCursorVisible(isVisible);
2075 } 2077 }
2076 2078
2077 void WebViewImpl::mouseCaptureLost() 2079 void WebViewImpl::mouseCaptureLost()
2078 { 2080 {
(...skipping 2284 matching lines...) Expand 10 before | Expand all | Expand 10 after
4363 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4365 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4364 4366
4365 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4367 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4366 return false; 4368 return false;
4367 4369
4368 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4370 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4369 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4371 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4370 } 4372 }
4371 4373
4372 } // namespace blink 4374 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebPagePopupImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698