#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
m_formDataCandidate = FormDataCandidate::create(m_viewImpl);
#endif
+ Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_viewImpl->view()));
+ m_viewportAngle = ecore_evas_rotation_get(ee);
#endif
setBackgroundColor(1, 1, 1, 1);
IntSize contentsSize = m_viewImpl->page()->contentsSize();
double horizontalMinScale = max(((double)viewSize().width() / contentsSize.width()), 0.25);
double verticalMinScale = max(((double)viewSize().height() / contentsSize.height()), 0.25);
+ // If there's only a bit ignorable difference between horizontalMinScale and verticalMinScale,
+ // ignore verticalMinScale to fit content's width to view
+ const double ignorableThreshold = 0.01;
+ if (fabs(horizontalMinScale - verticalMinScale) < ignorableThreshold)
+ verticalMinScale = horizontalMinScale;
return min(max(horizontalMinScale, verticalMinScale), m_viewportConstraints.maximumScale);
}
// if content is reloaded, contents size will not be changed
// so, we need to calculate minimum scale here.
// if content size is changed later, minimum scale will be re-calculated on didChangeContentsSize()
- if (m_viewportConstraints.userScalable)
+ if (m_viewportConstraints.userScalable) {
+ if (fabs(m_viewportConstraints.initialScale - m_viewportConstraints.minimumScale) < numeric_limits<float>::epsilon())
+ m_viewportConstraints.initialScale = availableMinimumScale();
m_viewportConstraints.minimumScale = availableMinimumScale();
+ }
// setVisibleContentRect() should be called to adjust visible content rect only when view is resized
if (!m_pageDidRendered || m_viewImpl->page()->estimatedProgress() <= 0.1)