Bug 31145 - Need notification of scrolling frame
: Need notification of scrolling frame
Status: RESOLVED FIXED
: WebKit
Layout and Rendering
: 528+ (Nightly build)
: PC Mac OS X 10.5
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-11-04 16:45 PST by
Modified: 2009-11-05 15:09 PST (History)


Attachments
Adds FrameLoaderClient::didChangeScrollOffset (1.82 KB, patch)
2009-11-04 16:47 PST, Scott Violet
fishd: review-
Review Patch | Details | Formatted Diff | Diff
Revised patch (1.91 KB, patch)
2009-11-05 07:56 PST, Scott Violet
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-11-04 16:45:15 PST
The notification will be used to know when history state is out of date.
------- Comment #1 From 2009-11-04 16:47:08 PST -------
Created an attachment (id=42532) [details]
Adds FrameLoaderClient::didChangeScrollOffset
------- Comment #2 From 2009-11-04 17:59:58 PST -------
Can you please explain what you mean by the "history state is out of date"?
------- Comment #3 From 2009-11-04 23:21:46 PST -------
The frame's current scroll offset is a property of HistoryItem.  However that field is only updated when HistoryController::saveDocumentAndScrollState() is called, which does not ordinarily happen when a frame scrolls.

Chromium needs a way to know when the scroll offset for any frame has changed, so that it can schedule a call to saveDocumentAndScrollState().  Our objective is to use this as a signal to save session information for Chromium's session restore feature.
------- Comment #4 From 2009-11-04 23:22:55 PST -------
(From update of attachment 42532 [details])
> Index: WebCore/ChangeLog
..
> +        Reviewed by NOBODY (OOPS!).
> +
> +        Adds FrameLoaderClient::didChangeScrollOffset that is called when
> +	the frame scrolls. This will be used to know when history state
> +	needs to be updated.

^^^ fix the indentation

please include a link to this bug.  delete the line below:

> +        No new tests.


LGTM otherwise
------- Comment #5 From 2009-11-05 07:56:14 PST -------
Created an attachment (id=42571) [details]
Revised patch
------- Comment #6 From 2009-11-05 07:57:08 PST -------
Sam, sorry for not being clear on why I want to add this.
Darin, thanks for clarifying!
------- Comment #7 From 2009-11-05 13:46:20 PST -------
(From update of attachment 42571 [details])
r=me per Darin's comments.
------- Comment #8 From 2009-11-05 15:08:55 PST -------
(From update of attachment 42571 [details])
Clearing flags on attachment: 42571

Committed r50580: <http://trac.webkit.org/changeset/50580>
------- Comment #9 From 2009-11-05 15:09:01 PST -------
All reviewed patches have been landed.  Closing bug.