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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2737173002: FontCachePurgePreventer is needed when computing MinPreferredWidth (Closed)
Patch Set: only change WebViewImpl for now 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 3274 matching lines...) Expand 10 before | Expand all | Expand 10 after
3285 ->UpdateLifecycleToCompositingCleanPlusScrolling(); 3285 ->UpdateLifecycleToCompositingCleanPlusScrolling();
3286 3286
3287 Document* document = page_->MainFrame()->IsLocalFrame() 3287 Document* document = page_->MainFrame()->IsLocalFrame()
3288 ? page_->DeprecatedLocalMainFrame()->GetDocument() 3288 ? page_->DeprecatedLocalMainFrame()->GetDocument()
3289 : nullptr; 3289 : nullptr;
3290 if (!document || document->GetLayoutViewItem().IsNull() || 3290 if (!document || document->GetLayoutViewItem().IsNull() ||
3291 !document->documentElement() || 3291 !document->documentElement() ||
3292 !document->documentElement()->GetLayoutBox()) 3292 !document->documentElement()->GetLayoutBox())
3293 return WebSize(); 3293 return WebSize();
3294 3294
3295 // Needed for computing MinPreferredWidth.
3296 FontCachePurgePreventer fontCachePurgePreventer;
3295 int width_scaled = document->GetLayoutViewItem() 3297 int width_scaled = document->GetLayoutViewItem()
3296 .MinPreferredLogicalWidth() 3298 .MinPreferredLogicalWidth()
3297 .Round(); // Already accounts for zoom. 3299 .Round(); // Already accounts for zoom.
3298 int height_scaled = 3300 int height_scaled =
3299 document->documentElement()->GetLayoutBox()->ScrollHeight().Round(); 3301 document->documentElement()->GetLayoutBox()->ScrollHeight().Round();
3300 return IntSize(width_scaled, height_scaled); 3302 return IntSize(width_scaled, height_scaled);
3301 } 3303 }
3302 3304
3303 float WebViewImpl::DefaultMinimumPageScaleFactor() const { 3305 float WebViewImpl::DefaultMinimumPageScaleFactor() const {
3304 return GetPageScaleConstraintsSet().DefaultConstraints().minimum_scale; 3306 return GetPageScaleConstraintsSet().DefaultConstraints().minimum_scale;
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
4160 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) 4162 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame())
4161 return nullptr; 4163 return nullptr;
4162 return focused_frame; 4164 return focused_frame;
4163 } 4165 }
4164 4166
4165 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { 4167 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const {
4166 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; 4168 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr;
4167 } 4169 }
4168 4170
4169 } // namespace blink 4171 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698