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

Side by Side Diff: third_party/WebKit/Source/core/frame/RemoteFrameView.cpp

Issue 2849403002: Use const ref for LocalFrame::LocalFrameRoot and FrameTree::Top (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/frame/RemoteFrameView.h" 5 #include "core/frame/RemoteFrameView.h"
6 6
7 #include "core/dom/IntersectionObserverEntry.h" 7 #include "core/dom/IntersectionObserverEntry.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/frame/RemoteFrame.h" 10 #include "core/frame/RemoteFrame.h"
(...skipping 29 matching lines...) Expand all
40 RemoteFrameView* view = new RemoteFrameView(remote_frame); 40 RemoteFrameView* view = new RemoteFrameView(remote_frame);
41 view->Show(); 41 view->Show();
42 return view; 42 return view;
43 } 43 }
44 44
45 void RemoteFrameView::UpdateRemoteViewportIntersection() { 45 void RemoteFrameView::UpdateRemoteViewportIntersection() {
46 if (!remote_frame_->OwnerLayoutObject()) 46 if (!remote_frame_->OwnerLayoutObject())
47 return; 47 return;
48 48
49 FrameView* local_root_view = 49 FrameView* local_root_view =
50 ToLocalFrame(remote_frame_->Tree().Parent())->LocalFrameRoot()->View(); 50 ToLocalFrame(remote_frame_->Tree().Parent())->LocalFrameRoot().View();
51 if (!local_root_view) 51 if (!local_root_view)
52 return; 52 return;
53 53
54 // Start with rect in remote frame's coordinate space. Then 54 // Start with rect in remote frame's coordinate space. Then
55 // mapToVisualRectInAncestorSpace will move it to the local root's coordinate 55 // mapToVisualRectInAncestorSpace will move it to the local root's coordinate
56 // space and account for any clip from containing elements such as a 56 // space and account for any clip from containing elements such as a
57 // scrollable div. Passing nullptr as an argument to 57 // scrollable div. Passing nullptr as an argument to
58 // mapToVisualRectInAncestorSpace causes it to be clipped to the viewport, 58 // mapToVisualRectInAncestorSpace causes it to be clipped to the viewport,
59 // even if there are RemoteFrame ancestors in the frame tree. 59 // even if there are RemoteFrame ancestors in the frame tree.
60 LayoutRect rect(0, 0, frame_rect_.Width(), frame_rect_.Height()); 60 LayoutRect rect(0, 0, frame_rect_.Width(), frame_rect_.Height());
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 return parent_rect; 149 return parent_rect;
150 } 150 }
151 151
152 DEFINE_TRACE(RemoteFrameView) { 152 DEFINE_TRACE(RemoteFrameView) {
153 visitor->Trace(remote_frame_); 153 visitor->Trace(remote_frame_);
154 visitor->Trace(parent_); 154 visitor->Trace(parent_);
155 } 155 }
156 156
157 } // namespace blink 157 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698