[webkit-reviews] review granted: [Bug 132307] [iOS][WK2] Restore the scroll position and scale from the HistoryItem (mostly) : [Attachment 230328] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 28 16:19:54 PDT 2014


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Benjamin Poulain
<benjamin at webkit.org>'s request for review:
Bug 132307: [iOS][WK2] Restore the scroll position and scale from the
HistoryItem (mostly)
https://bugs.webkit.org/show_bug.cgi?id=132307

Attachment 230328: Patch
https://bugs.webkit.org/attachment.cgi?id=230328&action=review

------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=230328&action=review


> Source/WebKit2/WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:90
> +	       if (page && m_frame->isMainFrame() &&
currentItem->pageScaleFactor())
> +		  
m_frame->page()->restorePageState(currentItem->pageScaleFactor(),
currentItem->scrollPoint());

Is the currentItem->pageScaleFactor() test useful, or just trying to catch odd
uninitialized cases?

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:144
> +    FrameView& frameView = *m_page->mainFrame().view();
> +    frameView.setScrollPosition(scrollPosition);

Odd to put FrameView in a local when you only use it once.

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:145
> +    m_userHasChangedPageScaleFactor = true;

Why? Add a comment?


More information about the webkit-reviews mailing list