Bug 1358495 - Part 1: Add window.getComputedStyleWithoutFlushing to IDL. r?bz
Sometimes we know it is OK to get computed style without flushing because the
data is slightly stale.
Make this API as chrome-only because content might not need this.
MozReview-Commit-ID: 5Vgd4spGQyE
--- a/dom/webidl/Window.webidl
+++ b/dom/webidl/Window.webidl
@@ -361,16 +361,20 @@ partial interface Window {
[Throws, ChromeOnly] any getInterface(IID iid);
/**
* Same as nsIDOMWindow.windowRoot, useful for event listener targeting.
*/
[ChromeOnly, Throws]
readonly attribute WindowRoot? windowRoot;
+
+ // bug 1358495
+ [NewObject, Throws, ChromeOnly]
+ CSSStyleDeclaration? getComputedStyleWithoutFlushing(Element elt, optional DOMString pseudoElt = "");
};
Window implements TouchEventHandlers;
Window implements OnErrorEventHandlerForWindow;
#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
// https://compat.spec.whatwg.org/#windoworientation-interface