Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Used cached doc position in getLayoutRect. #2547

Merged
merged 1 commit into from Mar 28, 2016

Conversation

cramforce
Copy link
Member

This showed up benchmarking real world docs.

@mkhatib
Copy link
Contributor

mkhatib commented Mar 11, 2016

Does this address #2424?

@cramforce
Copy link
Member Author

@mkhatib Nope that is separate, but good question!

const scrollTop = this.getScrollTop();
const scrollLeft = this.getScrollLeft();
getLayoutRect(el, opt_scrollLeft, opt_scrollTop) {
const scrollTop = opt_scrollTop || this.getScrollTop();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to do this on 0?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No! Fixed.

@dvoytenko
Copy link
Contributor

LGTM

This showed up benchmarking real world docs.
@cramforce cramforce merged commit 833693e into ampproject:master Mar 28, 2016
@cramforce cramforce deleted the layout-rect branch March 28, 2016 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants