WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
134238
[iOS WK2] Page jumps when rubber-banding on azuremagazine.com
https://bugs.webkit.org/show_bug.cgi?id=134238
Summary
[iOS WK2] Page jumps when rubber-banding on azuremagazine.com
Simon Fraser (smfr)
Reported
2014-06-23 21:33:32 PDT
[iOS WK2] Page jumps when rubber-banding on azuremagazine.com
Attachments
Patch
(6.45 KB, patch)
2014-06-23 21:37 PDT
,
Simon Fraser (smfr)
no flags
Details
Formatted Diff
Diff
Patch
(6.40 KB, patch)
2014-06-24 14:03 PDT
,
Simon Fraser (smfr)
no flags
Details
Formatted Diff
Diff
Patch
(6.79 KB, patch)
2014-06-24 18:30 PDT
,
Simon Fraser (smfr)
no flags
Details
Formatted Diff
Diff
Patch
(5.22 KB, patch)
2014-06-25 15:14 PDT
,
Simon Fraser (smfr)
benjamin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2014-06-23 21:37:04 PDT
Created
attachment 233679
[details]
Patch
Benjamin Poulain
Comment 2
2014-06-24 01:51:07 PDT
Comment on
attachment 233679
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=233679&action=review
> Source/WebKit2/UIProcess/ios/WKScrollView.mm:224 > + CGSize maxContentOffset = CGSizeMake(contentSize.width - bounds.size.width, contentSize.height - bounds.size.height);
I am a little confused by this. Why does this max offset ignore the contentInsets?
> Source/WebKit2/UIProcess/ios/WKScrollView.mm:229 > + adjustedOffset.y = maxContentOffset.width + edgeInsets.right + rubberbandAmount.width;
.y here instead of .x
> Source/WebKit2/UIProcess/ios/WKScrollView.mm:236 > + [self setContentOffset:adjustedOffset];
Does UIScrollView just resume rubberbanding from that offset?
Simon Fraser (smfr)
Comment 3
2014-06-24 10:47:40 PDT
(In reply to
comment #2
)
> (From update of
attachment 233679
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=233679&action=review
> > > Source/WebKit2/UIProcess/ios/WKScrollView.mm:224 > > + CGSize maxContentOffset = CGSizeMake(contentSize.width - bounds.size.width, contentSize.height - bounds.size.height); > > I am a little confused by this. Why does this max offset ignore the contentInsets?
I just took edge insets into account lower down, but can move them up here.
> > > Source/WebKit2/UIProcess/ios/WKScrollView.mm:229 > > + adjustedOffset.y = maxContentOffset.width + edgeInsets.right + rubberbandAmount.width; > > .y here instead of .x
Thanks.
> > Source/WebKit2/UIProcess/ios/WKScrollView.mm:236 > > + [self setContentOffset:adjustedOffset]; > > Does UIScrollView just resume rubberbanding from that offset?
It seems to, yes.
Simon Fraser (smfr)
Comment 4
2014-06-24 14:03:50 PDT
Created
attachment 233738
[details]
Patch
Simon Fraser (smfr)
Comment 5
2014-06-24 14:37:16 PDT
Comment on
attachment 233738
[details]
Patch Not right when the page gets longer.
Simon Fraser (smfr)
Comment 6
2014-06-24 18:30:50 PDT
Created
attachment 233773
[details]
Patch
WebKit Commit Bot
Comment 7
2014-06-24 18:33:09 PDT
Attachment 233773
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/ios/WKScrollView.mm:235: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/WebKit2/UIProcess/ios/WKScrollView.mm:245: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 2 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Benjamin Poulain
Comment 8
2014-06-24 19:32:50 PDT
Comment on
attachment 233773
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=233773&action=review
I think that is okay for growing content. At the next timer update, the new BouncingDecelerationOffset will be withint bounds.
> Source/WebKit2/UIProcess/ios/WKScrollView.h:37 > +- (void)_setContentSizePreservingContentOffsetDuringRubberband:(CGSize)contentSize; > +
Not sure you need the blank lines below and above, I know nothing about Obj-C coding style :)
> Source/WebKit2/UIProcess/ios/WKScrollView.mm:234 > + if (rubberbandAmount.width < 0) // Left > + adjustedOffset.x = -edgeInsets.left + rubberbandAmount.width;
I think you should check this in the case where the page size change when it is scaled smaller than the viewport minimum size. It may work as expected because in _currentRubberbandAmount, you check for top/left before bottom/right, but better check.
> Source/WebKit2/UIProcess/ios/WKScrollView.mm:260 > + if (CGSizeEqualToSize(currentContentSize, CGSizeZero) || CGSizeEqualToSize(currentContentSize, contentSize)) {
You could early return on CGSizeEqualToSize(currentContentSize, contentSize).
Simon Fraser (smfr)
Comment 9
2014-06-25 15:14:39 PDT
Created
attachment 233840
[details]
Patch
Simon Fraser (smfr)
Comment 10
2014-06-25 21:17:48 PDT
https://trac.webkit.org/r170463
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug