Skip to content

Commit

Permalink
FF 119 / FF ESR 115
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Oct 29, 2023
1 parent 5c88aa5 commit 8a53b9f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 23 deletions.
10 changes: 1 addition & 9 deletions src/main/java/org/htmlunit/BrowserVersionFeatures.java
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ public enum BrowserVersionFeatures {
JS_ANCHOR_HOSTNAME_IGNORE_BLANK,

/** The anchor pathname detects url's starting with one letter as file url's. */
@BrowserFeature(FF)
@BrowserFeature({FF, FF_ESR})
JS_ANCHOR_PATHNAME_DETECT_WIN_DRIVES_URL,

/** The anchor pathname detects url's starting with one letter as file url's
Expand All @@ -637,10 +637,6 @@ public enum BrowserVersionFeatures {
@BrowserFeature({CHROME, EDGE, FF, FF_ESR})
JS_ANCHOR_PATHNAME_NONE_FOR_BROKEN_URL,

/** The anchor pathname property returns nothing for none http(s) url's. */
@BrowserFeature(FF_ESR)
JS_ANCHOR_PATHNAME_NONE_FOR_NONE_HTTP_URL,

/** The anchor pathname prefixes file url's with '/'. */
@BrowserFeature({CHROME, EDGE, IE})
JS_ANCHOR_PATHNAME_PREFIX_WIN_DRIVES_URL,
Expand Down Expand Up @@ -746,10 +742,6 @@ public enum BrowserVersionFeatures {
@BrowserFeature(IE)
JS_CLIENTWIDTH_INPUT_TEXT_143,

/** ClientWidth for text/password input is 145. */
@BrowserFeature(FF_ESR)
JS_CLIENTWIDTH_INPUT_TEXT_145,

/** ClientWidth for text/password input is 173. */
@BrowserFeature({CHROME, EDGE})
JS_CLIENTWIDTH_INPUT_TEXT_173,
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/org/htmlunit/javascript/host/Window.java
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ public Document getDocument() {
* Returns the application cache.
* @return the application cache
*/
@JsxGetter({FF_ESR, IE})
@JsxGetter(IE)
@SuppressFBWarnings("EI_EXPOSE_REP")
public ApplicationCache getApplicationCache() {
return applicationCache_;
Expand Down Expand Up @@ -821,9 +821,11 @@ public void initialize(final WebWindow webWindow, final Page pageToEnclose) {
location_.jsConstructor();
location_.initialize(this, pageToEnclose);

applicationCache_ = new ApplicationCache();
applicationCache_.setParentScope(this);
applicationCache_.setPrototype(getPrototype(applicationCache_.getClass()));
if (getBrowserVersion().isIE()) {
applicationCache_ = new ApplicationCache();
applicationCache_.setParentScope(this);
applicationCache_.setPrototype(getPrototype(applicationCache_.getClass()));
}

// like a JS new Object()
final Context ctx = Context.getCurrentContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import static org.htmlunit.BrowserVersionFeatures.JS_CLIENTHEIGHT_INPUT_18;
import static org.htmlunit.BrowserVersionFeatures.JS_CLIENTHEIGHT_RADIO_CHECKBOX_10;
import static org.htmlunit.BrowserVersionFeatures.JS_CLIENTWIDTH_INPUT_TEXT_143;
import static org.htmlunit.BrowserVersionFeatures.JS_CLIENTWIDTH_INPUT_TEXT_145;
import static org.htmlunit.BrowserVersionFeatures.JS_CLIENTWIDTH_INPUT_TEXT_173;
import static org.htmlunit.BrowserVersionFeatures.JS_CLIENTWIDTH_RADIO_CHECKBOX_10;
import static org.htmlunit.css.CssStyleSheet.ABSOLUTE;
Expand Down Expand Up @@ -812,9 +811,6 @@ else if (element instanceof HtmlTextInput || element instanceof HtmlPasswordInpu
if (browserVersion.hasFeature(JS_CLIENTWIDTH_INPUT_TEXT_143)) {
return 143;
}
if (browserVersion.hasFeature(JS_CLIENTWIDTH_INPUT_TEXT_145)) {
return 145;
}
if (browserVersion.hasFeature(JS_CLIENTWIDTH_INPUT_TEXT_173)) {
return 173;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import static org.htmlunit.BrowserVersionFeatures.JS_ANCHOR_PATHNAME_DETECT_WIN_DRIVES_URL;
import static org.htmlunit.BrowserVersionFeatures.JS_ANCHOR_PATHNAME_DETECT_WIN_DRIVES_URL_REPLACE;
import static org.htmlunit.BrowserVersionFeatures.JS_ANCHOR_PATHNAME_NONE_FOR_BROKEN_URL;
import static org.htmlunit.BrowserVersionFeatures.JS_ANCHOR_PATHNAME_NONE_FOR_NONE_HTTP_URL;
import static org.htmlunit.BrowserVersionFeatures.JS_ANCHOR_PATHNAME_PREFIX_WIN_DRIVES_URL;
import static org.htmlunit.BrowserVersionFeatures.JS_ANCHOR_PROTOCOL_COLON_FOR_BROKEN_URL;
import static org.htmlunit.BrowserVersionFeatures.JS_ANCHOR_PROTOCOL_COLON_UPPER_CASE_DRIVE_LETTERS;
Expand Down Expand Up @@ -402,11 +401,6 @@ public String getPathname() {
final BrowserVersion browser = getBrowserVersion();
try {
final URL url = getUrl();
if (!url.getProtocol().startsWith("http")
&& browser.hasFeature(JS_ANCHOR_PATHNAME_NONE_FOR_NONE_HTTP_URL)) {
return "";
}

if (browser.hasFeature(JS_ANCHOR_PATHNAME_DETECT_WIN_DRIVES_URL_REPLACE)) {
final HtmlAnchor anchor = (HtmlAnchor) getDomNodeOrDie();
String href = anchor.getHrefAttribute();
Expand Down

0 comments on commit 8a53b9f

Please sign in to comment.