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

Support: Simplify the box-sizing test #1529

Merged
merged 1 commit into from Mar 10, 2014
Merged

Conversation

mgol
Copy link
Member

@mgol mgol commented Mar 4, 2014

Don't require body in the support.boxSizing test.

I don't know why the test was so complicated, it seems like it was done on purpose which suggests that some implementation could pass the test from this PR but would fail the current one. However, all our supported browsers match what's expected for support.boxSizing so it seems if there was ever any issue with that, it's now resolved.

Apart from not requiring a body (and layout), this PR also saves 26 bytes.

Don't require body in the support.boxSizing test.
@mgol mgol merged commit b5050dc into jquery:1.x-master Mar 10, 2014
@mgol mgol deleted the support.boxSizing branch March 10, 2014 18:26
@@ -33,6 +33,11 @@ define([
div.cloneNode( true ).style.backgroundClip = "";
support.clearCloneStyle = div.style.backgroundClip === "content-box";

// Support: Firefox<29, Android 2.3
// Vendor-prefix box-sizing
support.boxSizing = style.boxSizing === "" || style.MozBoxSizing === "" ||
Copy link
Contributor

Choose a reason for hiding this comment

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

Isnt this support test no longer lazy as of now?

Copy link
Member

Choose a reason for hiding this comment

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

Yes but it shouldn't cause additional layouts. The style is from the <a> element.

Copy link
Member Author

Choose a reason for hiding this comment

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

And it'll get even shorter once we remove MozBoxSizing. Probably not before 2.3, though, considering how crucial this is and that Firefox 24 ESR - the last one to have prefixed box-sizing - will be supported until the end of July.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants