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

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

Issue 929213004: Plumb selection bounds as a single unit (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Cleanup Created 5 years, 8 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 #include "public/web/WebAutofillClient.h" 127 #include "public/web/WebAutofillClient.h"
128 #include "public/web/WebBeginFrameArgs.h" 128 #include "public/web/WebBeginFrameArgs.h"
129 #include "public/web/WebFrameClient.h" 129 #include "public/web/WebFrameClient.h"
130 #include "public/web/WebHitTestResult.h" 130 #include "public/web/WebHitTestResult.h"
131 #include "public/web/WebInputElement.h" 131 #include "public/web/WebInputElement.h"
132 #include "public/web/WebMediaPlayerAction.h" 132 #include "public/web/WebMediaPlayerAction.h"
133 #include "public/web/WebNode.h" 133 #include "public/web/WebNode.h"
134 #include "public/web/WebPlugin.h" 134 #include "public/web/WebPlugin.h"
135 #include "public/web/WebPluginAction.h" 135 #include "public/web/WebPluginAction.h"
136 #include "public/web/WebRange.h" 136 #include "public/web/WebRange.h"
137 #include "public/web/WebSelection.h"
137 #include "public/web/WebTextInputInfo.h" 138 #include "public/web/WebTextInputInfo.h"
138 #include "public/web/WebViewClient.h" 139 #include "public/web/WebViewClient.h"
139 #include "public/web/WebWindowFeatures.h" 140 #include "public/web/WebWindowFeatures.h"
140 #include "web/CompositionUnderlineVectorBuilder.h" 141 #include "web/CompositionUnderlineVectorBuilder.h"
141 #include "web/ContextFeaturesClientImpl.h" 142 #include "web/ContextFeaturesClientImpl.h"
142 #include "web/DatabaseClientImpl.h" 143 #include "web/DatabaseClientImpl.h"
143 #include "web/DevToolsEmulator.h" 144 #include "web/DevToolsEmulator.h"
144 #include "web/FullscreenController.h" 145 #include "web/FullscreenController.h"
145 #include "web/GraphicsLayerFactoryChromium.h" 146 #include "web/GraphicsLayerFactoryChromium.h"
146 #include "web/InspectorOverlayImpl.h" 147 #include "web/InspectorOverlayImpl.h"
(...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1999 void WebViewImpl::enterFullScreenForElement(Element* element) 2000 void WebViewImpl::enterFullScreenForElement(Element* element)
2000 { 2001 {
2001 m_fullscreenController->enterFullScreenForElement(element); 2002 m_fullscreenController->enterFullScreenForElement(element);
2002 } 2003 }
2003 2004
2004 void WebViewImpl::exitFullScreenForElement(Element* element) 2005 void WebViewImpl::exitFullScreenForElement(Element* element)
2005 { 2006 {
2006 m_fullscreenController->exitFullScreenForElement(element); 2007 m_fullscreenController->exitFullScreenForElement(element);
2007 } 2008 }
2008 2009
2009 void WebViewImpl::clearCompositedSelectionBounds() 2010 void WebViewImpl::clearCompositedSelection()
2010 { 2011 {
2011 if (m_layerTreeView) 2012 if (m_layerTreeView)
2012 m_layerTreeView->clearSelection(); 2013 m_layerTreeView->clearSelection();
2013 } 2014 }
2014 2015
2015 void WebViewImpl::updateCompositedSelectionBounds(const WebSelectionBound& ancho r, const WebSelectionBound& focus) 2016 void WebViewImpl::updateCompositedSelection(const WebSelection& selection)
2016 { 2017 {
2017 if (m_layerTreeView) 2018 if (m_layerTreeView) {
2018 m_layerTreeView->registerSelection(anchor, focus); 2019 m_layerTreeView->registerSelection(selection);
2020 // TODO(jdduke): Remove this overload when downstream consumers have bee n updated, crbug.com/466672.
2021 m_layerTreeView->registerSelection(selection.start(), selection.end());
2022 }
2019 } 2023 }
2020 2024
2021 bool WebViewImpl::hasHorizontalScrollbar() 2025 bool WebViewImpl::hasHorizontalScrollbar()
2022 { 2026 {
2023 return mainFrameImpl()->frameView()->horizontalScrollbar(); 2027 return mainFrameImpl()->frameView()->horizontalScrollbar();
2024 } 2028 }
2025 2029
2026 bool WebViewImpl::hasVerticalScrollbar() 2030 bool WebViewImpl::hasVerticalScrollbar()
2027 { 2031 {
2028 return mainFrameImpl()->frameView()->verticalScrollbar(); 2032 return mainFrameImpl()->frameView()->verticalScrollbar();
(...skipping 2494 matching lines...) Expand 10 before | Expand all | Expand 10 after
4523 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4527 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4524 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4528 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4525 } 4529 }
4526 4530
4527 void WebViewImpl::forceNextWebGLContextCreationToFail() 4531 void WebViewImpl::forceNextWebGLContextCreationToFail()
4528 { 4532 {
4529 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4533 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4530 } 4534 }
4531 4535
4532 } // namespace blink 4536 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698