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

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

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