| Summary: | Scroll-snap points needs to be updated during programmatic scrolls | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> | ||||
| Component: | Layout and Rendering | Assignee: | Brent Fulgham <bfulgham> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | bfulgham, dino, simon.fraser, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=145318 | ||||||
| Attachments: |
|
||||||
|
Description
Brent Fulgham
2015-05-20 11:38:48 PDT
Created attachment 253492 [details]
Patch
Comment on attachment 253492 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=253492&action=review > Source/WebCore/platform/ScrollAnimator.cpp:172 > + updateActiveScrollSnapIndexForOffset(); I'm worried this might get hit too frequently, but in my tests it only seems to get called from "notifyPositionChanged" coming from Async scrolling notifications, so I think it's okay. Comment on attachment 253492 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=253492&action=review > Source/WebCore/platform/cocoa/ScrollController.mm:730 > + (void)closestSnapOffset<LayoutUnit, float>(snapState.m_snapOffsets, clampedOffset, 0, activeIndex); For my own information, why do you need to cast here? Comment on attachment 253492 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=253492&action=review >> Source/WebCore/platform/cocoa/ScrollController.mm:730 >> + (void)closestSnapOffset<LayoutUnit, float>(snapState.m_snapOffsets, clampedOffset, 0, activeIndex); > > For my own information, why do you need to cast here? 'closestSnapOffset' returns a LayoutUnit, which I don't care about. So instead of assigning it to a temporary, and saying (void)temporary (or UNUSED_ALWAYS(blah)) I just do the cast here to tell the compiler that I don't care about the return value. Committed r184728: <http://trac.webkit.org/changeset/184728> |