Commit dfe5b52a authored by bokan@chromium.org's avatar bokan@chromium.org

Replace default page scale limits in PageScaleConstraintsSet.

This fixes crbug.com/411933 where overlay scrollbars in ChromeOS would show
up on the new tab page even though they weren't needed. This was occurring
because the page scale factor limits, though set in RenderViewImpl::Initialize,
were ineffective until a layout occured since Blink's PageScaleConstraintsSet
wouldn't have computed the final constraints. Thus, the limits used were Blink's
default limits, set to hardcoded values in PageScaleConstraintsSet. This caused
the scrollbar in the compositor to think the page was zoomed in and displayed
the scrollbars.

This patch replaces the uncomputed final constraints with "all 1" values for
minimum, maximum and initial scale, rather than using the (Android-specific)
defaults.

BUG=411933

Review URL: https://codereview.chromium.org/567663002

git-svn-id: svn://svn.chromium.org/blink/trunk@181848 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 2ec3d11f
......@@ -40,11 +40,11 @@ static const float defaultMinimumScale = 0.25f;
static const float defaultMaximumScale = 5.0f;
PageScaleConstraintsSet::PageScaleConstraintsSet()
: m_lastContentsWidth(0)
: m_finalConstraints(1, 1, 1)
, m_lastContentsWidth(0)
, m_needsReset(false)
, m_constraintsDirty(false)
{
m_finalConstraints = defaultConstraints();
}
PageScaleConstraints PageScaleConstraintsSet::defaultConstraints() const
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment