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

Unified Diff: third_party/WebKit/Source/core/frame/VisualViewport.cpp

Issue 1568383002: Preserve page resize information when main frame is remote (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bokan review comments addressed Created 4 years, 11 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/frame/VisualViewport.cpp
diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
index 5f61223528a847ff9b6a4834cd76ab341e7c3f3a..c301468d20ad4c740fab91d39e3b60a62c0c2688 100644
--- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
+++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
@@ -89,15 +89,11 @@ DEFINE_TRACE(VisualViewport)
void VisualViewport::setSize(const IntSize& size)
{
- // When the main frame is remote, we won't have an associated frame.
- if (!mainFrame())
- return;
-
if (m_size == size)
return;
- bool autosizerNeedsUpdating =
- (size.width() != m_size.width())
+ bool autosizerNeedsUpdating = (size.width() != m_size.width())
dcheng 2016/01/11 21:45:30 Move the original mainFrame() check down to line 1
kenrb 2016/01/11 22:01:23 Done.
+ && mainFrame()
&& mainFrame()->settings()
&& mainFrame()->settings()->textAutosizingEnabled();
@@ -194,9 +190,6 @@ void VisualViewport::setScale(float scale)
void VisualViewport::setScaleAndLocation(float scale, const FloatPoint& location)
{
- if (!mainFrame())
- return;
-
bool valuesChanged = false;
if (scale != m_scale) {
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698