Quantcast

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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

rbri
Revision: 14353
          http://sourceforge.net/p/htmlunit/code/14353
Author:   rbri
Date:     2017-05-04 12:00:25 +0000 (Thu, 04 May 2017)
Log Message:
-----------
FF52

Modified Paths:
--------------
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOption.java
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLInputElement.java
    trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLInputElementTest.java

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2017-05-04 11:19:20 UTC (rev 14352)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2017-05-04 12:00:25 UTC (rev 14353)
@@ -448,6 +448,10 @@
     @BrowserFeature({FF, IE})
     HTMLOPTION_EMPTY_TEXT_IS_NO_CHILDREN,
 
+    /** If the single select has exact one option, this options gets never deselected. */
+    @BrowserFeature(FF45)
+    HTMLOPTION_EXACT_ONE_OPTION_GETS_NERVER_DESELECTED,
+
     /** */
     @BrowserFeature(IE)
     HTMLOPTION_PREVENT_DISABLED,

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOption.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOption.java 2017-05-04 11:19:20 UTC (rev 14352)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOption.java 2017-05-04 12:00:25 UTC (rev 14353)
@@ -23,6 +23,7 @@
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.EVENT_ONMOUSEUP_FOR_SELECT_OPTION_TRIGGERS_ADDITIONAL_UP_FOR_SELECT;
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.EVENT_ONMOUSEUP_NOT_FOR_SELECT_OPTION;
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTMLOPTION_EMPTY_TEXT_IS_NO_CHILDREN;
+import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTMLOPTION_EXACT_ONE_OPTION_GETS_NERVER_DESELECTED;
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTMLOPTION_PREVENT_DISABLED;
 
 import java.io.IOException;
@@ -117,7 +118,7 @@
         }
         final HtmlSelect select = getEnclosingSelect();
         if (select != null) {
-            if (hasFeature(EVENT_ONMOUSEOVER_FOR_DISABLED_OPTION)
+            if (hasFeature(HTMLOPTION_EXACT_ONE_OPTION_GETS_NERVER_DESELECTED)
                     && !select.isMultipleSelectEnabled() && select.getOptionSize() == 1) {
                 selected = true;
             }

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLInputElement.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLInputElement.java 2017-05-04 11:19:20 UTC (rev 14352)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLInputElement.java 2017-05-04 12:00:25 UTC (rev 14353)
@@ -28,6 +28,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.FF52;
 import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.IE;
 
 import java.io.File;
@@ -424,7 +425,7 @@
      * Gets the {@code minLength}.
      * @return the {@code minLength}
      */
-    @JsxGetter(CHROME)
+    @JsxGetter({CHROME, FF52})
     public int getMinLength() {
         final String attrValue = getDomNodeOrDie().getAttribute("minLength");
         return NumberUtils.toInt(attrValue, -1);
@@ -434,7 +435,7 @@
      * Sets the value of {@code minLength} attribute.
      * @param length the new value
      */
-    @JsxSetter(CHROME)
+    @JsxSetter({CHROME, FF52})
     public void setMinLength(final int length) {
         getDomNodeOrDie().setMinLength(length);
     }

Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLInputElementTest.java
===================================================================
--- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLInputElementTest.java 2017-05-04 11:19:20 UTC (rev 14352)
+++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLInputElementTest.java 2017-05-04 12:00:25 UTC (rev 14353)
@@ -247,7 +247,7 @@
             + "    <option>foo</option>\n"
             + "  </select>\n"
             + "  <select multiple='multiple' name='select2'>\n"
-            + "    <option>foo</option>\n"
+            + "    <option>boo</option>\n"
             + "  </select>\n"
             + "  <input type='password' name='password1'/>\n"
             + "  <input type='radio' name='radio1'/>\n"


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Loading...