WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
46696
Document::nodesFromRect should not consider zoom factor.
https://bugs.webkit.org/show_bug.cgi?id=46696
Summary
Document::nodesFromRect should not consider zoom factor.
Antonio Gomes
Reported
2010-09-27 21:48:35 PDT
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Kenneth Rohde Christiansen
Comment 1
2010-09-28 04:55:10 PDT
What about scale? Like we scale the QPainter when "zooming" using our tiling implementation.
Benjamin Poulain
Comment 2
2010-09-28 05:36:04 PDT
(In reply to
comment #1
)
> What about scale? Like we scale the QPainter when "zooming" 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
.
Antonio Gomes
Comment 3
2010-09-28 05:48:13 PDT
(In reply to
comment #2
)
> (In reply to
comment #1
) > > What about scale? Like we scale the QPainter when "zooming" 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
.
so when Qt scales the tiled backing store, it does not call webkit's zoom factor? I will think and test and let you know.
Kenneth Rohde Christiansen
Comment 4
2010-09-28 05:57:25 PDT
(In reply to
comment #3
)
> (In reply to
comment #2
) > > (In reply to
comment #1
) > > > What about scale? Like we scale the QPainter when "zooming" 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
. > > so when Qt scales the tiled backing store, it does not call webkit's zoom factor? > > 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's forget about text-only zoom for now) you do not scale the native-rendered html forms, though we "try" 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 "initial-scale" :-) and not "initial-zoom..."
Antonio Gomes
Comment 5
2010-09-28 08:49:57 PDT
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.
Antonio Gomes
Comment 6
2011-10-06 06:50:25 PDT
In fact, the bug is the other way around. WebCore'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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug