Hi,
Just something I figure was worth sending an email for, due to the
potential (ideally positive) web-compat impact.
In bug 1467722[1], I brought us closer to the spec and to WebKit / Blink
in terms of what happens when we can't return a style for an element
from getComputedStyle (mostly relevant for hidden iframes, for example).
Before that change, we either returned null (if you called
getComputedStyle _after_ hiding the iframe) or threw an
NS_ERROR_NOT_AVAILABLE exception (if you call getComputedStyle before
hiding the frame, but getPropertyValue afterwards).
Now we'll never return null for getComputedStyle(..), and we'll return
an empty string and a .length of zero when we can't get a style,
aligning us with other browser's 'no style' behavior[2].
The idea is that this will prevent most of the pain that bugs like [3]
cause us, and be a step into aligning with the CSSOM spec more closely.
This landed on time for 62, and I don't expect any breakage from it, but
let me know if you see something.
-- Emilio
[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1467722
[2]: WebKit and Blink do not return a style for an element outside of
the document, for example, and they behave that way in that case.
[3]: https://bugzilla.mozilla.org/show_bug.cgi?id=548397
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform