diff options
-rw-r--r-- | content/public/renderer/render_view.h | 2 | ||||
-rw-r--r-- | content/renderer/browser_plugin/browser_plugin.cc | 3 | ||||
-rw-r--r-- | content/renderer/render_view_impl.cc | 14 | ||||
-rw-r--r-- | content/renderer/render_view_impl.h | 2 | ||||
-rw-r--r-- | extensions/renderer/extension_helper.cc | 2 |
5 files changed, 12 insertions, 11 deletions
diff --git a/content/public/renderer/render_view.h b/content/public/renderer/render_view.h index 2a7f85a..8c036d5 100644 --- a/content/public/renderer/render_view.h +++ b/content/public/renderer/render_view.h @@ -140,7 +140,7 @@ class CONTENT_EXPORT RenderView : public IPC::Sender { // Converts the |rect| from Viewport coordinates to Window coordinates. // See blink::WebWidgetClient::convertViewportToWindow for more details. - virtual void convertViewportToWindow(blink::WebRect* rect) = 0; + virtual void ConvertViewportToWindowViaWidget(blink::WebRect* rect) = 0; // Returns the bounds of |element| in Window coordinates. The bounds have been // adjusted to include any transformations, including page scale. diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc index ac91ef3..9a74b59 100644 --- a/content/renderer/browser_plugin/browser_plugin.cc +++ b/content/renderer/browser_plugin/browser_plugin.cc @@ -416,7 +416,8 @@ void BrowserPlugin::updateGeometry(const WebRect& plugin_rect_in_viewport, // Convert the plugin_rect_in_viewport to window coordinates, which is css. WebRect rect_in_css(plugin_rect_in_viewport); blink::WebView* webview = container()->element().document().frame()->view(); - RenderView::FromWebView(webview)->convertViewportToWindow(&rect_in_css); + RenderView::FromWebView(webview)->GetWidget()->convertViewportToWindow( + &rect_in_css); view_rect_ = rect_in_css; if (!ready_) { diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 807be31..00db538 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -1958,7 +1958,7 @@ void RenderViewImpl::startDragging(WebLocalFrame* frame, const WebImage& image, const WebPoint& webImageOffset) { blink::WebRect offset_in_window(webImageOffset.x, webImageOffset.y, 0, 0); - convertViewportToWindow(&offset_in_window); + ConvertViewportToWindowViaWidget(&offset_in_window); DropData drop_data(DropDataBuilder::Build(data)); drop_data.referrer_policy = frame->document().referrerPolicy(); gfx::Vector2d imageOffset(offset_in_window.x, offset_in_window.y); @@ -1989,7 +1989,7 @@ void RenderViewImpl::focusedNodeChanged(const WebNode& fromNode, if (!toNode.isNull() && toNode.isElementNode()) { WebElement element = const_cast<WebNode&>(toNode).to<WebElement>(); blink::WebRect rect = element.boundsInViewport(); - convertViewportToWindow(&rect); + ConvertViewportToWindowViaWidget(&rect); node_bounds = gfx::Rect(rect); is_editable = element.isEditable(); } @@ -2187,14 +2187,14 @@ const std::string& RenderViewImpl::GetAcceptLanguages() const { return renderer_preferences_.accept_languages; } -void RenderViewImpl::convertViewportToWindow(blink::WebRect* rect) { - RenderWidget::convertViewportToWindow(rect); +void RenderViewImpl::ConvertViewportToWindowViaWidget(blink::WebRect* rect) { + convertViewportToWindow(rect); } gfx::RectF RenderViewImpl::ElementBoundsInWindow( const blink::WebElement& element) { blink::WebRect bounding_box_in_window = element.boundsInViewport(); - convertViewportToWindow(&bounding_box_in_window); + ConvertViewportToWindowViaWidget(&bounding_box_in_window); return gfx::RectF(bounding_box_in_window); } @@ -3076,7 +3076,7 @@ void RenderViewImpl::GetSelectionBounds(gfx::Rect* start, gfx::Rect* end) { // use the caret position as an empty range for now. It will be updated // after Pepper API equips features related to surrounding text retrieval. blink::WebRect caret(focused_pepper_plugin_->GetCaretBounds()); - convertViewportToWindow(&caret); + ConvertViewportToWindowViaWidget(&caret); *start = caret; *end = caret; return; @@ -3117,7 +3117,7 @@ void RenderViewImpl::GetCompositionCharacterBounds( bounds_in_window->clear(); return; } - convertViewportToWindow(&webrect); + ConvertViewportToWindowViaWidget(&webrect); bounds_in_window->push_back(webrect); } } diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h index 4af994a..8e4878f 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h @@ -444,7 +444,7 @@ class CONTENT_EXPORT RenderViewImpl TopControlsState current, bool animate) override; #endif - void convertViewportToWindow(blink::WebRect* rect) override; + void ConvertViewportToWindowViaWidget(blink::WebRect* rect) override; gfx::RectF ElementBoundsInWindow(const blink::WebElement& element) override; float GetDeviceScaleFactorForTest() const override; diff --git a/extensions/renderer/extension_helper.cc b/extensions/renderer/extension_helper.cc index 728ea13..4d3bd27 100644 --- a/extensions/renderer/extension_helper.cc +++ b/extensions/renderer/extension_helper.cc @@ -47,7 +47,7 @@ void ExtensionHelper::DraggableRegionsChanged(blink::WebFrame* frame) { std::vector<DraggableRegion> regions; for (size_t i = 0; i < webregions.size(); ++i) { DraggableRegion region; - render_view()->convertViewportToWindow(&webregions[i].bounds); + render_view()->ConvertViewportToWindowViaWidget(&webregions[i].bounds); region.bounds = webregions[i].bounds; region.draggable = webregions[i].draggable; regions.push_back(region); |