Bug 31145 - Need notification of scrolling frame
: Need notification of scrolling frame
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering
: 528+ (Nightly build)
: PC Mac OS X 10.5
: P2 Normal
Assigned To: Nobody
Depends on:
  Show dependency treegraph
Reported: 2009-11-04 16:45 PST by Scott Violet
Modified: 2009-11-05 15:09 PST (History)
4 users (show)

See Also:

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

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Violet 2009-11-04 16:45:15 PST
The notification will be used to know when history state is out of date.
Comment 1 Scott Violet 2009-11-04 16:47:08 PST
Created attachment 42532 [details]
Adds FrameLoaderClient::didChangeScrollOffset
Comment 2 Sam Weinig 2009-11-04 17:59:58 PST
Can you please explain what you mean by the "history state is out of date"?
Comment 3 Darin Fisher (:fishd, Google) 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 Darin Fisher (:fishd, Google) 2009-11-04 23:22:55 PST
Comment on attachment 42532 [details]
Adds FrameLoaderClient::didChangeScrollOffset

> 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 Scott Violet 2009-11-05 07:56:14 PST
Created attachment 42571 [details]
Revised patch
Comment 6 Scott Violet 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 Dimitri Glazkov (Google) 2009-11-05 13:46:20 PST
Comment on attachment 42571 [details]
Revised patch

r=me per Darin's comments.
Comment 8 WebKit Commit Bot 2009-11-05 15:08:55 PST
Comment on attachment 42571 [details]
Revised patch

Clearing flags on attachment: 42571

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