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

Unified Diff: third_party/WebKit/Source/core/layout/IntersectionGeometry.cpp

Issue 2849403002: Use const ref for LocalFrame::LocalFrameRoot and FrameTree::Top (Closed)
Patch Set: fix compile and dchecks Created 3 years, 8 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/layout/IntersectionGeometry.cpp
diff --git a/third_party/WebKit/Source/core/layout/IntersectionGeometry.cpp b/third_party/WebKit/Source/core/layout/IntersectionGeometry.cpp
index 3abe97bff119306dee69d2ed803b32fc91031fd0..72e609ae8317bd866bc514a9fe17677d72ba0538 100644
--- a/third_party/WebKit/Source/core/layout/IntersectionGeometry.cpp
+++ b/third_party/WebKit/Source/core/layout/IntersectionGeometry.cpp
@@ -58,7 +58,7 @@ LayoutUnit ComputeMargin(const Length& length, LayoutUnit reference_length) {
LayoutView* LocalRootView(Element& element) {
LocalFrame* frame = element.GetDocument().GetFrame();
- LocalFrame* frame_root = frame ? frame->LocalFrameRoot() : nullptr;
+ LocalFrame* frame_root = frame ? &frame->LocalFrameRoot() : nullptr;
return frame_root ? frame_root->ContentLayoutObject() : nullptr;
}
@@ -175,10 +175,10 @@ void IntersectionGeometry::MapIntersectionRectToTargetFrameCoordinates() {
Document& target_document = target_->GetDocument();
if (RootIsImplicit()) {
LocalFrame* target_frame = target_document.GetFrame();
- Frame* root_frame = target_frame->Tree().Top();
+ Frame& root_frame = target_frame->Tree().Top();
LayoutSize scroll_position =
LayoutSize(target_document.View()->GetScrollOffset());
- if (target_frame != root_frame)
+ if (target_frame != &root_frame)
MapRectDownToDocument(intersection_rect_, nullptr, target_document);
intersection_rect_.Move(-scroll_position);
} else {
« no previous file with comments | « third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698