Closed
Bug 3153
Opened 26 years ago
Closed 25 years ago
[History] Preserve scroll offset information across reconstructs.
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Tracking
()
M10
People
(Reporter: dbaron, Assigned: nisheeth_mozilla)
References
()
Details
The reflow after stylesheet reload messes up named anchors, moving things back
up to the top of the page.
See also bugs 2765 and 3152.
Updated•26 years ago
|
Assignee: peterl → troy
Comment 1•26 years ago
|
||
Troy, can you take a look at this? (or possibly hand off to whoever did scroll
to named anchor on load) It needs to reset the scroll position after a frame
reconstruct.
Peter, the scroll to anchor on initial load is handled by the content sink. That
implementation isn't applicable here, and what needs to happen is the frame
reconstruct code needs to:
- detect that there's a named anchor
- call nsIPresShell::GoToAnchor() passing in the anchor name
It probably isn't the frame reconstruct code that should do this, because it
doesn't know why the reconstruct is happening. Maybe the code that does the
stylesheet reload should trigger the GoToAnchor() call?
Comment 3•26 years ago
|
||
There's the corresponding problem that a reconstruct (which can happen at any
time due to a DOM call setting certain style, or turning style sheets on/off)
will always reset the scrolling to the top of the window. We need a general
mechanism to preserve scroll offset information accross a reconstruct (whether
it be due to scroll to anchor or just the user scrolling the window).
The scroll reset problem is further complicated by the fact that after the
reconstruct, the content is likely to layout significantly differently. So we
can't just preserve the y offset, we need to capture what element was at the
top of the window and rescroll to there...
Yes, I completely agree. This is the same problem we'll have when going Back or
Forward in the session history as well. Today we don't do that, either.
We need to do something like: get the current element at the top of the page and
then force a scroll to that element after doing the reload. How we remember the
element is debatable: it's easy if it has a name, of course.
Okay, I'm assigning this to Nisheeth, because he's Mr. Web Shell and the Web
Shell needs to do this for Back/Forward. Then we'll just mooch off that code...
Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M5
Assignee | ||
Comment 5•26 years ago
|
||
Accepting bug and setting milestone to M5...
Comment 6•25 years ago
|
||
Adding myself as cc...
Assignee | ||
Comment 7•25 years ago
|
||
Moving history and link clicking related problems to M6...
Assignee | ||
Comment 8•25 years ago
|
||
Moving non-crashing layout and webshell component bugs to M8...
I already have enough blockers and crashers for M6. If I fix them in time for
M6, I'll move some of these bugs back to the M6 milestone.
I'm keeping the M7 milestone for fixing XML bugs.
Assignee | ||
Updated•25 years ago
|
Summary: reflow messes up URLs with named anchors → [History] reflow messes up URLs with named anchors
Target Milestone: M8 → M9
Assignee | ||
Comment 9•25 years ago
|
||
Radha will fix this while implementing the notion of a history state object for
each page. Updating summary, ccing her, and setting target milestone to M9.
Assignee | ||
Updated•25 years ago
|
Summary: [History] reflow messes up URLs with named anchors → [History] Preserve scroll offset information across reconstructs.
Assignee | ||
Comment 10•25 years ago
|
||
Updating summary.
Assignee | ||
Comment 11•25 years ago
|
||
*** Bug 9351 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 12•25 years ago
|
||
The owner for doing the saving/reconstructing document state is still to be
determined. This work will probaly happen in the M10, M11 timeframe. Moving
bug out to M10 for now...
Assignee | ||
Updated•25 years ago
|
Target Milestone: M9 → M10
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 13•25 years ago
|
||
*** This bug has been marked as a duplicate of 9958 ***
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 14•25 years ago
|
||
Verifying bug dup of #9958 regarding the implementing the notion of a history
state object
You need to log in
before you can comment on or make changes to this bug.
Description
•