<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>118495</bug_id>
          
          <creation_ts>2013-07-09 01:10:12 -0700</creation_ts>
          <short_desc>Page zoom/scale causes javascript auto scroll not work</short_desc>
          <delta_ts>2013-07-09 01:12:12 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Chen Zhixiang">chenzx</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>907026</commentid>
    <comment_count>0</comment_count>
    <who name="Chen Zhixiang">chenzx</who>
    <bug_when>2013-07-09 01:10:12 -0700</bug_when>
    <thetext>When set page zoom/scale factor to a value &lt; 1,
then the JS code `element.content.scrollTop++` will be affected by this
And the page auto scroll will not work.

This problem exists in both newest Chrome 27 and Firefox 22.

Reason for this:
(1)In fact, zoom/scale operator should NOT apply to the point/position type, but only to the length type;
(2)Or maybe we can change the internal DOM layput impl&apos;s type from int to double?
(3)I had to say, the testcase expects a &quot;continuous&quot; style changing behavor, while discretized int-type values should always give a gap;


void Element::setScrollTop(int newTop)
{
    document()-&gt;updateLayoutIgnorePendingStylesheets();
    if (RenderBox* rend = renderBox())
        rend-&gt;setScrollTop(static_cast&lt;int&gt;(newTop * rend-&gt;style()-&gt;effectiveZoom())); //&lt;---
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>907028</commentid>
    <comment_count>1</comment_count>
      <attachid>206298</attachid>
    <who name="Chen Zhixiang">chenzx</who>
    <bug_when>2013-07-09 01:12:12 -0700</bug_when>
    <thetext>Created attachment 206298
Testcase for this bug report

Load this page, and change the page zoom to &lt;1 value, then the auto scroll will stop working</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>206298</attachid>
            <date>2013-07-09 01:12:12 -0700</date>
            <delta_ts>2013-07-09 01:12:12 -0700</delta_ts>
            <desc>Testcase for this bug report</desc>
            <filename>index.html</filename>
            <type>text/html</type>
            <size>1135</size>
            <attacher name="Chen Zhixiang">chenzx</attacher>
            
              <data encoding="base64">PGh0bWw+DQo8aGVhZD4NCjx0aXRsZT5zY3JvbGwgdGVzdDwvdGl0bGU+DQo8L2hlYWQ+DQo8Ym9k
eT4KPGRpdj4KPHVsIGlkPSJkZW1vIiBzdHlsZT0ib3ZlcmZsb3c6aGlkZGVuOyBoZWlnaHQ6OTZw
eDsiPgogPGxpID4xMTExMTExMTExMTExMTExMTE8L2xpPgogPGxpID4yMjIyMjIyMjIyMjIyMjIy
MjI8L2xpPgogPGxpID4zMzMzMzMzMzMzMzMzMzMzMzM8L2xpPgogPGxpID40NDQ0NDQ0NDQ0NDQ0
NDQ0NDQ8L2xpPgogPGxpID41NTU1NTU1NTU1NTU1NTU1NTU8L2xpPgogPGxpID42NjY2NjY2NjY2
NjY2NjY2NjY8L2xpPgogPGxpID43Nzc3Nzc3Nzc3Nzc3Nzc3Nzc8L2xpPgogPGxpID44ODg4ODg4
ODg4ODg4ODg4ODg8L2xpPgogPGxpID45OTk5OTk5OTk5OTk5OTk5OTk8L2xpPgo8L3VsPgo8L2Rp
dj4KCjxzY3JpcHQgdHlwZ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