WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
105546
Add window.internals.nonFastScrollableRects for testing scrollable areas in fast/slow paths
https://bugs.webkit.org/show_bug.cgi?id=105546
Summary
Add window.internals.nonFastScrollableRects for testing scrollable areas in f...
Xianzhu Wang
Reported
2012-12-20 09:41:40 PST
We need to test if a scrollable area will be scrolled in fast/slow path in
bug 105075
and
bug 104950
.
Attachments
Patch to grab missing symbols on ews
(10.21 KB, patch)
2012-12-20 10:42 PST
,
Xianzhu Wang
no flags
Details
Formatted Diff
Diff
Patch to grab win symbol
(12.33 KB, patch)
2012-12-20 11:15 PST
,
Xianzhu Wang
no flags
Details
Formatted Diff
Diff
Patch for review
(13.92 KB, patch)
2012-12-20 13:09 PST
,
Xianzhu Wang
no flags
Details
Formatted Diff
Diff
Patch to fail to grab win symbol
(11.56 KB, patch)
2012-12-21 10:01 PST
,
Xianzhu Wang
no flags
Details
Formatted Diff
Diff
Retry ews-win to grab symbol
(11.47 KB, patch)
2012-12-21 17:35 PST
,
Xianzhu Wang
no flags
Details
Formatted Diff
Diff
Patch
(12.17 KB, patch)
2013-01-04 10:52 PST
,
Xianzhu Wang
no flags
Details
Formatted Diff
Diff
Patch
(10.31 KB, patch)
2013-01-04 11:48 PST
,
Xianzhu Wang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Xianzhu Wang
Comment 1
2012-12-20 10:42:57 PST
Created
attachment 180364
[details]
Patch to grab missing symbols on ews
Build Bot
Comment 2
2012-12-20 11:06:46 PST
Comment on
attachment 180364
[details]
Patch to grab missing symbols on ews
Attachment 180364
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/15459060
Xianzhu Wang
Comment 3
2012-12-20 11:15:49 PST
Created
attachment 180375
[details]
Patch to grab win symbol
Build Bot
Comment 4
2012-12-20 11:52:39 PST
Comment on
attachment 180375
[details]
Patch to grab win symbol
Attachment 180375
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/15461038
Xianzhu Wang
Comment 5
2012-12-20 13:09:52 PST
Created
attachment 180396
[details]
Patch for review
Tien-Ren Chen
Comment 6
2012-12-20 19:16:41 PST
I think it would be more useful to export the rects as javascript arrays. That way it is easier to write test scripts to generate absolute <divs> on the page, in case we want to make it a pixel test.
Xianzhu Wang
Comment 7
2012-12-21 10:01:32 PST
(In reply to
comment #6
)
> I think it would be more useful to export the rects as javascript arrays. That way it is easier to write test scripts to generate absolute <divs> on the page, in case we want to make it a pixel test.
Done.
Xianzhu Wang
Comment 8
2012-12-21 10:01:53 PST
Created
attachment 180531
[details]
Patch to fail to grab win symbol
Build Bot
Comment 9
2012-12-21 10:31:55 PST
Comment on
attachment 180531
[details]
Patch to fail to grab win symbol
Attachment 180531
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/15455461
Tien-Ren Chen
Comment 10
2012-12-21 14:53:58 PST
(In reply to
comment #7
)
> (In reply to
comment #6
) > > I think it would be more useful to export the rects as javascript arrays. That way it is easier to write test scripts to generate absolute <divs> on the page, in case we want to make it a pixel test. > > Done.
Thanks! I really like this patch! nits: By the way, the rects returned will be in absolute coordinates right? I think we can reuse ClientRect as the return type -- not worth the trouble to create another rect type, and some other internal functions are already doing this. However I think we should document it somehow. Maybe a line of comment? Or change the function name to nonFastScrollableAbsoluteRects? I don't have a strong opinion to either. Your call.
Xianzhu Wang
Comment 11
2012-12-21 16:48:54 PST
(In reply to
comment #10
)
> Thanks! I really like this patch! > > nits: By the way, the rects returned will be in absolute coordinates right? I think we can reuse ClientRect as the return type -- not worth the trouble to create another rect type, and some other internal functions are already doing this. However I think we should document it somehow. Maybe a line of comment? Or change the function name to nonFastScrollableAbsoluteRects? I don't have a strong opinion to either. Your call.
The rects will be in the coordinates of the frame corresponding to the document parameter of the function.
Xianzhu Wang
Comment 12
2012-12-21 17:35:05 PST
Created
attachment 180580
[details]
Retry ews-win to grab symbol
Tien-Ren Chen
Comment 13
2012-12-21 17:36:37 PST
(In reply to
comment #11
)
> (In reply to
comment #10
) > > Thanks! I really like this patch! > > > > nits: By the way, the rects returned will be in absolute coordinates right? I think we can reuse ClientRect as the return type -- not worth the trouble to create another rect type, and some other internal functions are already doing this. However I think we should document it somehow. Maybe a line of comment? Or change the function name to nonFastScrollableAbsoluteRects? I don't have a strong opinion to either. Your call. > > The rects will be in the coordinates of the frame corresponding to the document parameter of the function.
It is absolute rect, as seen from: IntRect RenderLayer::scrollableAreaBoundingBox() const { return renderer()->absoluteBoundingBoxRect(); } The definition of absolute rect is simple. Means its position is the same as if you add a position:absolute box on the document body. It becomes complicated with the Chromium Android scaling model (applyPageScaleFactorInCompositor() == false) though. In this mode RenderObject::absoluteRect WILL BE SCALED by the page scale factor. That is why we have another term "normalized coordinate" to describe the unscaled absolute rect. It is unlikely to fix absolute rect without breaking everything. Sorry. :( Bonus: We also have this client coordinate, which is measured relative to the upper left of the viewport, in CSS pixels. It is essentially the same as if you add a position:fixed box on the document body. (Not entirely true, FrameView::scrollOffsetForFixedPosition() can return arbitrary offset to layout fixed position) For Chromium Android M18 the client coordinates have similar scaling problem as absolute coordinates. I submitted a few patches recently to make sure most of the DOM object to correctly input/output unscaled coordinate. In next release they will work properly.
Build Bot
Comment 14
2012-12-21 22:55:49 PST
Comment on
attachment 180580
[details]
Retry ews-win to grab symbol
Attachment 180580
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/15451681
Xianzhu Wang
Comment 15
2013-01-04 10:52:40 PST
Created
attachment 181333
[details]
Patch
James Robinson
Comment 16
2013-01-04 11:00:50 PST
Comment on
attachment 181333
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=181333&action=review
> Source/WebCore/dom/ClientRectList.h:43 > static PassRefPtr<ClientRectList> create(const Vector<FloatQuad>& quads) { return adoptRef(new ClientRectList(quads)); } > + static PassRefPtr<ClientRectList> create(const Vector<FloatRect>& rects) { return adoptRef(new ClientRectList(rects)); }
Is this necessary? All FloatRects are also FloatQuads and I don't think this case is performance sensitive enough to need special casing.
Xianzhu Wang
Comment 17
2013-01-04 11:48:05 PST
Created
attachment 181350
[details]
Patch
Xianzhu Wang
Comment 18
2013-01-04 11:50:13 PST
(In reply to
comment #16
)
> (From update of
attachment 181333
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=181333&action=review
> > > Source/WebCore/dom/ClientRectList.h:43 > > static PassRefPtr<ClientRectList> create(const Vector<FloatQuad>& quads) { return adoptRef(new ClientRectList(quads)); } > > + static PassRefPtr<ClientRectList> create(const Vector<FloatRect>& rects) { return adoptRef(new ClientRectList(rects)); } > > Is this necessary? All FloatRects are also FloatQuads and I don't think this case is performance sensitive enough to need special casing.
Agreed. Removed the added create() and constructor.
Xianzhu Wang
Comment 19
2013-01-07 12:02:09 PST
@jamesr, does the latest patch look good to you?
James Robinson
Comment 20
2013-01-07 13:44:51 PST
Comment on
attachment 181350
[details]
Patch R=me
WebKit Review Bot
Comment 21
2013-01-07 14:14:55 PST
Comment on
attachment 181350
[details]
Patch Clearing flags on attachment: 181350 Committed
r138991
: <
http://trac.webkit.org/changeset/138991
>
WebKit Review Bot
Comment 22
2013-01-07 14:15:02 PST
All reviewed patches have been landed. Closing bug.
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