Bug 132239

Summary: REGRESSION (r164702): Double tap doesn't stay under the new element once the animation finishes
Product: WebKit Reporter: Tim Horton <thorton>
Component: WebKit2Assignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, sam, simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
sam: review+
followup darin: review+

Description Tim Horton 2014-04-27 15:20:23 PDT
The early return added to WebPage::scalePage is wrong because the origin can be different (and it only checks the scale), and also because it doesn't consult the PluginView's page scale.

<rdar://problem/16192842>
Comment 1 Tim Horton 2014-04-27 15:24:23 PDT
Created attachment 230270 [details]
patch
Comment 2 Tim Horton 2014-04-27 15:48:31 PDT
http://trac.webkit.org/changeset/167864
Comment 3 Benjamin Poulain 2014-04-27 18:44:31 PDT
This fixes OS X but breaks iOS. :(
Comment 4 Benjamin Poulain 2014-04-27 18:54:08 PDT
Ok, this breaks animated resize and the initial scale logic on iOS.

The patch is okay for OS X, we should split this for iOS IMHO.
Comment 5 Tim Horton 2014-04-27 19:34:33 PDT
(In reply to comment #4)
> Ok, this breaks animated resize and the initial scale logic on iOS.
> 
> The patch is okay for OS X, we should split this for iOS IMHO.

What kind of split are you proposing? Also, does iOS just disregard the origin parameter?
Do we need to just additionally not do the dynamic size update/scaleFactorWasSetFromUIProcess bits if the scale doesn't change?
Comment 6 Benjamin Poulain 2014-04-27 20:00:47 PDT
(In reply to comment #5)
> (In reply to comment #4)
> > Ok, this breaks animated resize and the initial scale logic on iOS.
> > 
> > The patch is okay for OS X, we should split this for iOS IMHO.
> 
> What kind of split are you proposing?

See https://bugs.webkit.org/show_bug.cgi?id=126022
It looks like WebPage::scalePage() and Page::setPageScaleFactor() do not work well when the scroll position is not handled by the ScrollView.

> Also, does iOS just disregard the origin parameter?

Yep, iOS uses delegateScrolling(), and Page::setPageScaleFactor() must ignore the scroll position or we will re-enter WebPage. Simon fixed that a while ago.

> Do we need to just additionally not do the dynamic size update/scaleFactorWasSetFromUIProcess bits if the scale doesn't change?

Yep, short term we should do that to unbreak iOS.
Longer term we should look into having a single coherent path for setting the scroll position from WebCore, in the same way that we have the coherent path for scale+scroll update from the UIProcess.
Comment 7 Tim Horton 2014-04-27 20:48:04 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > Ok, this breaks animated resize and the initial scale logic on iOS.
> > > 
> > > The patch is okay for OS X, we should split this for iOS IMHO.
> > 
> > What kind of split are you proposing?
> 
> See https://bugs.webkit.org/show_bug.cgi?id=126022
> It looks like WebPage::scalePage() and Page::setPageScaleFactor() do not work well when the scroll position is not handled by the ScrollView.

Hmmpfh. Ok.

> > Also, does iOS just disregard the origin parameter?
> 
> Yep, iOS uses delegateScrolling(), and Page::setPageScaleFactor() must ignore the scroll position or we will re-enter WebPage. Simon fixed that a while ago.
> 
> > Do we need to just additionally not do the dynamic size update/scaleFactorWasSetFromUIProcess bits if the scale doesn't change?
> 
> Yep, short term we should do that to unbreak iOS.
> Longer term we should look into having a single coherent path for setting the scroll position from WebCore, in the same way that we have the coherent path for scale+scroll update from the UIProcess.

OK, I'll post a patch to just do that to unbreak iOS, for now. Reopening for that.
Comment 8 Tim Horton 2014-04-27 20:54:57 PDT
Created attachment 230277 [details]
followup
Comment 9 Tim Horton 2014-04-27 21:08:13 PDT
http://trac.webkit.org/changeset/167869
Comment 10 Benjamin Poulain 2014-04-27 22:40:01 PDT
Thanks!