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

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

Issue 352173002: Expose public interface for composited selection bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 #include "public/web/WebActiveWheelFlingParameters.h" 116 #include "public/web/WebActiveWheelFlingParameters.h"
117 #include "public/web/WebAutofillClient.h" 117 #include "public/web/WebAutofillClient.h"
118 #include "public/web/WebFrameClient.h" 118 #include "public/web/WebFrameClient.h"
119 #include "public/web/WebHitTestResult.h" 119 #include "public/web/WebHitTestResult.h"
120 #include "public/web/WebInputElement.h" 120 #include "public/web/WebInputElement.h"
121 #include "public/web/WebMediaPlayerAction.h" 121 #include "public/web/WebMediaPlayerAction.h"
122 #include "public/web/WebNode.h" 122 #include "public/web/WebNode.h"
123 #include "public/web/WebPlugin.h" 123 #include "public/web/WebPlugin.h"
124 #include "public/web/WebPluginAction.h" 124 #include "public/web/WebPluginAction.h"
125 #include "public/web/WebRange.h" 125 #include "public/web/WebRange.h"
126 #include "public/web/WebSelectionBound.h"
126 #include "public/web/WebTextInputInfo.h" 127 #include "public/web/WebTextInputInfo.h"
127 #include "public/web/WebViewClient.h" 128 #include "public/web/WebViewClient.h"
128 #include "public/web/WebWindowFeatures.h" 129 #include "public/web/WebWindowFeatures.h"
129 #include "web/CompositionUnderlineVectorBuilder.h" 130 #include "web/CompositionUnderlineVectorBuilder.h"
130 #include "web/ContextFeaturesClientImpl.h" 131 #include "web/ContextFeaturesClientImpl.h"
131 #include "web/DatabaseClientImpl.h" 132 #include "web/DatabaseClientImpl.h"
132 #include "web/FullscreenController.h" 133 #include "web/FullscreenController.h"
133 #include "web/GraphicsLayerFactoryChromium.h" 134 #include "web/GraphicsLayerFactoryChromium.h"
134 #include "web/LinkHighlight.h" 135 #include "web/LinkHighlight.h"
135 #include "web/NavigatorContentUtilsClientImpl.h" 136 #include "web/NavigatorContentUtilsClientImpl.h"
(...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after
1795 void WebViewImpl::enterFullScreenForElement(WebCore::Element* element) 1796 void WebViewImpl::enterFullScreenForElement(WebCore::Element* element)
1796 { 1797 {
1797 m_fullscreenController->enterFullScreenForElement(element); 1798 m_fullscreenController->enterFullScreenForElement(element);
1798 } 1799 }
1799 1800
1800 void WebViewImpl::exitFullScreenForElement(WebCore::Element* element) 1801 void WebViewImpl::exitFullScreenForElement(WebCore::Element* element)
1801 { 1802 {
1802 m_fullscreenController->exitFullScreenForElement(element); 1803 m_fullscreenController->exitFullScreenForElement(element);
1803 } 1804 }
1804 1805
1806 void WebViewImpl::clearCompositedSelectionBounds()
1807 {
1808 if (m_layerTreeView)
1809 m_layerTreeView->clearSelection();
1810 }
1811
1812 void WebViewImpl::updateCompositedSelectionBounds(const WebSelectionBound& ancho r, const WebSelectionBound& focus)
1813 {
1814 if (m_layerTreeView)
1815 m_layerTreeView->registerSelection(anchor, focus);
1816 }
1817
1805 bool WebViewImpl::hasHorizontalScrollbar() 1818 bool WebViewImpl::hasHorizontalScrollbar()
1806 { 1819 {
1807 return mainFrameImpl()->frameView()->horizontalScrollbar(); 1820 return mainFrameImpl()->frameView()->horizontalScrollbar();
1808 } 1821 }
1809 1822
1810 bool WebViewImpl::hasVerticalScrollbar() 1823 bool WebViewImpl::hasVerticalScrollbar()
1811 { 1824 {
1812 return mainFrameImpl()->frameView()->verticalScrollbar(); 1825 return mainFrameImpl()->frameView()->verticalScrollbar();
1813 } 1826 }
1814 1827
(...skipping 2086 matching lines...) Expand 10 before | Expand all | Expand 10 after
3901 if (!m_client) 3914 if (!m_client)
3902 return; 3915 return;
3903 3916
3904 if (!active) { 3917 if (!active) {
3905 m_isAcceleratedCompositingActive = false; 3918 m_isAcceleratedCompositingActive = false;
3906 if (!m_layerTreeViewCommitsDeferred 3919 if (!m_layerTreeViewCommitsDeferred
3907 && blink::Platform::current()->isThreadedCompositingEnabled()) { 3920 && blink::Platform::current()->isThreadedCompositingEnabled()) {
3908 ASSERT(m_layerTreeView); 3921 ASSERT(m_layerTreeView);
3909 // In threaded compositing mode, force compositing mode is always on so setIsAcceleratedCompositingActive(false) 3922 // In threaded compositing mode, force compositing mode is always on so setIsAcceleratedCompositingActive(false)
3910 // means that we're transitioning to a new page. Suppress commits un til WebKit generates invalidations so 3923 // means that we're transitioning to a new page. Suppress commits un til WebKit generates invalidations so
3911 // we don't attempt to paint too early in the next page load. 3924
3912 m_layerTreeView->setDeferCommits(true); 3925 m_layerTreeView->setDeferCommits(true);
3913 m_layerTreeViewCommitsDeferred = true; 3926 m_layerTreeViewCommitsDeferred = true;
3914 } 3927 }
3915 } else if (m_layerTreeView) { 3928 } else if (m_layerTreeView) {
3916 m_isAcceleratedCompositingActive = true; 3929 m_isAcceleratedCompositingActive = true;
3917 updateLayerTreeViewport(); 3930 updateLayerTreeViewport();
3918 if (m_pageOverlays) 3931 if (m_pageOverlays)
3919 m_pageOverlays->update(); 3932 m_pageOverlays->update();
3920 } else { 3933 } else {
3921 TRACE_EVENT0("blink", "WebViewImpl::setIsAcceleratedCompositingActive(tr ue)"); 3934 TRACE_EVENT0("blink", "WebViewImpl::setIsAcceleratedCompositingActive(tr ue)");
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
4153 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4166 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4154 4167
4155 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4168 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4156 return false; 4169 return false;
4157 4170
4158 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4171 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4159 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4172 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4160 } 4173 }
4161 4174
4162 } // namespace blink 4175 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698