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

Unified Diff: third_party/WebKit/Source/core/dom/IntersectionObservation.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/dom/IntersectionObservation.cpp
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp b/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
index 0c79d878eaccee27d0bf512e2d9d0469d0973d5a..ed53ec8ea51bb5ba569e7d9dbad0362095c28d81 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
+++ b/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
@@ -101,14 +101,13 @@ void IntersectionObservation::UpdateShouldReportRootBoundsAfterDomChange() {
LocalFrame* target_frame = Target()->GetDocument().GetFrame();
if (!target_frame)
return;
- Frame* root_frame = target_frame->Tree().Top();
- DCHECK(root_frame);
- if (root_frame == target_frame) {
+ Frame& root_frame = target_frame->Tree().Top();
+ if (&root_frame == target_frame) {
should_report_root_bounds_ = true;
} else {
should_report_root_bounds_ =
target_frame->GetSecurityContext()->GetSecurityOrigin()->CanAccess(
- root_frame->GetSecurityContext()->GetSecurityOrigin());
+ root_frame.GetSecurityContext()->GetSecurityOrigin());
}
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698