Krinkle has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/149120

Change subject: Use native style property names instead of jQuery's css map
......................................................................

Use native style property names instead of jQuery's css map

Removes a bit of jQuery abstraction which might save bit of
performance.

It presumably also compresses slightly better in gzip for cases
where we have associated properties and variables, such as:
 css({ minWidth: dim.minWidth })
Though, while the compression window is probably too small, in
ResourceLoader the other varaint could've been compresesed better
due to matching patterns from actual CSS.

This completes our transition to valid identifiers as keys and
using of native interfaces. (Similar to node.scrollWidth, we now
essentially also use node.style.minWidth regularly.)

Change-Id: I158eab952758d367a76e0543f7c24fd154b881b4
---
M src/Window.js
M src/dialogs/ProcessDialog.js
M src/elements/ClippableElement.js
3 files changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/20/149120/1

diff --git a/src/Window.js b/src/Window.js
index 34641e6..aa363a4 100644
--- a/src/Window.js
+++ b/src/Window.js
@@ -320,13 +320,13 @@
        // Apply width before height so height is not based on wrapping content 
using the wrong width
        this.$frame.css( {
                width: dim.width || '',
-               'min-width': dim.minWidth || '',
-               'max-width': dim.maxWidth || ''
+               minWidth: dim.minWidth || '',
+               maxWidth: dim.maxWidth || ''
        } );
        this.$frame.css( {
                height: ( dim.height !== undefined ? dim.height : 
this.getContentHeight() ) || '',
-               'min-height': dim.minHeight || '',
-               'max-height': dim.maxHeight || ''
+               minHeight: dim.minHeight || '',
+               maxHeight: dim.maxHeight || ''
        } );
        return this;
 };
diff --git a/src/dialogs/ProcessDialog.js b/src/dialogs/ProcessDialog.js
index 406ae42..2e0dd27 100644
--- a/src/dialogs/ProcessDialog.js
+++ b/src/dialogs/ProcessDialog.js
@@ -168,7 +168,7 @@
                this.$safeActions.is( ':visible' ) ? this.$safeActions.width() 
: 0,
                this.$primaryActions.is( ':visible' ) ? 
this.$primaryActions.width() : 0
        );
-       this.$location.css( { 'padding-left': width, 'padding-right': width } );
+       this.$location.css( { paddingLeft: width, paddingRight: width } );
 
        return this;
 };
diff --git a/src/elements/ClippableElement.js b/src/elements/ClippableElement.js
index 58c26eb..eb91f1b 100644
--- a/src/elements/ClippableElement.js
+++ b/src/elements/ClippableElement.js
@@ -124,18 +124,18 @@
                clipHeight = desiredHeight < naturalHeight;
 
        if ( clipWidth ) {
-               this.$clippable.css( { 'overflow-x': 'auto', width: 
desiredWidth } );
+               this.$clippable.css( { overflowX: 'auto', width: desiredWidth } 
);
        } else {
                this.$clippable.css( 'width', this.idealWidth || '' );
                this.$clippable.width(); // Force reflow for 
https://code.google.com/p/chromium/issues/detail?id=387290
-               this.$clippable.css( 'overflow-x', '' );
+               this.$clippable.css( 'overflowX', '' );
        }
        if ( clipHeight ) {
-               this.$clippable.css( { 'overflow-y': 'auto', height: 
desiredHeight } );
+               this.$clippable.css( { overflowY: 'auto', height: desiredHeight 
} );
        } else {
                this.$clippable.css( 'height', this.idealHeight || '' );
                this.$clippable.height(); // Force reflow for 
https://code.google.com/p/chromium/issues/detail?id=387290
-               this.$clippable.css( 'overflow-y', '' );
+               this.$clippable.css( 'overflowY', '' );
        }
 
        this.clipped = clipWidth || clipHeight;

-- 
To view, visit https://gerrit.wikimedia.org/r/149120
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I158eab952758d367a76e0543f7c24fd154b881b4
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to