<?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>46696</bug_id>
          
          <creation_ts>2010-09-27 21:48:35 -0700</creation_ts>
          <short_desc>Document::nodesFromRect should not consider zoom factor.</short_desc>
          <delta_ts>2011-10-06 06:50:25 -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>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>68075</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Antonio Gomes">tonikitoo</reporter>
          <assigned_to name="Antonio Gomes">tonikitoo</assigned_to>
          <cc>aroben</cc>
    
    <cc>benjamin</cc>
    
    <cc>fsamuel</cc>
    
    <cc>kenneth</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>286057</commentid>
    <comment_count>0</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2010-09-27 21:48:35 -0700</bug_when>
    <thetext>The primary goal for Document::nodesFromRect is to return all nodes whose area intersect a given rect. The parameters of this methods should be passed in in viewport coordinates. Internally, before performing the rect-based hit test, the method gets contents coordinates off of the original parameters (by considering the scroll offset).

A bug in the current implementation, however, is that it should *not* consider the zoom factor, differently from elementFromPoint.

Reason: no matter the zoom factor one might had set to the view, Document::nodesFromRect() should return the nodes under the exactly position the caller provided.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286183</commentid>
    <comment_count>1</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2010-09-28 04:55:10 -0700</bug_when>
    <thetext>What about scale? Like we scale the QPainter when &quot;zooming&quot; using our tiling implementation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286191</commentid>
    <comment_count>2</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2010-09-28 05:36:04 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; What about scale? Like we scale the QPainter when &quot;zooming&quot; using our tiling implementation.

That is a very good point.
This scaling also affect the way Qt implement https://bugs.webkit.org/show_bug.cgi?id=44088.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286192</commentid>
    <comment_count>3</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2010-09-28 05:48:13 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (In reply to comment #1)
&gt; &gt; What about scale? Like we scale the QPainter when &quot;zooming&quot; using our tiling implementation.
&gt; 
&gt; That is a very good point.
&gt; This scaling also affect the way Qt implement https://bugs.webkit.org/show_bug.cgi?id=44088.

so when Qt scales the tiled backing store, it does not call webkit&apos;s zoom factor?

I will think and test and let you know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286193</commentid>
    <comment_count>4</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2010-09-28 05:57:25 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; (In reply to comment #1)
&gt; &gt; &gt; What about scale? Like we scale the QPainter when &quot;zooming&quot; using our tiling implementation.
&gt; &gt; 
&gt; &gt; That is a very good point.
&gt; &gt; This scaling also affect the way Qt implement https://bugs.webkit.org/show_bug.cgi?id=44088.
&gt; 
&gt; so when Qt scales the tiled backing store, it does not call webkit&apos;s zoom factor?
&gt; 
&gt; I will think and test and let you know.

It does not. There is a difference between scale and zoom. For instance when zooming (let&apos;s forget about text-only zoom for now) you do not scale the native-rendered html forms, though we &quot;try&quot; to adjust their sizes which is not always possible.

Scaling, scales everything and this is what you see on mobile devices, even the viewport meta tag uses values such as &quot;initial-scale&quot; :-) and not &quot;initial-zoom...&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286272</commentid>
    <comment_count>5</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2010-09-28 08:49:57 -0700</bug_when>
    <thetext>Well, I have not check the source yet, but for scaling it should work in the same way as it does currently for clicking  with it is scaled: the click point has to be translated to something webcore understands, anyways.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>479130</commentid>
    <comment_count>6</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2011-10-06 06:50:25 -0700</bug_when>
    <thetext>In fact, the bug is the other way around. WebCore&apos;s page zoom _has_ to be considered when calling Document::nodesFromRect.

The padding values have to be inversely proportional to the current webcore zoom factor.  Same with scaling: but in the scaling case, probably the easier is the caller site to actually pass the padding values adjusted according to the current scale.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>