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

Unified Diff: third_party/WebKit/Source/core/frame/RemoteFrameView.cpp

Issue 2845583002: Remove FrameViewBase as base class of RemoteFrameView. (Closed)
Patch Set: ConvertSelfToChild take FrameOrPlugin as arg Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/RemoteFrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/RemoteFrameView.cpp b/third_party/WebKit/Source/core/frame/RemoteFrameView.cpp
index 5543771711b36c20c3122bf12ccd26bc8eb8d016..cef7f48927f9fb50bb9970c0a14370d4b670b5e9 100644
--- a/third_party/WebKit/Source/core/frame/RemoteFrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/RemoteFrameView.cpp
@@ -22,8 +22,7 @@ RemoteFrameView::RemoteFrameView(RemoteFrame* remote_frame)
RemoteFrameView::~RemoteFrameView() {}
-void RemoteFrameView::SetParent(FrameViewBase* parent_frame_view_base) {
- FrameView* parent = ToFrameView(parent_frame_view_base);
+void RemoteFrameView::SetParent(FrameView* parent) {
if (parent == parent_)
return;
@@ -138,16 +137,15 @@ void RemoteFrameView::SetParentVisible(bool visible) {
remote_frame_->Client()->VisibilityChanged(self_visible_ && parent_visible_);
}
-IntRect RemoteFrameView::ConvertFromContainingFrameViewBase(
- const IntRect& parent_rect) const {
- if (const FrameView* parent = ToFrameView(Parent())) {
- IntRect local_rect = parent_rect;
- local_rect.SetLocation(
- parent->ConvertSelfToChild(this, local_rect.Location()));
- return local_rect;
+IntRect RemoteFrameView::ConvertFromRootFrame(
+ const IntRect& rect_in_root_frame) const {
+ if (parent_) {
+ IntRect parent_rect = parent_->ConvertFromRootFrame(rect_in_root_frame);
+ parent_rect.SetLocation(
+ parent_->ConvertSelfToChild(*this, parent_rect.Location()));
+ return parent_rect;
}
-
- return parent_rect;
+ return rect_in_root_frame;
}
DEFINE_TRACE(RemoteFrameView) {

Powered by Google App Engine
This is Rietveld 408576698