mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1087378. Stop using WindowProxy for arguments in Web IDL; Window expresses what's going on more clearly. r=peterv
This commit is contained in:
parent
28967f0369
commit
3cc3a6789e
@ -63,6 +63,7 @@ LOCAL_INCLUDES += [
|
||||
'/accessible/ipc',
|
||||
'/accessible/xpcom',
|
||||
'/accessible/xul',
|
||||
'/dom/base',
|
||||
'/dom/xbl',
|
||||
'/ipc/chromium/src',
|
||||
'/layout/generic',
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
#include "mozilla/HoldDropJSObjects.h"
|
||||
#include "jsapi.h"
|
||||
#include "nsGlobalWindow.h" // So we can assign an nsGlobalWindow* to mWindowSource
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
@ -141,8 +142,8 @@ MessageEvent::Constructor(const GlobalObject& aGlobal,
|
||||
}
|
||||
|
||||
if (!aParam.mSource.IsNull()) {
|
||||
if (aParam.mSource.Value().IsWindowProxy()) {
|
||||
event->mWindowSource = aParam.mSource.Value().GetAsWindowProxy();
|
||||
if (aParam.mSource.Value().IsWindow()) {
|
||||
event->mWindowSource = aParam.mSource.Value().GetAsWindow();
|
||||
} else {
|
||||
event->mPortSource = aParam.mSource.Value().GetAsMessagePort();
|
||||
}
|
||||
|
@ -9,8 +9,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
interface WindowProxy;
|
||||
|
||||
interface CompositionEvent : UIEvent
|
||||
{
|
||||
readonly attribute DOMString? data;
|
||||
@ -23,7 +21,7 @@ partial interface CompositionEvent
|
||||
void initCompositionEvent(DOMString typeArg,
|
||||
boolean canBubbleArg,
|
||||
boolean cancelableArg,
|
||||
WindowProxy? viewArg,
|
||||
Window? viewArg,
|
||||
DOMString? dataArg,
|
||||
DOMString localeArg);
|
||||
};
|
||||
|
@ -4,8 +4,6 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
interface WindowProxy;
|
||||
|
||||
interface DragEvent : MouseEvent
|
||||
{
|
||||
readonly attribute DataTransfer? dataTransfer;
|
||||
@ -14,7 +12,7 @@ interface DragEvent : MouseEvent
|
||||
void initDragEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
WindowProxy? aView,
|
||||
Window? aView,
|
||||
long aDetail,
|
||||
long aScreenX,
|
||||
long aScreenY,
|
||||
|
@ -4,8 +4,6 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
interface WindowProxy;
|
||||
|
||||
// http://www.w3.org/TR/1999/WD-DOM-Level-2-19990923/events.html#Events-KeyEvent
|
||||
interface KeyEvent
|
||||
{
|
||||
@ -230,7 +228,7 @@ interface KeyEvent
|
||||
void initKeyEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
WindowProxy? view,
|
||||
Window? view,
|
||||
boolean ctrlKey,
|
||||
boolean altKey,
|
||||
boolean shiftKey,
|
||||
|
@ -4,8 +4,6 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
interface WindowProxy;
|
||||
|
||||
[Constructor(DOMString typeArg, optional KeyboardEventInit keyboardEventInitDict)]
|
||||
interface KeyboardEvent : UIEvent
|
||||
{
|
||||
|
@ -7,8 +7,6 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/#messageevent
|
||||
*/
|
||||
|
||||
interface WindowProxy;
|
||||
|
||||
[Constructor(DOMString type, optional MessageEventInit eventInitDict),
|
||||
Exposed=(Window,Worker,System)]
|
||||
interface MessageEvent : Event {
|
||||
@ -49,6 +47,6 @@ dictionary MessageEventInit : EventInit {
|
||||
any data;
|
||||
DOMString origin;
|
||||
DOMString lastEventId;
|
||||
(WindowProxy or MessagePort)? source = null;
|
||||
(Window or MessagePort)? source = null;
|
||||
sequence<MessagePort>? ports;
|
||||
};
|
||||
|
@ -28,7 +28,7 @@ interface MouseEvent : UIEvent {
|
||||
void initMouseEvent(DOMString typeArg,
|
||||
boolean canBubbleArg,
|
||||
boolean cancelableArg,
|
||||
WindowProxy? viewArg,
|
||||
Window? viewArg,
|
||||
long detailArg,
|
||||
long screenXArg,
|
||||
long screenYArg,
|
||||
@ -52,15 +52,7 @@ partial interface MouseEvent
|
||||
};
|
||||
|
||||
// Suggested initMouseEvent replacement initializer:
|
||||
dictionary MouseEventInit {
|
||||
// Attributes from Event:
|
||||
boolean bubbles = false;
|
||||
boolean cancelable = false;
|
||||
|
||||
// Attributes from UIEvent:
|
||||
WindowProxy? view = null;
|
||||
long detail = 0;
|
||||
|
||||
dictionary MouseEventInit : UIEventInit {
|
||||
// Attributes for MouseEvent:
|
||||
long screenX = 0;
|
||||
long screenY = 0;
|
||||
@ -100,7 +92,7 @@ partial interface MouseEvent
|
||||
void initNSMouseEvent(DOMString typeArg,
|
||||
boolean canBubbleArg,
|
||||
boolean cancelableArg,
|
||||
WindowProxy? viewArg,
|
||||
Window? viewArg,
|
||||
long detailArg,
|
||||
long screenXArg,
|
||||
long screenYArg,
|
||||
|
@ -4,8 +4,6 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
interface WindowProxy;
|
||||
|
||||
interface MouseScrollEvent : MouseEvent
|
||||
{
|
||||
const long HORIZONTAL_AXIS = 1;
|
||||
@ -17,7 +15,7 @@ interface MouseScrollEvent : MouseEvent
|
||||
void initMouseScrollEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
WindowProxy? view,
|
||||
Window? view,
|
||||
long detail,
|
||||
long screenX,
|
||||
long screenY,
|
||||
|
@ -4,8 +4,6 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
interface WindowProxy;
|
||||
|
||||
interface ScrollAreaEvent : UIEvent
|
||||
{
|
||||
readonly attribute float x;
|
||||
@ -17,7 +15,7 @@ interface ScrollAreaEvent : UIEvent
|
||||
void initScrollAreaEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
WindowProxy? view,
|
||||
Window? view,
|
||||
long detail,
|
||||
float x,
|
||||
float y,
|
||||
|
@ -6,8 +6,6 @@
|
||||
* For more information see nsIDOMSimpleGestureEvent.idl.
|
||||
*/
|
||||
|
||||
interface WindowProxy;
|
||||
|
||||
interface SimpleGestureEvent : MouseEvent
|
||||
{
|
||||
const unsigned long DIRECTION_UP = 1;
|
||||
@ -30,7 +28,7 @@ interface SimpleGestureEvent : MouseEvent
|
||||
void initSimpleGestureEvent(DOMString typeArg,
|
||||
boolean canBubbleArg,
|
||||
boolean cancelableArg,
|
||||
WindowProxy? viewArg,
|
||||
Window? viewArg,
|
||||
long detailArg,
|
||||
long screenXArg,
|
||||
long screenYArg,
|
||||
|
@ -10,13 +10,11 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
interface WindowProxy;
|
||||
|
||||
interface TimeEvent : Event
|
||||
{
|
||||
readonly attribute long detail;
|
||||
readonly attribute WindowProxy? view;
|
||||
void initTimeEvent(DOMString aType,
|
||||
WindowProxy? aView,
|
||||
Window? aView,
|
||||
long aDetail);
|
||||
};
|
||||
|
@ -4,8 +4,6 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
interface WindowProxy;
|
||||
|
||||
[Func="mozilla::dom::TouchEvent::PrefEnabled"]
|
||||
interface TouchEvent : UIEvent {
|
||||
readonly attribute TouchList touches;
|
||||
@ -21,7 +19,7 @@ interface TouchEvent : UIEvent {
|
||||
void initTouchEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
WindowProxy? view,
|
||||
Window? view,
|
||||
long detail,
|
||||
boolean ctrlKey,
|
||||
boolean altKey,
|
||||
|
@ -10,8 +10,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
interface WindowProxy;
|
||||
|
||||
[Constructor(DOMString type, optional UIEventInit eventInitDict)]
|
||||
interface UIEvent : Event
|
||||
{
|
||||
@ -20,7 +18,7 @@ interface UIEvent : Event
|
||||
void initUIEvent(DOMString aType,
|
||||
boolean aCanBubble,
|
||||
boolean aCancelable,
|
||||
WindowProxy? aView,
|
||||
Window? aView,
|
||||
long aDetail);
|
||||
};
|
||||
|
||||
@ -42,6 +40,6 @@ partial interface UIEvent {
|
||||
|
||||
dictionary UIEventInit : EventInit
|
||||
{
|
||||
WindowProxy? view = null;
|
||||
long detail = 0;
|
||||
Window? view = null;
|
||||
long detail = 0;
|
||||
};
|
||||
|
@ -4,8 +4,6 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
interface WindowProxy;
|
||||
|
||||
[Func="IsChromeOrXBL"]
|
||||
interface XULCommandEvent : UIEvent
|
||||
{
|
||||
@ -20,7 +18,7 @@ interface XULCommandEvent : UIEvent
|
||||
void initCommandEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
WindowProxy? view,
|
||||
Window? view,
|
||||
long detail,
|
||||
boolean ctrlKey,
|
||||
boolean altKey,
|
||||
|
Loading…
Reference in New Issue
Block a user