Closed Bug 586621 Opened 14 years ago Closed 14 years ago

Use animation-scheduling API for smooth scrollbox scrolling

Categories

(Toolkit :: UI Widgets, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b5

People

(Reporter: dao, Assigned: dao)

References

Details

(Keywords: perf, polish)

Attachments

(1 file, 2 obsolete files)

Attached patch WIP (obsolete) — Splinter Review
      No description provided.
Summary: Use animation-scheduling API for scrollbox smooth scrolling → Use animation-scheduling API for smooth scrollbox scrolling
Attached patch patch (obsolete) — Splinter Review
Attachment #465208 - Attachment is obsolete: true
Attachment #465211 - Attachment description: WIP → patch
Attachment #465211 - Flags: review?(enndeakin)
Comment on attachment 465211 [details] [diff] [review]
patch

>+          const base = 2;
>+          const power = 4;
>+          const pos = timePassed >= this.duration ? 1 :
>+                      1 - (Math.pow(base * (1 - (timePassed / this.duration)), power) /
>+                           Math.pow(base, power));

Can't this just be reduced to:

const pos = timePassed >= this.duration ? 1 :
            1 - Math.pow(1 - timePassed / this.duration), 4)
Attachment #465211 - Flags: review?(enndeakin) → review+
yeah, it's identical
Attachment #465211 - Attachment is obsolete: true
Attachment #466311 - Flags: approval2.0?
Comment on attachment 466311 [details] [diff] [review]
patch, review comment addressed

What's our test coverage like on this?
Attachment #466311 - Flags: approval2.0? → approval2.0+
(In reply to comment #4)
> What's our test coverage like on this?

As far as I know, we have tests for scrollbox scrolling only with smooth scrolling disabled. This ensures that the distance needed to scroll to an element is correct, since this is using the same code path with and without smooth scrolling. But we don't test how smooth scrolling itself operates.
http://hg.mozilla.org/mozilla-central/rev/5c5c3bf8dfeb
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: