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

CSS: Don't read styles.position in the width/height cssHook unless necessary #4187

Merged
merged 1 commit into from Oct 8, 2018

Conversation

Projects
None yet
4 participants
@mgol
Member

mgol commented Oct 3, 2018

Summary

Current width/height cssHook reads the computed position style even if not
necessary as the browser passes the scrollboxSize support test. That has been
changed.

This commit also makes the scrollboxSize support test in line with all others
(i.e. only return true or false) and changes the variable name in the hook
to make the code clearer.

Fixes gh-4185

+0 bytes! :)

Checklist

CSS: Don't read styles.position in the width/height cssHook unless ne…
…cessary

Current width/height cssHook reads the computed position style even if not
necessary as the browser passes the scrollboxSize support test. That has been
changed.

This commit also makes the scrollboxSize support test in line with all others
(i.e. only return true or false) and changes the variable name in the hook
to make the code clearer.

Fixes gh-4185
@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Oct 3, 2018

Member

The only test I can think of would require mocking getComputedStyle, proxying its fields to the native API but also notifying it had a field read.

Member

mgol commented Oct 3, 2018

The only test I can think of would require mocking getComputedStyle, proxying its fields to the native API but also notifying it had a field read.

@gibson042

Thanks for cleaning up my mess!

@mgol mgol merged commit 354f603 into jquery:master Oct 8, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details

@mgol mgol deleted the mgol:width-set-reflow branch Oct 8, 2018

@GulajavaMinistudio GulajavaMinistudio referenced this pull request Oct 9, 2018

Merged

Update documentation for #62

0 of 4 tasks complete
@itchyny

This comment has been minimized.

Show comment
Hide comment
@itchyny

itchyny Oct 10, 2018

Thank you for the fix.

itchyny commented Oct 10, 2018

Thank you for the fix.

@mgol mgol removed the Needs review label Oct 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment