From: Oleg Gaidarenko Date: Tue, 22 Dec 2015 15:51:04 +0000 (+0300) Subject: Build: code style fixes after all those reverts X-Git-Tag: 1.12.0~36 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=14eba98c8f189c2e6a36e640bedce2ce6db34493;p=jquery.git Build: code style fixes after all those reverts --- diff --git a/src/ajax/load.js b/src/ajax/load.js index 4ba370e21..7863d7cc2 100644 --- a/src/ajax/load.js +++ b/src/ajax/load.js @@ -5,6 +5,7 @@ define( [ "../traversing", "../manipulation", "../selector", + // Optional event/alias dependency "../event/alias" ], function( jQuery ) { diff --git a/src/core.js b/src/core.js index 5f4e4d9dc..60291a5f0 100644 --- a/src/core.js +++ b/src/core.js @@ -290,6 +290,7 @@ jQuery.extend( { // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context globalEval: function( data ) { if ( data && jQuery.trim( data ) ) { + // We use execScript on Internet Explorer // We use an anonymous function so that context is window // rather than jQuery in Firefox diff --git a/src/core/init.js b/src/core/init.js index 425c1954a..6225d15e4 100644 --- a/src/core/init.js +++ b/src/core/init.js @@ -79,7 +79,7 @@ var rootjQuery, // Inject the element directly into the jQuery object this.length = 1; - this[0] = elem; + this[ 0 ] = elem; } this.context = document; @@ -99,7 +99,7 @@ var rootjQuery, // HANDLE: $(DOMElement) } else if ( selector.nodeType ) { - this.context = this[0] = selector; + this.context = this[ 0 ] = selector; this.length = 1; return this; diff --git a/src/css.js b/src/css.js index 802ae8a31..504192307 100644 --- a/src/css.js +++ b/src/css.js @@ -82,6 +82,7 @@ function showHide( elements, show ) { values[ index ] = jQuery._data( elem, "olddisplay" ); display = elem.style.display; if ( show ) { + // Reset the inline display of this element to learn if it is // being hidden by cascaded rules or not if ( !values[ index ] && display === "none" ) { @@ -92,7 +93,7 @@ function showHide( elements, show ) { // in a stylesheet to whatever the default browser style is // for such an element if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) ); + values[ index ] = jQuery._data( elem, "olddisplay", defaultDisplay( elem.nodeName ) ); } } else { hidden = isHidden( elem ); diff --git a/src/css/defaultDisplay.js b/src/css/defaultDisplay.js index b1fa7dae5..2ec5d8a7a 100644 --- a/src/css/defaultDisplay.js +++ b/src/css/defaultDisplay.js @@ -1,4 +1,4 @@ -define([ +define( [ "../core", "../var/document", "../manipulation" // appendTo @@ -18,6 +18,7 @@ var iframe, * @param {String} name nodeName of the element * @param {Object} doc Document object */ + // Called only from within defaultDisplay function actualDisplay( name, doc ) { var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), @@ -46,7 +47,7 @@ function defaultDisplay( nodeName ) { if ( display === "none" || !display ) { // Use the already-created iframe if possible - iframe = (iframe || jQuery( "