[Webkit-unassigned] [Bug 50331] ASSERT failing restoring scroll position from HistoryItem after reload

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 29 18:01:04 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=50331


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #75704|review?                     |review-
               Flag|                            |




--- Comment #10 from Darin Adler <darin at apple.com>  2010-12-29 18:01:04 PST ---
(From update of attachment 75704)
View in context: https://bugs.webkit.org/attachment.cgi?id=75704&action=review

Thanks for tackling this.

> WebCore/loader/FrameLoader.cpp:2410
> +            // If the user had a scroll point, scroll to it, overriding the anchor
> +            // point if any. Also, make sure there's a valid current item in the
> +            // history before trying to scroll because it could happen there was
> +            // none (e.g. loading from a string instead of an URI).
> +            if (m_frame->page() && history()->currentItem()) {
>                  if (isBackForwardLoadType(m_loadType) || m_loadType == FrameLoadTypeReload || m_loadType == FrameLoadTypeReloadFromOrigin)
>                      history()->restoreScrollPositionAndViewState();
>              }

It’s pretty clear looking at this code that the currentItem check belongs inside the restoreScrollPositionAndViewState function, not here at the call site.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list