[HtmlUnit] SVN: [15396] trunk/htmlunit/src
rbri--- via HtmlUnit-develop <[email protected]>
| Newsgroups | gmane.comp.java.htmlunit.devel |
|---|---|
| Message-ID | <[email protected]> |
Revision: 15396
http://sourceforge.net/p/htmlunit/code/15396
Author: rbri
Date: 2018-06-27 19:45:45 +0000 (Wed, 27 Jun 2018)
Log Message:
-----------
ff60 support (wip)
Modified Paths:
--------------
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInput.java
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/HtmlUnitContextFactory.java
trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine2Test.java
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2018-06-27 19:30:26 UTC (rev 15395)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2018-06-27 19:45:45 UTC (rev 15396)
@@ -90,6 +90,11 @@
@BrowserFeature({CHROME, IE})
CSS_INPUT_DISPLAY_INLINE_BLOCK,
+ /** The default value of the display property for the 'input' tags of type
+ * radio or checkbox is 'inline-block'. */
+ @BrowserFeature(FF60)
+ CSS_INPUT_DISPLAY_RADIO_CHECKBOX_INLINE_BLOCK,
+
/** 'initial' is a valid length value. */
@BrowserFeature({CHROME, FF})
CSS_LENGTH_INITIAL,
@@ -902,10 +907,6 @@
@BrowserFeature(IE)
JS_FORM_USABLE_AS_FUNCTION,
- /** Indicates that function is defined even before its declaration, inside a block. */
- @BrowserFeature({CHROME, FF52, IE})
- JS_FUNCTION_DECLARED_FORWARD_IN_BLOCK,
-
/** Indicates if the method toSource exists on the native objects. */
@BrowserFeature(FF)
JS_FUNCTION_TOSOURCE,
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInput.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInput.java 2018-06-27 19:30:26 UTC (rev 15395)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInput.java 2018-06-27 19:45:45 UTC (rev 15396)
@@ -15,6 +15,7 @@
package com.gargoylesoftware.htmlunit.html;
import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.CSS_INPUT_DISPLAY_INLINE_BLOCK;
+import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.CSS_INPUT_DISPLAY_RADIO_CHECKBOX_INLINE_BLOCK;
import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.EVENT_MOUSE_ON_DISABLED;
import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTMLINPUT_DOES_NOT_CLICK_SURROUNDING_ANCHOR;
@@ -627,6 +628,15 @@
if (hasFeature(CSS_INPUT_DISPLAY_INLINE_BLOCK)) {
return DisplayStyle.INLINE_BLOCK;
}
+
+ if (hasFeature(CSS_INPUT_DISPLAY_RADIO_CHECKBOX_INLINE_BLOCK)) {
+ final String type = getTypeAttribute();
+ if ("radio".equals(type)
+ || "checkbox".equals(type)) {
+ return DisplayStyle.INLINE_BLOCK;
+ }
+ }
+
return DisplayStyle.INLINE;
}
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/HtmlUnitContextFactory.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/HtmlUnitContextFactory.java 2018-06-27 19:30:26 UTC (rev 15395)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/HtmlUnitContextFactory.java 2018-06-27 19:45:45 UTC (rev 15396)
@@ -18,7 +18,6 @@
import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_ARRAY_CONSTRUCTION_PROPERTIES;
import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_ENUM_NUMBERS_FIRST;
import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_ERROR_STACK;
-import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_FUNCTION_DECLARED_FORWARD_IN_BLOCK;
import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_IGNORES_LAST_LINE_CONTAINING_UNCOMMENTED;
import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_PRE_WIDTH_STRING;
import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_PROPERTY_DESCRIPTOR_NAME;
@@ -350,7 +349,7 @@
case Context.FEATURE_HTMLUNIT_ERROR_STACK:
return browserVersion_.hasFeature(JS_ERROR_STACK);
case Context.FEATURE_HTMLUNIT_FUNCTION_DECLARED_FORWARD_IN_BLOCK:
- return browserVersion_.hasFeature(JS_FUNCTION_DECLARED_FORWARD_IN_BLOCK);
+ return true;
case Context.FEATURE_HTMLUNIT_ENUM_NUMBERS_FIRST:
return browserVersion_.hasFeature(JS_ENUM_NUMBERS_FIRST);
case Context.FEATURE_HTMLUNIT_MEMBERBOX_NAME:
Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine2Test.java
===================================================================
--- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine2Test.java 2018-06-27 19:30:26 UTC (rev 15395)
+++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine2Test.java 2018-06-27 19:45:45 UTC (rev 15396)
@@ -14,9 +14,6 @@
*/
package com.gargoylesoftware.htmlunit.javascript;
-import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.CHROME;
-import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF52;
-import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.IE;
import static org.junit.Assert.fail;
import org.junit.Test;
@@ -150,7 +147,7 @@
@Test
@Alerts(DEFAULT = {"undefined", "function foo() {}"},
IE = {"function foo() {}", "function foo() {}"})
- @NotYetImplemented({IE, CHROME, FF52})
+ @NotYetImplemented
public void variableNotDefined() throws Exception {
final String html = "<html><head></head><body>\n"
+ "<script>\n"
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot