Bug 125769

Summary: [iOS] Upstream WebCore/history changes
Product: WebKit Reporter: Daniel Bates <dbates>
Component: HistoryAssignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, ddkilzer, joepeck
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch darin: review+

Description Daniel Bates 2013-12-16 00:54:36 PST
Upstream the iOS related changes to WebCore/history.
Comment 1 Daniel Bates 2013-12-16 00:55:50 PST
Created attachment 219301 [details]
Patch
Comment 2 Darin Adler 2013-12-16 10:06:51 PST
Comment on attachment 219301 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=219301&action=review

> Source/WebCore/history/CachedPage.cpp:103
> +#if !PLATFORM(IOS)
>      if (Element* element = focusedDocument->focusedElement())
>          element->updateFocusAppearance(true);
> +#else
> +    if (Element* element = focusedDocument->focusedElement()) {
> +        // We don't want focused nodes changing scroll position when restoring from the cache
> +        // as it can cause ugly jumps before we manage to restore the cached position.
> +        page.mainFrame().selection().suppressScrolling();
> +        element->updateFocusAppearance(true);
> +        page.mainFrame().selection().restoreScrolling();
> +    }
> +#endif

The #if should be around the calls to suppress/restoreScrolling, not around the entire block.
Comment 3 Daniel Bates 2013-12-16 15:51:01 PST
Committed r160669: <http://trac.webkit.org/changeset/160669>