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

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

Issue 1447273003: Make the FloatSize constructor from an IntSize explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/PageScaleConstraintsSet.cpp
diff --git a/third_party/WebKit/Source/core/frame/PageScaleConstraintsSet.cpp b/third_party/WebKit/Source/core/frame/PageScaleConstraintsSet.cpp
index 59638cabab844fdf4d355985b22d625b53478f8b..43b05a6625d3ea1975d12bddae9d721273b0c2ab 100644
--- a/third_party/WebKit/Source/core/frame/PageScaleConstraintsSet.cpp
+++ b/third_party/WebKit/Source/core/frame/PageScaleConstraintsSet.cpp
@@ -58,7 +58,7 @@ const PageScaleConstraints& PageScaleConstraintsSet::defaultConstraints() const
void PageScaleConstraintsSet::updatePageDefinedConstraints(const ViewportDescription& description, Length legacyFallbackWidth)
{
- m_pageDefinedConstraints = description.resolve(m_viewSize, legacyFallbackWidth);
+ m_pageDefinedConstraints = description.resolve(FloatSize(m_viewSize), legacyFallbackWidth);
m_constraintsDirty = true;
}
@@ -216,16 +216,16 @@ void PageScaleConstraintsSet::adjustForAndroidWebViewQuirks(const ViewportDescri
if (useWideViewport && (description.maxWidth.isAuto() || description.maxWidth.type() == ExtendToZoom) && description.zoom != 1.0f) {
if (layoutFallbackWidth)
adjustedLayoutSizeWidth = layoutFallbackWidth;
- adjustedLayoutSizeHeight = computeHeightByAspectRatio(adjustedLayoutSizeWidth, m_viewSize);
+ adjustedLayoutSizeHeight = computeHeightByAspectRatio(adjustedLayoutSizeWidth, FloatSize(m_viewSize));
} else if (!useWideViewport) {
const float nonWideScale = description.zoom < 1 && description.maxWidth.type() != DeviceWidth && description.maxWidth.type() != DeviceHeight ? -1 : oldInitialScale;
- adjustedLayoutSizeWidth = getLayoutWidthForNonWideViewport(m_viewSize, nonWideScale) / targetDensityDPIFactor;
+ adjustedLayoutSizeWidth = getLayoutWidthForNonWideViewport(FloatSize(m_viewSize), nonWideScale) / targetDensityDPIFactor;
float newInitialScale = targetDensityDPIFactor;
if (m_userAgentConstraints.initialScale != -1 && (description.maxWidth.type() == DeviceWidth || ((description.maxWidth.isAuto() || description.maxWidth.type() == ExtendToZoom) && description.zoom == -1))) {
adjustedLayoutSizeWidth /= m_userAgentConstraints.initialScale;
newInitialScale = m_userAgentConstraints.initialScale;
}
- adjustedLayoutSizeHeight = computeHeightByAspectRatio(adjustedLayoutSizeWidth, m_viewSize);
+ adjustedLayoutSizeHeight = computeHeightByAspectRatio(adjustedLayoutSizeWidth, FloatSize(m_viewSize));
if (description.zoom < 1) {
m_pageDefinedConstraints.initialScale = newInitialScale;
if (m_pageDefinedConstraints.minimumScale != -1)
@@ -242,7 +242,7 @@ void PageScaleConstraintsSet::adjustForAndroidWebViewQuirks(const ViewportDescri
m_pageDefinedConstraints.maximumScale = m_pageDefinedConstraints.initialScale;
if (description.maxWidth.isAuto() || description.maxWidth.type() == ExtendToZoom || description.maxWidth.type() == DeviceWidth) {
adjustedLayoutSizeWidth = m_viewSize.width() / targetDensityDPIFactor;
- adjustedLayoutSizeHeight = computeHeightByAspectRatio(adjustedLayoutSizeWidth, m_viewSize);
+ adjustedLayoutSizeHeight = computeHeightByAspectRatio(adjustedLayoutSizeWidth, FloatSize(m_viewSize));
}
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp ('k') | third_party/WebKit/Source/core/frame/VisualViewport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698