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

Unified Diff: Source/core/dom/ViewportArguments.cpp

Issue 23101004: Make configurationForViewport match production code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Renamed configurationForViewport to viewportAsText Created 7 years, 4 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
« no previous file with comments | « Source/core/dom/ViewportArguments.h ('k') | Source/core/page/PageScaleConstraintsSet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ViewportArguments.cpp
diff --git a/Source/core/dom/ViewportArguments.cpp b/Source/core/dom/ViewportArguments.cpp
index 92ae2cf0ae0dc57aecb8c5f2da81ca7e8984a384..72a64ebe4a5bffde8b2bc26d1fe4a13c9709c0b4 100644
--- a/Source/core/dom/ViewportArguments.cpp
+++ b/Source/core/dom/ViewportArguments.cpp
@@ -68,7 +68,7 @@ static inline float clampScaleValue(float value)
return value;
}
-PageScaleConstraints ViewportArguments::resolve(const FloatSize& initialViewportSize, const FloatSize& deviceSize, int defaultWidth) const
+PageScaleConstraints ViewportArguments::resolve(const FloatSize& initialViewportSize, int defaultWidth) const
{
float resultWidth = width;
float resultMaxWidth = maxWidth;
@@ -168,19 +168,19 @@ PageScaleConstraints ViewportArguments::resolve(const FloatSize& initialViewport
switch (static_cast<int>(resultWidth)) {
case ViewportArguments::ValueDeviceWidth:
- resultWidth = deviceSize.width();
+ resultWidth = initialViewportSize.width();
break;
case ViewportArguments::ValueDeviceHeight:
- resultWidth = deviceSize.height();
+ resultWidth = initialViewportSize.height();
break;
}
switch (static_cast<int>(resultHeight)) {
case ViewportArguments::ValueDeviceWidth:
- resultHeight = deviceSize.width();
+ resultHeight = initialViewportSize.width();
break;
case ViewportArguments::ValueDeviceHeight:
- resultHeight = deviceSize.height();
+ resultHeight = initialViewportSize.height();
break;
}
« no previous file with comments | « Source/core/dom/ViewportArguments.h ('k') | Source/core/page/PageScaleConstraintsSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698