Bug 198597 - Don't expose negative scrollLeft/scrollTop during rubber-banding
Summary: Don't expose negative scrollLeft/scrollTop during rubber-banding
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-06-05 19:52 PDT by Simon Fraser (smfr)
Modified: 2019-09-12 08:23 PDT (History)
5 users (show)

See Also:


Attachments
Patch (26.70 KB, patch)
2019-06-05 19:57 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2019-06-05 19:52:11 PDT
Don't expose negative scrollLeft/scrollTop during rubber-banding
Comment 1 Simon Fraser (smfr) 2019-06-05 19:57:21 PDT
Created attachment 371468 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2019-06-05 19:58:33 PDT
<rdar://problem/51467217>
Comment 3 Antti Koivisto 2019-06-06 01:36:16 PDT
Comment on attachment 371468 [details]
Patch

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

> Source/WebCore/platform/ScrollView.h:224
> +    WEBCORE_EXPORT ScrollPosition scrollPosition(ScrollClamping = ScrollClamping::Unclamped) const final;

Alternatively these functions could return both clamped and unclamped values as a struct, avoiding parameter passing.
Comment 4 Simon Fraser (smfr) 2019-06-06 10:54:34 PDT
(In reply to Antti Koivisto from comment #3)
> Comment on attachment 371468 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=371468&action=review
> 
> > Source/WebCore/platform/ScrollView.h:224
> > +    WEBCORE_EXPORT ScrollPosition scrollPosition(ScrollClamping = ScrollClamping::Unclamped) const final;
> 
> Alternatively these functions could return both clamped and unclamped values
> as a struct, avoiding parameter passing.

I think that would be even more plumbing.

I'm worried that this isn't web compatible, so I'll hold off on landing this.
Comment 5 Simon Fraser (smfr) 2019-06-12 15:30:43 PDT
Comment on attachment 371468 [details]
Patch

Not going to land until I'm more convinced this won't break things.