diff options
-rw-r--r-- | dom/base/nsGkAtomList.h | 1 | ||||
-rw-r--r-- | dom/events/EventNameList.h | 4 | ||||
-rw-r--r-- | dom/webidl/Document.webidl | 3 | ||||
-rw-r--r-- | testing/web-platform/tests/page-visibility/idlharness.html | 6 | ||||
-rw-r--r-- | widget/EventMessageList.h | 3 |
5 files changed, 15 insertions, 2 deletions
diff --git a/dom/base/nsGkAtomList.h b/dom/base/nsGkAtomList.h index 0b76b2bea0..86a6fa99c4 100644 --- a/dom/base/nsGkAtomList.h +++ b/dom/base/nsGkAtomList.h @@ -950,6 +950,7 @@ GK_ATOM(onupdateready, "onupdateready") GK_ATOM(onupgradeneeded, "onupgradeneeded") GK_ATOM(onussdreceived, "onussdreceived") GK_ATOM(onversionchange, "onversionchange") +GK_ATOM(onvisibilitychange, "onvisibilitychange") GK_ATOM(onvoicechange, "onvoicechange") GK_ATOM(onvoiceschanged, "onvoiceschanged") GK_ATOM(onvrdisplayconnect, "onvrdisplayconnect") diff --git a/dom/events/EventNameList.h b/dom/events/EventNameList.h index b1be6dd762..ba2427623e 100644 --- a/dom/events/EventNameList.h +++ b/dom/events/EventNameList.h @@ -674,6 +674,10 @@ DOCUMENT_ONLY_EVENT(selectionchange, eSelectionChange, EventNameType_HTMLXUL, eBasicEventClass) +DOCUMENT_ONLY_EVENT(visibilitychange, + eVisibilityChange, + EventNameType_HTMLXUL, + eBasicEventClass) NON_IDL_EVENT(MozMouseHittest, eMouseHitTest, diff --git a/dom/webidl/Document.webidl b/dom/webidl/Document.webidl index c895fad392..f05656e840 100644 --- a/dom/webidl/Document.webidl +++ b/dom/webidl/Document.webidl @@ -275,10 +275,11 @@ partial interface Document { object registerElement(DOMString name, optional ElementRegistrationOptions options); }; -// http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html#sec-document-interface +// https://w3c.github.io/page-visibility/#extensions-to-the-document-interface partial interface Document { readonly attribute boolean hidden; readonly attribute VisibilityState visibilityState; + attribute EventHandler onvisibilitychange; }; // http://dev.w3.org/csswg/cssom/#extensions-to-the-document-interface diff --git a/testing/web-platform/tests/page-visibility/idlharness.html b/testing/web-platform/tests/page-visibility/idlharness.html index c8086a1bc6..2575460801 100644 --- a/testing/web-platform/tests/page-visibility/idlharness.html +++ b/testing/web-platform/tests/page-visibility/idlharness.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>Page Visibility IDL tests</title> <link rel="author" title="W3C" href="http://www.w3.org/" /> -<link rel="help" href="http://www.w3.org/TR/page-visibility/#sec-document-interface"/> +<link rel="help" href="https://w3c.github.io/page-visibility/"/> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/resources/WebIDLParser.js"></script> @@ -16,6 +16,10 @@ <pre id='untested_idl' style='display:none'> interface Document { }; + +[TreatNonObjectAsNull] +callback EventHandlerNonNull = any (Event event); +typedef EventHandlerNonNull? EventHandler; </pre> <pre id='idl'> diff --git a/widget/EventMessageList.h b/widget/EventMessageList.h index 55fc7375ec..7fe642637e 100644 --- a/widget/EventMessageList.h +++ b/widget/EventMessageList.h @@ -448,6 +448,9 @@ NS_EVENT_MESSAGE(eEditorInput) NS_EVENT_MESSAGE(eSelectStart) NS_EVENT_MESSAGE(eSelectionChange) +// visibility change +NS_EVENT_MESSAGE(eVisibilityChange) + // Details element events. NS_EVENT_MESSAGE(eToggle) |