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

rbri--- via HtmlUnit-develop <[email protected]>
Newsgroups gmane.comp.java.htmlunit.devel
Message-ID <[email protected]>
Revision: 15379
          http://sourceforge.net/p/htmlunit/code/15379
Author:   rbri
Date:     2018-06-21 19:22:38 +0000 (Thu, 21 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/javascript/host/Element.java
    trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElementTest.java

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java	2018-06-21 18:31:07 UTC (rev 15378)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java	2018-06-21 19:22:38 UTC (rev 15379)
@@ -955,9 +955,9 @@
     @BrowserFeature(IE)
     JS_INNER_HTML_ADD_CHILD_FOR_NULL_VALUE,
 
-    /** Indicates that innerHTML uses {@code crnl} instead of {@code nl}. */
+    /** Indicates that innerHTML uses {@code lf} instead of {@code lf}. */
     @BrowserFeature(IE)
-    JS_INNER_TEXT_CR_NL,
+    JS_INNER_TEXT_LF,
 
     /** Indicates that innerText setter supports null values. */
     @BrowserFeature({CHROME, FF52})

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Element.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Element.java	2018-06-21 18:31:07 UTC (rev 15378)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Element.java	2018-06-21 19:22:38 UTC (rev 15379)
@@ -17,7 +17,7 @@
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_BOUNDINGCLIENTRECT_THROWS_IF_DISCONNECTED;
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_ELEMENT_GET_ATTRIBUTE_RETURNS_EMPTY;
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_INNER_HTML_ADD_CHILD_FOR_NULL_VALUE;
-import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_INNER_TEXT_CR_NL;
+import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_INNER_TEXT_LF;
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_OUTER_HTML_NULL_AS_STRING;
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_OUTER_HTML_REMOVES_CHILDREN_FOR_DETACHED;
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_OUTER_HTML_THROWS_FOR_DETACHED;
@@ -733,7 +733,7 @@
      *
      * @see <a href="http://msdn.microsoft.com/en-us/library/ie/ms536451.aspx">MSDN</a>
      */
-    @JsxFunction({CHROME, FF52})
+    @JsxFunction({CHROME, FF})
     public Object insertAdjacentElement(final String where, final Object insertedElement) {
         if (insertedElement instanceof Node) {
             final DomNode childNode = ((Node) insertedElement).getDomNodeOrDie();
@@ -760,7 +760,7 @@
      *
      * @see <a href="http://msdn.microsoft.com/en-us/library/ie/ms536453.aspx">MSDN</a>
      */
-    @JsxFunction({CHROME, FF52})
+    @JsxFunction({CHROME, FF})
     public void insertAdjacentText(final String where, final String text) {
         final Object[] values = getInsertAdjacentLocation(where);
         final DomNode node = (DomNode) values[0];
@@ -1064,8 +1064,8 @@
             if (node instanceof HtmlElement) {
                 final HtmlElement element = (HtmlElement) node;
                 if ("p".equals(element.getTagName())) {
-                    if (getBrowserVersion().hasFeature(JS_INNER_TEXT_CR_NL)) {
-                        builder.append("\r\n"); // \r\n because it's to implement something IE specific
+                    if (getBrowserVersion().hasFeature(JS_INNER_TEXT_LF)) {
+                        builder.append('\n'); // \r\n because it's to implement something IE specific
                     }
                     else {
                         int i = builder.length() - 1;

Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElementTest.java
===================================================================
--- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElementTest.java	2018-06-21 18:31:07 UTC (rev 15378)
+++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElementTest.java	2018-06-21 19:22:38 UTC (rev 15379)
@@ -1776,7 +1776,7 @@
     @Test
     @Alerts(CHROME = {"Old = Old\ninnerText", "New = New cell value"},
             FF = {"Old = Old\n\ninnerText", "New = New cell value"},
-            IE = {"Old = Old \r\ninnerText", "New = New cell value"})
+            IE = {"Old = Old \ninnerText", "New = New cell value"})
     @NotYetImplemented(FF)
     public void getSetInnerTextSimple() throws Exception {
         final String html = "<html>\n"


------------------------------------------------------------------------------
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.