Krinkle has uploaded a new change for review.

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

Change subject: Document browser-specific code with support comments
......................................................................

Document browser-specific code with support comments

Change-Id: I1f8b4842e943d9a08afcf80ba0553d8b455cae13
---
M src/Element.js
M src/mixins/DraggableElement.js
M src/mixins/TabIndexedElement.js
3 files changed, 12 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/11/233111/1

diff --git a/src/Element.js b/src/Element.js
index 62c5328..c4952dd 100644
--- a/src/Element.js
+++ b/src/Element.js
@@ -275,6 +275,8 @@
  */
 OO.ui.Element.static.getWindow = function ( obj ) {
        var doc = this.getDocument( obj );
+       // Support: IE 8
+       // Standard Document.defaultView is IE9+
        return doc.parentWindow || doc.defaultView;
 };
 
@@ -390,9 +392,13 @@
  */
 OO.ui.Element.static.getBorders = function ( el ) {
        var doc = el.ownerDocument,
+               // Support: IE 8
+               // Standard Document.defaultView is IE9+
                win = doc.parentWindow || doc.defaultView,
                style = win && win.getComputedStyle ?
                        win.getComputedStyle( el, null ) :
+                       // Support: IE 8
+                       // Standard getComputedStyle() is IE9+
                        el.currentStyle,
                $el = $( el ),
                top = parseFloat( style ? style.borderTopWidth : $el.css( 
'borderTopWidth' ) ) || 0,
@@ -418,6 +424,8 @@
 OO.ui.Element.static.getDimensions = function ( el ) {
        var $el, $win,
                doc = el.ownerDocument || el.document,
+               // Support: IE 8
+               // Standard Document.defaultView is IE9+
                win = doc.parentWindow || doc.defaultView;
 
        if ( win === el || el === doc.documentElement ) {
diff --git a/src/mixins/DraggableElement.js b/src/mixins/DraggableElement.js
index 69a4d6e..38658b0 100644
--- a/src/mixins/DraggableElement.js
+++ b/src/mixins/DraggableElement.js
@@ -69,13 +69,13 @@
        // Define drop effect
        dataTransfer.dropEffect = 'none';
        dataTransfer.effectAllowed = 'move';
+       // Support: Firefox
        // We must set up a dataTransfer data property or Firefox seems to
        // ignore the fact the element is draggable.
        try {
                dataTransfer.setData( 'application-x/OOjs-UI-draggable', 
this.getIndex() );
        } catch ( err ) {
-               // The above is only for firefox. No need to set a catch clause
-               // if it fails, move on.
+               // The above is only for Firefox. Move on if it fails.
        }
        // Add dragging class
        this.$element.addClass( 'oo-ui-draggableElement-dragging' );
diff --git a/src/mixins/TabIndexedElement.js b/src/mixins/TabIndexedElement.js
index ab9ce66..0116c03 100644
--- a/src/mixins/TabIndexedElement.js
+++ b/src/mixins/TabIndexedElement.js
@@ -108,7 +108,8 @@
                        // Do not index over disabled elements
                        this.$tabIndexed.attr( {
                                tabindex: this.isDisabled() ? -1 : 
this.tabIndex,
-                               // ChromeVox and NVDA do not seem to inherit 
this from parent elements
+                               // Support: ChromeVox and NVDA
+                               // These do not seem to inherit aria-disabled 
from parent elements
                                'aria-disabled': this.isDisabled().toString()
                        } );
                } else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f8b4842e943d9a08afcf80ba0553d8b455cae13
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