[HtmlUnit] SVN: [15343] trunk/htmlunit/src

rbri--- via HtmlUnit-develop <[email protected]>
Newsgroups gmane.comp.java.htmlunit.devel
Message-ID <[email protected]>
Revision: 15343
          http://sourceforge.net/p/htmlunit/code/15343
Author:   rbri
Date:     2018-06-17 08:31:21 +0000 (Sun, 17 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/HtmlSelect.java
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSelectElement.java
    trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSelectElementTest.java

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java	2018-06-17 08:17:44 UTC (rev 15342)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java	2018-06-17 08:31:21 UTC (rev 15343)
@@ -804,7 +804,7 @@
     JS_DOMTOKENLIST_LENGTH_IGNORES_DUPLICATES,
 
     /** DOMTokenList removed all whitespace chars during add. */
-    @BrowserFeature(CHROME)
+    @BrowserFeature({CHROME, FF60})
     JS_DOMTOKENLIST_REMOVE_WHITESPACE_CHARS_ON_ADD,
 
     /** DOMTokenList removed all whitespace chars during edit. */
@@ -1457,13 +1457,6 @@
     @BrowserFeature(IE)
     RESETINPUT_DEFAULT_VALUE_IF_VALUE_NOT_DEFINED,
 
-    /**
-     * Indicates that all options of a select are deselected,
-     * if the select state is changed for an unknown option.
-     */
-    @BrowserFeature({CHROME, FF52, IE})
-    SELECT_DESELECT_ALL_IF_SWITCHING_UNKNOWN,
-
     /** The default display style of slot is 'content'. */
     @BrowserFeature(CHROME)
     SLOT_CONTENTS,

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSelect.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSelect.java	2018-06-17 08:17:44 UTC (rev 15342)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSelect.java	2018-06-17 08:31:21 UTC (rev 15343)
@@ -16,7 +16,6 @@
 
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.EVENT_MOUSE_ON_DISABLED;
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_SELECT_SET_VALUES_CHECKS_ONLY_VALUE_ATTRIBUTE;
-import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.SELECT_DESELECT_ALL_IF_SWITCHING_UNKNOWN;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -311,10 +310,8 @@
             return setSelectedAttribute(selected, isSelected, invokeOnFocus, true, false, true);
         }
         catch (final ElementNotFoundException e) {
-            if (hasFeature(SELECT_DESELECT_ALL_IF_SWITCHING_UNKNOWN)) {
-                for (final HtmlOption o : getSelectedOptions()) {
-                    o.setSelected(false);
-                }
+            for (final HtmlOption o : getSelectedOptions()) {
+                o.setSelected(false);
             }
             return (P) getPage();
         }

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSelectElement.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSelectElement.java	2018-06-17 08:17:44 UTC (rev 15342)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSelectElement.java	2018-06-17 08:31:21 UTC (rev 15343)
@@ -18,6 +18,7 @@
 import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.CHROME;
 import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.EDGE;
 import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF;
+import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF60;
 
 import java.util.List;
 
@@ -312,7 +313,7 @@
      * Returns the labels associated with the element.
      * @return the labels associated with the element
      */
-    @JsxGetter(CHROME)
+    @JsxGetter({CHROME, FF60})
     public AbstractList getLabels() {
         if (labels_ == null) {
             labels_ = new LabelsHelper(getDomNodeOrDie());

Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSelectElementTest.java
===================================================================
--- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSelectElementTest.java	2018-06-17 08:17:44 UTC (rev 15342)
+++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSelectElementTest.java	2018-06-17 08:31:21 UTC (rev 15343)
@@ -33,7 +33,7 @@
 import com.gargoylesoftware.htmlunit.html.HtmlPageTest;
 
 /**
- * Tests for {@link HTMLScriptElement}.
+ * Tests for {@link HTMLSelectElement}.
  *
  * @author <a href="mailto:[email protected]">Mike Bowler</a>
  * @author David K. Taylor


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.