Skip to content

Commit 948dde3

Browse files
committed
time to remove IE (issue #735)
1 parent b830be5 commit 948dde3

14 files changed

Lines changed: 0 additions & 479 deletions

src/main/java/org/htmlunit/javascript/host/html/HTMLFieldSetElement.java

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

17-
import static org.htmlunit.javascript.configuration.SupportedBrowser.IE;
18-
1917
import org.htmlunit.html.DomElement;
2018
import org.htmlunit.html.HtmlFieldSet;
2119
import org.htmlunit.html.HtmlForm;
@@ -49,24 +47,6 @@ public void jsConstructor() {
4947
super.jsConstructor();
5048
}
5149

52-
/**
53-
* Returns the value of the {@code align} property.
54-
* @return the value of the {@code align} property
55-
*/
56-
@JsxGetter(IE)
57-
public String getAlign() {
58-
return getAlign(false);
59-
}
60-
61-
/**
62-
* Sets the value of the {@code align} property.
63-
* @param align the value of the {@code align} property
64-
*/
65-
@JsxSetter(IE)
66-
public void setAlign(final String align) {
67-
setAlign(align, false);
68-
}
69-
7050
/**
7151
* Returns the {@code name} attribute.
7252
* @return the {@code name} attribute

src/main/java/org/htmlunit/javascript/host/html/HTMLFormElement.java

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

1717
import static org.htmlunit.BrowserVersionFeatures.JS_FORM_DISPATCHEVENT_SUBMITS;
1818
import static org.htmlunit.BrowserVersionFeatures.JS_FORM_USABLE_AS_FUNCTION;
19-
import static org.htmlunit.javascript.configuration.SupportedBrowser.IE;
2019

2120
import java.io.Serializable;
2221
import java.net.MalformedURLException;
@@ -368,31 +367,6 @@ else if (subHtmlElement instanceof HTMLInputElement) {
368367
this.getHtmlForm().submit(submittable);
369368
}
370369

371-
/**
372-
* Retrieves a form object or an object from an elements collection.
373-
* @param index Integer or String that specifies the object or collection to retrieve.
374-
* If this parameter is an integer, it is the zero-based index of the object.
375-
* If this parameter is a string, all objects with matching name or id properties are retrieved,
376-
* and a collection is returned if more than one match is made
377-
* @param subIndex Optional. Integer that specifies the zero-based index of the object to retrieve
378-
* when a collection is returned
379-
* @return an object or a collection of objects if successful, or null otherwise
380-
*/
381-
@JsxFunction(IE)
382-
public Object item(final Object index, final Object subIndex) {
383-
if (index instanceof Number) {
384-
return getElements().item(index);
385-
}
386-
387-
final String name = JavaScriptEngine.toString(index);
388-
final Object response = getWithPreemption(name);
389-
if (subIndex instanceof Number && response instanceof HTMLCollection) {
390-
return ((HTMLCollection) response).item(subIndex);
391-
}
392-
393-
return response;
394-
}
395-
396370
/**
397371
* Resets this form.
398372
*/

src/main/java/org/htmlunit/javascript/host/html/HTMLFrameElement.java

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

17-
import static org.htmlunit.javascript.configuration.SupportedBrowser.IE;
18-
1917
import org.htmlunit.html.BaseFrameElement;
2018
import org.htmlunit.html.FrameWindow;
2119
import org.htmlunit.html.FrameWindow.PageDenied;
@@ -121,24 +119,6 @@ private BaseFrameElement getFrame() {
121119
return (BaseFrameElement) getDomNodeOrDie();
122120
}
123121

124-
/**
125-
* Gets the {@code border} attribute.
126-
* @return the {@code border} attribute
127-
*/
128-
@JsxGetter(IE)
129-
public String getBorder() {
130-
return getDomNodeOrDie().getAttributeDirect("border");
131-
}
132-
133-
/**
134-
* Sets the {@code border} attribute.
135-
* @param border the {@code border} attribute
136-
*/
137-
@JsxSetter(IE)
138-
public void setBorder(final String border) {
139-
getDomNodeOrDie().setAttribute("border", border);
140-
}
141-
142122
/**
143123
* {@inheritDoc}
144124
*/

src/main/java/org/htmlunit/javascript/host/html/HTMLFrameSetElement.java

Lines changed: 0 additions & 38 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 org.htmlunit.corejs.javascript.Function;
2221
import org.htmlunit.html.HtmlFrameSet;
@@ -108,24 +107,6 @@ public String getCols() {
108107
return htmlFrameSet.getColsAttribute();
109108
}
110109

111-
/**
112-
* Gets the {@code border} attribute.
113-
* @return the {@code border} attribute
114-
*/
115-
@JsxGetter(IE)
116-
public String getBorder() {
117-
return getDomNodeOrDie().getAttributeDirect("border");
118-
}
119-
120-
/**
121-
* Sets the {@code border} attribute.
122-
* @param border the {@code border} attribute
123-
*/
124-
@JsxSetter(IE)
125-
public void setBorder(final String border) {
126-
getDomNodeOrDie().setAttribute("border", border);
127-
}
128-
129110
/**
130111
* Returns the {@code onbeforeunload} event handler.
131112
* @return the {@code onbeforeunload} event handler
@@ -449,23 +430,4 @@ public Function getOnbeforeprint() {
449430
public void setOnbeforeprint(final Object beforeprint) {
450431
setEventHandler(Event.TYPE_BEFOREPRINT, beforeprint);
451432
}
452-
453-
/**
454-
* {@inheritDoc}
455-
*/
456-
@Override
457-
@JsxGetter(IE)
458-
public Function getOnresize() {
459-
return super.getOnresize();
460-
}
461-
462-
/**
463-
* {@inheritDoc}
464-
*/
465-
@Override
466-
@JsxSetter(IE)
467-
public void setOnresize(final Object resize) {
468-
super.setOnresize(resize);
469-
}
470-
471433
}

src/main/java/org/htmlunit/javascript/host/html/HTMLHeadingElement.java

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

17-
import static org.htmlunit.javascript.configuration.SupportedBrowser.IE;
18-
19-
import org.apache.commons.lang3.ArrayUtils;
2017
import org.htmlunit.html.HtmlHeading1;
2118
import org.htmlunit.html.HtmlHeading2;
2219
import org.htmlunit.html.HtmlHeading3;
2320
import org.htmlunit.html.HtmlHeading4;
2421
import org.htmlunit.html.HtmlHeading5;
2522
import org.htmlunit.html.HtmlHeading6;
26-
import org.htmlunit.javascript.JavaScriptEngine;
2723
import org.htmlunit.javascript.configuration.JsxClass;
2824
import org.htmlunit.javascript.configuration.JsxConstructor;
2925
import org.htmlunit.javascript.configuration.JsxGetter;
@@ -43,9 +39,6 @@
4339
@JsxClass(domClass = HtmlHeading6.class)
4440
public class HTMLHeadingElement extends HTMLElement {
4541

46-
/** Valid values for the {@link #getClear() clear} property. */
47-
private static final String[] VALID_CLEAR_VALUES = {"left", "right", "all", "none"};
48-
4942
/**
5043
* Creates an instance.
5144
*/
@@ -78,29 +71,4 @@ public String getAlign() {
7871
public void setAlign(final String align) {
7972
setAlign(align, false);
8073
}
81-
82-
/**
83-
* Returns the value of the {@code clear} property.
84-
* @return the value of the {@code clear} property
85-
*/
86-
@JsxGetter(IE)
87-
public String getClear() {
88-
final String clear = getDomNodeOrDie().getAttributeDirect("clear");
89-
if (!ArrayUtils.contains(VALID_CLEAR_VALUES, clear)) {
90-
return "";
91-
}
92-
return clear;
93-
}
94-
95-
/**
96-
* Sets the value of the {@code clear} property.
97-
* @param clear the value of the {@code clear} property
98-
*/
99-
@JsxSetter(IE)
100-
public void setClear(final String clear) {
101-
if (!ArrayUtils.contains(VALID_CLEAR_VALUES, clear)) {
102-
throw JavaScriptEngine.reportRuntimeError("Invalid clear property value: '" + clear + "'.");
103-
}
104-
getDomNodeOrDie().setAttribute("clear", clear);
105-
}
10674
}

src/main/java/org/htmlunit/javascript/host/html/HTMLIFrameElement.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
package org.htmlunit.javascript.host.html;
1616

1717
import static org.htmlunit.BrowserVersionFeatures.JS_IFRAME_ALWAYS_EXECUTE_ONLOAD;
18-
import static org.htmlunit.javascript.configuration.SupportedBrowser.IE;
1918

2019
import org.htmlunit.html.BaseFrameElement;
2120
import org.htmlunit.html.FrameWindow;
@@ -139,24 +138,6 @@ public void setOnload(final Object eventHandler) {
139138
isAttachedToPageDuringOnload_ = getDomNodeOrDie().isAttachedToPage();
140139
}
141140

142-
/**
143-
* Gets the {@code border} attribute.
144-
* @return the {@code border} attribute
145-
*/
146-
@JsxGetter(IE)
147-
public String getBorder() {
148-
return getDomNodeOrDie().getAttributeDirect("border");
149-
}
150-
151-
/**
152-
* Sets the {@code border} attribute.
153-
* @param border the {@code border} attribute
154-
*/
155-
@JsxSetter(IE)
156-
public void setBorder(final String border) {
157-
getDomNodeOrDie().setAttribute("border", border);
158-
}
159-
160141
/**
161142
* Returns the value of the {@code align} property.
162143
* @return the value of the {@code align} property

src/main/java/org/htmlunit/javascript/host/html/HTMLOptionsCollection.java

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

17-
import static org.htmlunit.javascript.configuration.SupportedBrowser.IE;
18-
19-
import java.io.Serializable;
20-
import java.util.ArrayList;
21-
import java.util.List;
22-
import java.util.function.Supplier;
23-
2417
import org.htmlunit.SgmlPage;
2518
import org.htmlunit.WebAssert;
2619
import org.htmlunit.corejs.javascript.Context;
@@ -30,7 +23,6 @@
3023
import org.htmlunit.corejs.javascript.Scriptable;
3124
import org.htmlunit.corejs.javascript.ScriptableObject;
3225
import org.htmlunit.corejs.javascript.Undefined;
33-
import org.htmlunit.html.DomNode;
3426
import org.htmlunit.html.ElementFactory;
3527
import org.htmlunit.html.HtmlOption;
3628
import org.htmlunit.html.HtmlSelect;
@@ -41,7 +33,6 @@
4133
import org.htmlunit.javascript.configuration.JsxGetter;
4234
import org.htmlunit.javascript.configuration.JsxSetter;
4335
import org.htmlunit.javascript.configuration.JsxSymbol;
44-
import org.htmlunit.javascript.host.dom.NodeList;
4536

4637
/**
4738
* This is the array returned by the "options" property of Select.
@@ -55,7 +46,6 @@
5546
* @author Ronald Brill
5647
*/
5748
@JsxClass
58-
@JsxClass(isJSObject = false, value = IE)
5949
public class HTMLOptionsCollection extends HtmlUnitScriptable {
6050

6151
private HtmlSelect htmlSelect_;
@@ -317,26 +307,6 @@ public void setSelectedIndex(final int index) {
317307
htmlSelect_.setSelectedIndex(index);
318308
}
319309

320-
/**
321-
* Returns the child nodes of the current element.
322-
* @return the child nodes of the current element
323-
*/
324-
@JsxGetter(IE)
325-
public NodeList getChildNodes() {
326-
final NodeList childNodes = new NodeList(htmlSelect_, false);
327-
childNodes.setElementsSupplier(
328-
(Supplier<List<DomNode>> & Serializable)
329-
() -> {
330-
final List<DomNode> response = new ArrayList<>();
331-
for (final DomNode child : htmlSelect_.getChildren()) {
332-
response.add(child);
333-
}
334-
335-
return response;
336-
});
337-
return childNodes;
338-
}
339-
340310
@JsxSymbol
341311
public ES6Iterator iterator() {
342312
return new NativeArrayIterator(getParentScope(), this, NativeArrayIterator.ARRAY_ITERATOR_TYPE.VALUES);

src/main/java/org/htmlunit/javascript/host/html/HTMLParagraphElement.java

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

17-
import static org.htmlunit.javascript.configuration.SupportedBrowser.IE;
18-
19-
import org.apache.commons.lang3.ArrayUtils;
2017
import org.htmlunit.html.HtmlParagraph;
21-
import org.htmlunit.javascript.JavaScriptEngine;
2218
import org.htmlunit.javascript.configuration.JsxClass;
2319
import org.htmlunit.javascript.configuration.JsxConstructor;
2420
import org.htmlunit.javascript.configuration.JsxGetter;
@@ -34,9 +30,6 @@
3430
@JsxClass(domClass = HtmlParagraph.class)
3531
public class HTMLParagraphElement extends HTMLElement {
3632

37-
/** Valid values for the {@link #getClear() clear} property. */
38-
private static final String[] VALID_CLEAR_VALUES = {"left", "right", "all", "none"};
39-
4033
/**
4134
* Creates an instance.
4235
*/
@@ -69,29 +62,4 @@ public String getAlign() {
6962
public void setAlign(final String align) {
7063
setAlign(align, false);
7164
}
72-
73-
/**
74-
* Returns the value of the {@code clear} property.
75-
* @return the value of the {@code clear} property
76-
*/
77-
@JsxGetter(IE)
78-
public String getClear() {
79-
final String clear = getDomNodeOrDie().getAttributeDirect("clear");
80-
if (!ArrayUtils.contains(VALID_CLEAR_VALUES, clear)) {
81-
return "";
82-
}
83-
return clear;
84-
}
85-
86-
/**
87-
* Sets the value of the {@code clear} property.
88-
* @param clear the value of the {@code clear} property
89-
*/
90-
@JsxSetter(IE)
91-
public void setClear(final String clear) {
92-
if (!ArrayUtils.contains(VALID_CLEAR_VALUES, clear)) {
93-
throw JavaScriptEngine.reportRuntimeError("Invalid clear property value: '" + clear + "'.");
94-
}
95-
getDomNodeOrDie().setAttribute("clear", clear);
96-
}
9765
}

0 commit comments

Comments
 (0)