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

Use ol.LEGACY_IE_SUPPORT and ol.IS_LEGACY_IE define #2687

Merged
merged 1 commit into from
Sep 9, 2014

Conversation

fredj
Copy link
Member

@fredj fredj commented Sep 6, 2014

See #1605

@fredj
Copy link
Member Author

fredj commented Sep 6, 2014

@elemoine
Copy link
Member

elemoine commented Sep 7, 2014

I know this is not ready for review yet, but I'm curious to know what your goal is. Remove useless code at compile time when "legacy ie" is not defined?

@fredj
Copy link
Member Author

fredj commented Sep 7, 2014

I know this is not ready for review yet, but I'm curious to know what your goal is. Remove useless code at compile time when "legacy ie" is not defined?

yes, that's it

@fredj
Copy link
Member Author

fredj commented Sep 8, 2014

Tested on IE7 and IE8 (browserstack): it's working as expected.

@elemoine
Copy link
Member

elemoine commented Sep 8, 2014

That looks good to me. Out of curiosity have you actually checked that the compiler actually optimizes this away when these defines are not set?

@fredj
Copy link
Member Author

fredj commented Sep 9, 2014

The function is compiled as:

function() {
  this.state = this.d.naturalWidth && this.d.naturalHeight ? 2 : 4;
  Ta(this.e, Yc);
  this.e = null;
  this.dispatchEvent("change")
}

vs:

function() {
  l(this.c.naturalWidth) || (this.c.naturalWidth = this.c.width, this.c.naturalHeight = this.c.height);
  this.state = this.c.naturalWidth && this.c.naturalHeight ? 2 : 4;
  Ta(this.e,Yc);
  this.e = null;
  this.dispatchEvent("change")
};

fredj added a commit that referenced this pull request Sep 9, 2014
Use ol.LEGACY_IE_SUPPORT and ol.IS_LEGACY_IE define
@fredj fredj merged commit ad1f255 into openlayers:master Sep 9, 2014
@fredj fredj deleted the legacy-ie branch September 9, 2014 07:25
@elemoine
Copy link
Member

elemoine commented Sep 9, 2014

Thanks.

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

2 participants