https://bugzilla.wikimedia.org/show_bug.cgi?id=65373

--- Comment #20 from Krinkle <[email protected]> ---
btw, since Firefox's NS_ERROR_NOT_AVAILABLE exceptions have no stack trace.
This is how you catch it:

Locally modify jquery.js like this:

--- a/resources/lib/jquery/jquery.js
+++ b/resources/lib/jquery/jquery.js
@@ -6122,10 +6122,15 @@ if ( window.getComputedStyle ) {
                var width, minWidth, maxWidth, ret,
                        style = elem.style;

+               try {
                computed = computed || getStyles( elem );

                // getPropertyValue is only needed for .css('filter') in IE9,
see #12537
                ret = computed ? computed.getPropertyValue( name ) || computed[
name ] : undefined;
+               } catch (e) {
+                       mw.log.warn(e);
+                       throw new Error('Firefox computed styles poop');
+               }

                if ( computed ) {


Then reproduce the error (preferably in debug mode), and fine a stack like the
following (this one is for Media Edit dialog):

console.trace:
 mw.log</log.warn() load.php:11380
 curCSS() load.php:6131
 .css() load.php:6723
 .css/<() load.php:6872
 jQuery.access() load.php:4153
 .css() load.php:6873
 OO.ui.Element.getDir() oojs-ui.js:304
 OO.ui.GridLayout.prototype.update() oojs-ui.js:4168
 OO.ui.GridLayout.prototype.layout() oojs-ui.js:4137
 OoUiGridLayout() oojs-ui.js:4069
 OoUiBookletLayout() oojs-ui.js:4232
 ve.ui.MWMediaEditDialog.prototype.initialize() ve.ui.MWMediaEditDialog.js:150


Conclusion, like in OO.ui.PanelLayout (fixed in I31b495fc2d9725f), GridLayout,
too is doing (what seems to be erroneous) style computation on a hidden frame.
So the values of it are already useless, but are now throwing in Firefox.

Should probably be dealt with similarly (in case we find more).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to