Skip to content

Commit bab85b3

Browse files
committed
time to remove IE (issue #735)
1 parent ca52d74 commit bab85b3

13 files changed

Lines changed: 1 addition & 408 deletions

File tree

src/main/java/org/htmlunit/javascript/host/event/CloseEvent.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,10 @@
1414
*/
1515
package org.htmlunit.javascript.host.event;
1616

17-
import static org.htmlunit.javascript.configuration.SupportedBrowser.IE;
18-
1917
import org.htmlunit.corejs.javascript.ScriptableObject;
2018
import org.htmlunit.javascript.JavaScriptEngine;
2119
import org.htmlunit.javascript.configuration.JsxClass;
2220
import org.htmlunit.javascript.configuration.JsxConstructor;
23-
import org.htmlunit.javascript.configuration.JsxFunction;
2421
import org.htmlunit.javascript.configuration.JsxGetter;
2522

2623
/**
@@ -71,24 +68,6 @@ public void jsConstructor(final String type, final ScriptableObject details) {
7168
}
7269
}
7370

74-
/**
75-
* Initializes this close event.
76-
* @param type the event type
77-
* @param bubbles whether or not the event should bubble
78-
* @param cancelable whether or not the event the event should be cancelable
79-
* @param wasClean the wasClean flag
80-
* @param reasonCode the reason code
81-
* @param reason the reason
82-
*/
83-
@JsxFunction(IE)
84-
public void initCloseEvent(final String type, final boolean bubbles, final boolean cancelable,
85-
final boolean wasClean, final int reasonCode, final String reason) {
86-
super.initEvent(type, bubbles, cancelable);
87-
wasClean_ = wasClean;
88-
code_ = reasonCode;
89-
reason_ = reason;
90-
}
91-
9271
/**
9372
* @return the code
9473
*/

src/main/java/org/htmlunit/javascript/host/event/Event.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import static org.htmlunit.javascript.configuration.SupportedBrowser.FF;
1818
import static org.htmlunit.javascript.configuration.SupportedBrowser.FF_ESR;
19-
import static org.htmlunit.javascript.configuration.SupportedBrowser.IE;
2019

2120
import java.util.ArrayList;
2221

@@ -730,7 +729,6 @@ public Object getSrcElement() {
730729
* Sets the object that fired the event.
731730
* @param srcElement the object that fired the event
732731
*/
733-
@JsxSetter(IE)
734732
public void setSrcElement(final Object srcElement) {
735733
srcElement_ = srcElement;
736734
}

src/main/java/org/htmlunit/javascript/host/event/EventTarget.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
*/
1515
package org.htmlunit.javascript.host.event;
1616

17-
import static org.htmlunit.javascript.configuration.SupportedBrowser.IE;
18-
1917
import java.io.IOException;
2018
import java.util.ArrayList;
2119
import java.util.List;
@@ -44,7 +42,6 @@
4442
* @author Atsushi Nakagawa
4543
*/
4644
@JsxClass
47-
@JsxClass(isJSObject = false, value = IE)
4845
public class EventTarget extends HtmlUnitScriptable {
4946

5047
private EventListenersContainer eventListenersContainer_;

src/main/java/org/htmlunit/javascript/host/event/KeyboardEvent.java

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import static org.htmlunit.BrowserVersionFeatures.JS_EVENT_KEYBOARD_CTOR_WHICH;
1818
import static org.htmlunit.javascript.configuration.SupportedBrowser.FF;
1919
import static org.htmlunit.javascript.configuration.SupportedBrowser.FF_ESR;
20-
import static org.htmlunit.javascript.configuration.SupportedBrowser.IE;
2120

2221
import java.util.HashMap;
2322
import java.util.Map;
@@ -61,14 +60,6 @@ public class KeyboardEvent extends UIEvent {
6160
@JsxConstant
6261
public static final int DOM_KEY_LOCATION_NUMPAD = 3;
6362

64-
/** Constant for {@code DOM_KEY_LOCATION_MOBILE}. */
65-
@JsxConstant(IE)
66-
public static final int DOM_KEY_LOCATION_MOBILE = 4;
67-
68-
/** Constant for {@code DOM_KEY_LOCATION_JOYSTICK}. */
69-
@JsxConstant(IE)
70-
public static final int DOM_KEY_LOCATION_JOYSTICK = 5;
71-
7263
/** Constant for {@code DOM_VK_CANCEL}. */
7364
@JsxConstant({FF, FF_ESR})
7465
public static final int DOM_VK_CANCEL = 3;
@@ -1182,7 +1173,6 @@ protected void setCharCode(final int charCode) {
11821173
* Returns the numeric keyCode of the key pressed, or the charCode for an alphanumeric key pressed.
11831174
* @return the numeric keyCode of the key pressed, or the charCode for an alphanumeric key pressed
11841175
*/
1185-
@JsxGetter(IE)
11861176
@Override
11871177
public int getWhich() {
11881178
return which_;
@@ -1249,29 +1239,6 @@ protected void setKey(final String key) {
12491239
key_ = key;
12501240
}
12511241

1252-
/**
1253-
* Returns the value of a key or keys pressed by the user.
1254-
* @return the value of a key or keys pressed by the user
1255-
*/
1256-
@JsxGetter(IE)
1257-
public String getChar() {
1258-
int code = getKeyCode();
1259-
if (code == 0) {
1260-
code = getCharCode();
1261-
}
1262-
switch (code) {
1263-
case DOM_VK_SHIFT:
1264-
return "";
1265-
case DOM_VK_RETURN:
1266-
return "\n";
1267-
case DOM_VK_PERIOD:
1268-
return ".";
1269-
1270-
default:
1271-
return String.valueOf(isShiftKey() ? (char) which_ : Character.toLowerCase((char) which_));
1272-
}
1273-
}
1274-
12751242
/**
12761243
* Returns a physical key on the keyboard.
12771244
* @return a physical key on the keyboard

src/main/java/org/htmlunit/javascript/host/event/MouseEvent.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import static org.htmlunit.javascript.configuration.SupportedBrowser.FF;
1818
import static org.htmlunit.javascript.configuration.SupportedBrowser.FF_ESR;
19-
import static org.htmlunit.javascript.configuration.SupportedBrowser.IE;
2019

2120
import java.util.ArrayList;
2221

@@ -333,7 +332,6 @@ public void setButtons(final int value) {
333332
* @see <a href="http://unixpapa.com/js/mouse.html">Javascript Madness: Mouse Events</a>
334333
* @return the button code
335334
*/
336-
@JsxGetter(IE)
337335
@Override
338336
public int getWhich() {
339337
return button_ + 1;

src/main/java/org/htmlunit/javascript/host/event/PointerEvent.java

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import static org.htmlunit.javascript.configuration.SupportedBrowser.CHROME;
1818
import static org.htmlunit.javascript.configuration.SupportedBrowser.EDGE;
19-
import static org.htmlunit.javascript.configuration.SupportedBrowser.IE;
2019

2120
import org.htmlunit.corejs.javascript.Context;
2221
import org.htmlunit.corejs.javascript.Function;
@@ -27,7 +26,6 @@
2726
import org.htmlunit.javascript.JavaScriptEngine;
2827
import org.htmlunit.javascript.configuration.JsxClass;
2928
import org.htmlunit.javascript.configuration.JsxConstructor;
30-
import org.htmlunit.javascript.configuration.JsxFunction;
3129
import org.htmlunit.javascript.configuration.JsxGetter;
3230

3331
/**
@@ -137,77 +135,6 @@ public PointerEvent(final DomNode domNode, final String type, final boolean shif
137135
isPrimary_ = true;
138136
}
139137

140-
/**
141-
* Used for initializing the pointer event.
142-
*
143-
* @param type the event type
144-
* @param bubbles can the event bubble
145-
* @param cancelable can the event be canceled
146-
* @param view the view to use for this event
147-
* @param detail the detail to set for the event
148-
* @param screenX the initial value of screenX
149-
* @param screenY the initial value of screenY
150-
* @param clientX the initial value of clientX
151-
* @param clientY the initial value of clientY
152-
* @param ctrlKey is the control key pressed
153-
* @param altKey is the alt key pressed
154-
* @param shiftKey is the shift key pressed
155-
* @param metaKey is the meta key pressed
156-
* @param button what mouse button is pressed
157-
* @param relatedTarget is there a related target for the event
158-
* @param offsetX the initial value of offsetX
159-
* @param offsetY the initial value of offsetY
160-
* @param width the initial value of width
161-
* @param height the initial value of height
162-
* @param pressure the initial value of pressure
163-
* @param rotation the initial value of rotation
164-
* @param tiltX the initial value of tiltX
165-
* @param tiltY the initial value of tiltY
166-
* @param pointerId the pointerId
167-
* @param pointerType the pointer type
168-
* @param hwTimestamp the initial value of hwTimestamp
169-
* @param isPrimary the initial value of isPrimary
170-
*/
171-
@JsxFunction(IE)
172-
public void initPointerEvent(final String type,
173-
final boolean bubbles,
174-
final boolean cancelable,
175-
final Object view,
176-
final int detail,
177-
final int screenX,
178-
final int screenY,
179-
final int clientX,
180-
final int clientY,
181-
final boolean ctrlKey,
182-
final boolean altKey,
183-
final boolean shiftKey,
184-
final boolean metaKey,
185-
final int button,
186-
final Object relatedTarget,
187-
final int offsetX,
188-
final int offsetY,
189-
final int width,
190-
final int height,
191-
final Double pressure,
192-
final int rotation,
193-
final int tiltX,
194-
final int tiltY,
195-
final int pointerId,
196-
final String pointerType,
197-
final int hwTimestamp,
198-
final boolean isPrimary) {
199-
super.initMouseEvent(type, bubbles, cancelable, view, detail, screenX, screenY, clientX, clientY, ctrlKey,
200-
altKey, shiftKey, metaKey, button, relatedTarget);
201-
width_ = width;
202-
height_ = height;
203-
pressure_ = pressure.doubleValue();
204-
tiltX_ = tiltX;
205-
tiltY_ = tiltY;
206-
pointerId_ = pointerId;
207-
pointerType_ = pointerType;
208-
isPrimary_ = isPrimary;
209-
}
210-
211138
/**
212139
* @return the pointerId
213140
*/

src/main/java/org/htmlunit/javascript/host/event/PopStateEvent.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,11 @@
1414
*/
1515
package org.htmlunit.javascript.host.event;
1616

17-
import static org.htmlunit.javascript.configuration.SupportedBrowser.IE;
18-
1917
import org.htmlunit.corejs.javascript.Scriptable;
2018
import org.htmlunit.corejs.javascript.ScriptableObject;
2119
import org.htmlunit.javascript.JavaScriptEngine;
2220
import org.htmlunit.javascript.configuration.JsxClass;
2321
import org.htmlunit.javascript.configuration.JsxConstructor;
24-
import org.htmlunit.javascript.configuration.JsxFunction;
2522
import org.htmlunit.javascript.configuration.JsxGetter;
2623

2724
/**
@@ -68,20 +65,6 @@ public PopStateEvent(final EventTarget target, final String type, final Object s
6865
state_ = state;
6966
}
7067

71-
/**
72-
* Initializes this event.
73-
* @param type the event type
74-
* @param bubbles whether or not the event should bubble
75-
* @param cancelable whether or not the event the event should be cancelable
76-
* @param state the state
77-
*/
78-
@JsxFunction(IE)
79-
public void initPopStateEvent(final String type, final boolean bubbles,
80-
final boolean cancelable, final Object state) {
81-
initEvent(type, bubbles, cancelable);
82-
state_ = state;
83-
}
84-
8568
/**
8669
* Return the state object.
8770
* @return the state object

src/main/java/org/htmlunit/javascript/host/event/TextEvent.java

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,55 +16,23 @@
1616

1717
import static org.htmlunit.javascript.configuration.SupportedBrowser.CHROME;
1818
import static org.htmlunit.javascript.configuration.SupportedBrowser.EDGE;
19-
import static org.htmlunit.javascript.configuration.SupportedBrowser.IE;
2019

2120
import org.htmlunit.corejs.javascript.ScriptableObject;
2221
import org.htmlunit.corejs.javascript.Undefined;
2322
import org.htmlunit.javascript.JavaScriptEngine;
2423
import org.htmlunit.javascript.configuration.JsxClass;
25-
import org.htmlunit.javascript.configuration.JsxConstant;
2624
import org.htmlunit.javascript.configuration.JsxConstructor;
2725
import org.htmlunit.javascript.configuration.JsxGetter;
2826

2927
/**
3028
* A JavaScript object for {@code TextEvent}.
3129
*
3230
* @author Ahmed Ashour
31+
* @author Ronald Brill
3332
*/
3433
@JsxClass({CHROME, EDGE})
3534
public class TextEvent extends UIEvent {
3635

37-
/** Constant for {@code DOM_INPUT_METHOD_UNKNOWN}. */
38-
@JsxConstant(IE)
39-
public static final int DOM_INPUT_METHOD_UNKNOWN = 0;
40-
/** Constant for {@code DOM_INPUT_METHOD_KEYBOARD}. */
41-
@JsxConstant(IE)
42-
public static final int DOM_INPUT_METHOD_KEYBOARD = 1;
43-
/** Constant for {@code DOM_INPUT_METHOD_PASTE}. */
44-
@JsxConstant(IE)
45-
public static final int DOM_INPUT_METHOD_PASTE = 2;
46-
/** Constant for {@code DOM_INPUT_METHOD_DROP}. */
47-
@JsxConstant(IE)
48-
public static final int DOM_INPUT_METHOD_DROP = 3;
49-
/** Constant for {@code DOM_INPUT_METHOD_IME}. */
50-
@JsxConstant(IE)
51-
public static final int DOM_INPUT_METHOD_IME = 4;
52-
/** Constant for {@code DOM_INPUT_METHOD_OPTION}. */
53-
@JsxConstant(IE)
54-
public static final int DOM_INPUT_METHOD_OPTION = 5;
55-
/** Constant for {@code DOM_INPUT_METHOD_HANDWRITING}. */
56-
@JsxConstant(IE)
57-
public static final int DOM_INPUT_METHOD_HANDWRITING = 6;
58-
/** Constant for {@code DOM_INPUT_METHOD_VOICE}. */
59-
@JsxConstant(IE)
60-
public static final int DOM_INPUT_METHOD_VOICE = 7;
61-
/** Constant for {@code DOM_INPUT_METHOD_MULTIMODAL}. */
62-
@JsxConstant(IE)
63-
public static final int DOM_INPUT_METHOD_MULTIMODAL = 8;
64-
/** Constant for {@code DOM_INPUT_METHOD_SCRIPT}. */
65-
@JsxConstant(IE)
66-
public static final int DOM_INPUT_METHOD_SCRIPT = 9;
67-
6836
private Object data_;
6937

7038
/**

0 commit comments

Comments
 (0)