mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 21:18:35 +00:00
Bug 854573 - Paris binding for CompositionEvent, r=peterv
--HG-- extra : rebase_source : 3e04e198a329649d7e1f306a31cf96485f0afc0d
This commit is contained in:
parent
fa2ed308e5
commit
567675450f
@ -30,6 +30,8 @@ nsDOMCompositionEvent::nsDOMCompositionEvent(mozilla::dom::EventTarget* aOwner,
|
||||
|
||||
mData = static_cast<nsCompositionEvent*>(mEvent)->data;
|
||||
// TODO: Native event should have locale information.
|
||||
|
||||
SetIsDOMBinding();
|
||||
}
|
||||
|
||||
nsDOMCompositionEvent::~nsDOMCompositionEvent()
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include "nsDOMUIEvent.h"
|
||||
#include "nsIDOMCompositionEvent.h"
|
||||
#include "mozilla/dom/CompositionEventBinding.h"
|
||||
|
||||
class nsDOMCompositionEvent : public nsDOMUIEvent,
|
||||
public nsIDOMCompositionEvent
|
||||
@ -23,6 +24,24 @@ public:
|
||||
NS_FORWARD_TO_NSDOMUIEVENT
|
||||
NS_DECL_NSIDOMCOMPOSITIONEVENT
|
||||
|
||||
virtual JSObject* WrapObject(JSContext* aCx, JSObject* aScope)
|
||||
{
|
||||
return mozilla::dom::CompositionEventBinding::Wrap(aCx, aScope, this);
|
||||
}
|
||||
|
||||
void
|
||||
InitCompositionEvent(const nsAString& aType,
|
||||
bool aCanBubble,
|
||||
bool aCancelable,
|
||||
nsIDOMWindow* aView,
|
||||
const nsAString& aData,
|
||||
const nsAString& aLocale,
|
||||
mozilla::ErrorResult& aRv)
|
||||
{
|
||||
aRv = InitCompositionEvent(aType, aCanBubble, aCancelable, aView,
|
||||
aData, aLocale);
|
||||
}
|
||||
|
||||
protected:
|
||||
nsString mData;
|
||||
nsString mLocale;
|
||||
|
@ -183,6 +183,10 @@ DOMInterfaces = {
|
||||
'nativeType': 'nsDOMCommandEvent',
|
||||
},
|
||||
|
||||
'CompositionEvent': {
|
||||
'nativeType': 'nsDOMCompositionEvent',
|
||||
},
|
||||
|
||||
'CSS': {
|
||||
'concrete': False,
|
||||
},
|
||||
|
29
dom/webidl/CompositionEvent.webidl
Normal file
29
dom/webidl/CompositionEvent.webidl
Normal file
@ -0,0 +1,29 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-CompositionEvent
|
||||
*
|
||||
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
interface WindowProxy;
|
||||
|
||||
interface CompositionEvent : UIEvent
|
||||
{
|
||||
readonly attribute DOMString? data;
|
||||
readonly attribute DOMString locale;
|
||||
};
|
||||
|
||||
partial interface CompositionEvent
|
||||
{
|
||||
[Throws]
|
||||
void initCompositionEvent(DOMString typeArg,
|
||||
boolean canBubbleArg,
|
||||
boolean cancelableArg,
|
||||
WindowProxy? viewArg,
|
||||
DOMString? dataArg,
|
||||
DOMString localeArg);
|
||||
};
|
@ -33,6 +33,7 @@ webidl_files = \
|
||||
ClientRectList.webidl \
|
||||
CommandEvent.webidl \
|
||||
Comment.webidl \
|
||||
CompositionEvent.webidl \
|
||||
CSS.webidl \
|
||||
CSSPrimitiveValue.webidl \
|
||||
CSSStyleDeclaration.webidl \
|
||||
|
Loading…
x
Reference in New Issue
Block a user