Changeset 167318 in webkit


Ignore:
Timestamp:
Apr 15, 2014 11:42:14 AM (10 years ago)
Author:
benjamin@webkit.org
Message:

ViewportConfiguration handles userZoom incorrectly
https://bugs.webkit.org/show_bug.cgi?id=131657

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-04-15
Reviewed by Darin Adler.

  • page/ViewportConfiguration.cpp:

(WebCore::viewportArgumentUserZoomIsSet):
(WebCore::ViewportConfiguration::updateConfiguration):
The other viewport values must be strictly positive, userZoom is always either zero, one or minus one.
As a result, the value zero was never set.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r167316 r167318  
     12014-04-15  Benjamin Poulain  <bpoulain@apple.com>
     2
     3        ViewportConfiguration handles userZoom incorrectly
     4        https://bugs.webkit.org/show_bug.cgi?id=131657
     5
     6        Reviewed by Darin Adler.
     7
     8        * page/ViewportConfiguration.cpp:
     9        (WebCore::viewportArgumentUserZoomIsSet):
     10        (WebCore::ViewportConfiguration::updateConfiguration):
     11        The other viewport values must be strictly positive, userZoom is always either zero, one or minus one.
     12        As a result, the value zero was never set.
     13
    1142014-04-15  Simon Fraser  <simon.fraser@apple.com>
    215
  • trunk/Source/WebCore/page/ViewportConfiguration.cpp

    r167176 r167318  
    210210}
    211211
     212static inline bool viewportArgumentUserZoomIsSet(float value)
     213{
     214    return !value || value == 1;
     215}
     216
    212217void ViewportConfiguration::updateConfiguration()
    213218{
     
    236241    }
    237242
    238     if (viewportArgumentValueIsValid(m_viewportArguments.userZoom))
     243    if (viewportArgumentUserZoomIsSet(m_viewportArguments.userZoom))
    239244        m_configuration.allowsUserScaling = m_viewportArguments.userZoom != 0.;
    240245}
Note: See TracChangeset for help on using the changeset viewer.