Skip to content

Commit

Permalink
Ignore warnings in JSNI of newly deprecated types
Browse files Browse the repository at this point in the history
Some of these may not be necessary, but were added to be sure not to
cause extra warnings in user applications.

Change-Id: I9cb4c21262852a1e35f98621799151e36404e93f
  • Loading branch information
niloc132 committed Apr 24, 2022
1 parent 913bbf8 commit 7803393
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions user/src/com/google/gwt/user/client/impl/DOMImplMozilla.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class DOMImplMozilla extends DOMImplStandard {
addMozillaCaptureEventDispatchers();
}

@SuppressWarnings("deprecation")
private static native void addMozillaCaptureEventDispatchers() /*-{
@com.google.gwt.user.client.impl.DOMImplStandard::captureEventDispatchers['DOMMouseScroll'] =
@com.google.gwt.user.client.impl.DOMImplStandard::dispatchCapturedMouseEvent(*);
Expand All @@ -50,6 +51,7 @@ protected void initEventSystem() {
initSyntheticMouseUpEvents();
}

@SuppressWarnings("deprecation")
private native void initSyntheticMouseUpEvents() /*-{
$wnd.addEventListener(
'mouseout',
Expand Down
3 changes: 3 additions & 0 deletions user/src/com/google/gwt/user/client/impl/DOMImplStandard.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ protected native void initEventSystem() /*-{
foreach(captureEvents, function(e, fn) { $wnd.addEventListener(e, fn, true); });
}-*/;

@SuppressWarnings("deprecation")
protected native void sinkBitlessEventImpl(Element elem, String eventTypeName) /*-{
var dispatchMap = @com.google.gwt.user.client.impl.DOMImplStandard::bitlessEventDispatchers;
var dispatcher = dispatchMap[eventTypeName] || dispatchMap['_default_'];
Expand Down Expand Up @@ -355,6 +356,7 @@ private static void dispatchCapturedMouseEvent(Event evt) {
}
}

@SuppressWarnings("deprecation")
private static native EventMap getBitlessEventDispatchers() /*-{
return {
_default_: @com.google.gwt.user.client.impl.DOMImplStandard::dispatchEvent(*),
Expand All @@ -363,6 +365,7 @@ private static native EventMap getBitlessEventDispatchers() /*-{
};
}-*/;

@SuppressWarnings("deprecation")
private static native EventMap getCaptureEventDispatchers() /*-{
return {
// Mouse events
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public String getBackColor() {
}

@Override
@SuppressWarnings("deprecation")
public native void initElement() /*-{
// Mozilla doesn't allow designMode to be set reliably until the iframe is
// fully loaded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public final String getText() {
}

@Override
@SuppressWarnings("deprecation")
public native void initElement() /*-{
// Most browsers don't like setting designMode until slightly _after_
// the iframe becomes attached to the DOM. Any non-zero timeout will do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ protected native JavaScriptObject importNodeImpl(JavaScriptObject jsObject,
* @return parsed JavaScript object
* @see com.google.gwt.xml.client.impl.XMLParserImpl#parseImpl(java.lang.String)
*/
@SuppressWarnings("deprecation")
@Override
protected native JavaScriptObject parseImpl(String contents) /*-{
var domParser =
Expand Down

0 comments on commit 7803393

Please sign in to comment.