Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

No need to dasherize and use getPropertyValue, closes gh-805.

All invocations of curCSS are already camelcased. See the PR for discussion.
  • Loading branch information...
commit 888635f8c17e857ff98a931451ee54aecddabbca 1 parent 1442bf9
Mike Sherov mikesherov authored dmethvin committed

Showing 1 changed file with 2 additions and 11 deletions. Show diff stats Hide diff stats

  1. +2 11 src/css.js
13 src/css.js
@@ -6,8 +6,6 @@ jQuery.cssExpand = [ "Top", "Right", "Bottom", "Left" ];
6 6 var curCSS, iframe, iframeDoc,
7 7 ralpha = /alpha\([^)]*\)/i,
8 8 ropacity = /opacity=([^)]*)/,
9   - // fixed for IE9, see #8346
10   - rupper = /([A-Z]|^ms)/g,
11 9 rnumsplit = /^([\-+]?(?:\d*\.)?\d+)(.*)$/i,
12 10 rnumnonpx = /^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,
13 11 rrelNum = /^([\-+])=([\-+.\de]+)/,
@@ -229,11 +227,6 @@ jQuery.extend({
229 227 // followed by the unprefixed version
230 228 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
231 229
232   - // cssFloat needs a special treatment
233   - if ( name === "cssFloat" ) {
234   - name = "float";
235   - }
236   -
237 230 // If a hook was provided get the computed value from there
238 231 if ( hooks && "get" in hooks ) {
239 232 val = hooks.get( elem, true, extra );
@@ -322,12 +315,10 @@ if ( document.defaultView && document.defaultView.getComputedStyle ) {
322 315 var ret, defaultView, computedStyle, width,
323 316 style = elem.style;
324 317
325   - name = name.replace( rupper, "-$1" ).toLowerCase();
326   -
327 318 if ( (defaultView = elem.ownerDocument.defaultView) &&
328 319 (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
329 320
330   - ret = computedStyle.getPropertyValue( name );
  321 + ret = computedStyle[ name ];
331 322 if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
332 323 ret = jQuery.style( elem, name );
333 324 }
@@ -553,7 +544,7 @@ jQuery(function() {
553 544 // Work around by temporarily setting element display to inline-block
554 545 return jQuery.swap( elem, { "display": "inline-block" }, function() {
555 546 if ( computed ) {
556   - return curCSS( elem, "margin-right" );
  547 + return curCSS( elem, "marginRight" );
557 548 } else {
558 549 return elem.style.marginRight;
559 550 }

0 comments on commit 888635f

Please sign in to comment.
Something went wrong with that request. Please try again.