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

Unified Diff: third_party/WebKit/Source/core/layout/TextAutosizer.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/TextAutosizer.cpp
diff --git a/third_party/WebKit/Source/core/layout/TextAutosizer.cpp b/third_party/WebKit/Source/core/layout/TextAutosizer.cpp
index 15604e75e830e3f7ed124957f029e27c0a2a6008..0af10a186c680b63f048e04faa530e22b52afbcf 100644
--- a/third_party/WebKit/Source/core/layout/TextAutosizer.cpp
+++ b/third_party/WebKit/Source/core/layout/TextAutosizer.cpp
@@ -562,11 +562,11 @@ void TextAutosizer::UpdatePageInfo() {
// FIXME: With out-of-process iframes, the top frame can be remote and
// doesn't have sizing information. Just return if this is the case.
- Frame* frame = document_->GetFrame()->Tree().Top();
- if (frame->IsRemoteFrame())
+ Frame& frame = document_->GetFrame()->Tree().Top();
+ if (frame.IsRemoteFrame())
return;
- LocalFrame* main_frame = ToLocalFrame(frame);
+ LocalFrame& main_frame = ToLocalFrame(frame);
IntSize frame_size =
document_->GetSettings()->TextAutosizingWindowSizeOverride();
if (frame_size.IsEmpty())
@@ -575,7 +575,7 @@ void TextAutosizer::UpdatePageInfo() {
page_info_.frame_width_ =
horizontal_writing_mode ? frame_size.Width() : frame_size.Height();
- IntSize layout_size = main_frame->View()->GetLayoutSize();
+ IntSize layout_size = main_frame.View()->GetLayoutSize();
page_info_.layout_width_ =
horizontal_writing_mode ? layout_size.Width() : layout_size.Height();
@@ -586,7 +586,7 @@ void TextAutosizer::UpdatePageInfo() {
// If the page has a meta viewport or @viewport, don't apply the device
// scale adjustment.
- if (!main_frame->GetDocument()
+ if (!main_frame.GetDocument()
->GetViewportDescription()
.IsSpecifiedByAuthor()) {
page_info_.device_scale_adjustment_ =
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/loader/MixedContentChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698