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

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: Refactor WebSelection to align with Frame/VisibleSelection Created 5 years, 9 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/InspectorRenderingAgent.h" 147 #include "web/InspectorRenderingAgent.h"
(...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after
2011 void WebViewImpl::enterFullScreenForElement(Element* element) 2012 void WebViewImpl::enterFullScreenForElement(Element* element)
2012 { 2013 {
2013 m_fullscreenController->enterFullScreenForElement(element); 2014 m_fullscreenController->enterFullScreenForElement(element);
2014 } 2015 }
2015 2016
2016 void WebViewImpl::exitFullScreenForElement(Element* element) 2017 void WebViewImpl::exitFullScreenForElement(Element* element)
2017 { 2018 {
2018 m_fullscreenController->exitFullScreenForElement(element); 2019 m_fullscreenController->exitFullScreenForElement(element);
2019 } 2020 }
2020 2021
2021 void WebViewImpl::clearCompositedSelectionBounds() 2022 void WebViewImpl::clearCompositedSelection()
2022 { 2023 {
2023 if (m_layerTreeView) 2024 if (m_layerTreeView)
2024 m_layerTreeView->clearSelection(); 2025 m_layerTreeView->clearSelection();
2025 } 2026 }
2026 2027
2027 void WebViewImpl::updateCompositedSelectionBounds(const WebSelectionBound& ancho r, const WebSelectionBound& focus) 2028 void WebViewImpl::updateCompositedSelection(const WebSelection& selection)
2028 { 2029 {
2029 if (m_layerTreeView) 2030 if (m_layerTreeView) {
2030 m_layerTreeView->registerSelection(anchor, focus); 2031 m_layerTreeView->registerSelection(selection);
2032 // FIXME: Remove this overload when downstream consumers have been updat ed, crbug.com/466672.
2033 m_layerTreeView->registerSelection(selection.start(), selection.end());
2034 }
2031 } 2035 }
2032 2036
2033 bool WebViewImpl::hasHorizontalScrollbar() 2037 bool WebViewImpl::hasHorizontalScrollbar()
2034 { 2038 {
2035 return mainFrameImpl()->frameView()->horizontalScrollbar(); 2039 return mainFrameImpl()->frameView()->horizontalScrollbar();
2036 } 2040 }
2037 2041
2038 bool WebViewImpl::hasVerticalScrollbar() 2042 bool WebViewImpl::hasVerticalScrollbar()
2039 { 2043 {
2040 return mainFrameImpl()->frameView()->verticalScrollbar(); 2044 return mainFrameImpl()->frameView()->verticalScrollbar();
(...skipping 2618 matching lines...) Expand 10 before | Expand all | Expand 10 after
4659 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4663 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4660 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4664 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4661 } 4665 }
4662 4666
4663 void WebViewImpl::forceNextWebGLContextCreationToFail() 4667 void WebViewImpl::forceNextWebGLContextCreationToFail()
4664 { 4668 {
4665 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4669 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4666 } 4670 }
4667 4671
4668 } // namespace blink 4672 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698