Factor out some functionalities in PresShell::ScrollFrameRectIntoView into new functions
Categories
(Core :: Layout, enhancement, P2)
Tracking
()
| Fission Milestone | M8 |
People
(Reporter: hiro, Assigned: hiro)
References
(Blocks 1 open bug)
Details
Attachments
(3 obsolete files)
Similar to bug 1553012, but this is for selection. For selection we need to use PresShell::ScrollFrameRectIntoView across document boundaries. layout/base/tests/test_scroll_selection_into_view.html has a test case that is selection happens in an iframe?
| Assignee | ||
Comment 2•7 years ago
|
||
I did a brief chat with masayuki about this (in the bus heading to Whister), and the conclusion is that we don't need to scroll selections across document boundaries. So probably we should set ScrollNoParentFrames in the case where we call ScrollFrameRectIntoView for selections.
Comment 3•7 years ago
|
||
It'd be nice to split the function into two, have ScrollFrameRectIntoViewCrossDoc (that returns void, since we can't know the answer synchronously with fission), and normal ScrollFrameRectIntoView (which implies ScrollNoParentFrames, and returns bool).
Updated•7 years ago
|
| Assignee | ||
Comment 4•7 years ago
|
||
This would be a bit cleaner once after we drop PresShell* argument from ScrollToShowRect in bug 1562503.
(In reply to Matt Woodrow (:mattwoodrow) from comment #3)
It'd be nice to split the function into two, have ScrollFrameRectIntoViewCrossDoc (that returns void, since we can't know the answer synchronously with fission), and normal ScrollFrameRectIntoView (which implies ScrollNoParentFrames, and returns bool).
Now I think we need three different ScrollFrameRectIntoViews;
- ScrollRectIntoView
- ScrollRectIntoViewSameOriginDoc for Element.scrollIntoView (bug 1561754 is to restrict it in the same origin)
- ScrollRectIntoViewCrossOriginDoc for 'Find in page'
Comment 5•5 years ago
|
||
Hiro, what are the next steps here? This sounds like something we should track for Fission, correct?
| Assignee | ||
Comment 6•5 years ago
|
||
Changing bug tile to reflect what we should do.
Comment 7•5 years ago
|
||
I believe this should be Fission release blocker (M8).
Comment 8•5 years ago
|
||
Hiro, will you be working on this for Fission M8?
| Assignee | ||
Comment 9•5 years ago
|
||
Though I didn't have the plan to work on this, but if this needs an owner, I will manage to take time on this until M8.
Comment 10•5 years ago
|
||
Is this bug for fixing an error in the fission case (e.g. scrolling works incorrectly), or is it a refactoring task? I'm having a bit of trouble telling from the bug description :-)
| Assignee | ||
Comment 12•5 years ago
|
||
Looking at the ScrollFrameRectIntoView function, it turns out splitting it into cross or in-process ones is not a good idea because the function is basically walking up frame tree and scrolling each scrollable frame until there is no parent frame and even if there is no parent frame if it's in OOP iframe, then deferring the scroll-frame-into-view task to the parent content. So I am going to just factor out some functionalities in the function to make it smaller.
| Assignee | ||
Comment 13•5 years ago
|
||
| Assignee | ||
Comment 14•5 years ago
|
||
Depends on D116958
| Assignee | ||
Comment 15•5 years ago
|
||
Depends on D116959
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
| Assignee | ||
Comment 16•5 years ago
|
||
As discussed with Emilo on Matrix, we are not going to touch the function (for now). If someone has idea to make it less messy, please feel free to do it in a different bug. Thanks!
| Assignee | ||
Updated•5 years ago
|
Description
•