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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 781743002: Deleted unused code about WebViewImpl::getSelectionRootBounds (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index dd90cb60ea2c64bcbcb3f6dea369c9e59105e68a..5e41ff9d7b946e238244635d93fe6bdb85f74599 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -918,35 +918,6 @@ void WebViewImpl::setShowScrollBottleneckRects(bool show)
m_showScrollBottleneckRects = show;
}
-void WebViewImpl::getSelectionRootBounds(WebRect& bounds) const
-{
- const Frame* frame = focusedCoreFrame();
- if (!frame || !frame->isLocalFrame())
- return;
-
- Element* root = toLocalFrame(frame)->selection().rootEditableElementOrDocumentElement();
- if (!root)
- return;
-
- // If the selection is inside a form control, the root will be a <div> that
- // behaves as the editor but we want to return the actual element's bounds.
- // In practice, that means <textarea> and <input> controls that behave like
- // a text field.
- Element* shadowHost = root->shadowHost();
- if (shadowHost
- && (isHTMLTextAreaElement(*shadowHost)
- || (isHTMLInputElement(*shadowHost) && toHTMLInputElement(*shadowHost).isTextField())))
- root = shadowHost;
-
- IntRect boundingBox = isHTMLHtmlElement(root)
- ? IntRect(IntPoint(0, 0), root->document().frame()->view()->contentsSize())
- : root->pixelSnappedBoundingBox();
-
- boundingBox = root->document().frame()->view()->contentsToWindow(boundingBox);
- boundingBox.scale(pageScaleFactor());
- bounds = boundingBox;
-}
-
void WebViewImpl::acceptLanguagesChanged()
{
if (!page())
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698