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

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

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

rbri
Revision: 14336
          http://sourceforge.net/p/htmlunit/code/14336
Author:   rbri
Date:     2017-05-03 17:48:13 +0000 (Wed, 03 May 2017)
Log Message:
-----------
latest chrome

Modified Paths:
--------------
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventListenersContainer.java
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/UIEvent.java
    trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event2Test.java

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2017-05-03 17:34:52 UTC (rev 14335)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2017-05-03 17:48:13 UTC (rev 14336)
@@ -157,10 +157,6 @@
     @BrowserFeature(IE)
     DOM_NORMALIZE_REMOVE_CHILDREN,
 
-    /** Chrome maintains a separate state for this. */
-    @BrowserFeature(CHROME)
-    EVENT_CANCEL_BUBBLE,
-
     /** Event false result. */
     @BrowserFeature(IE)
     EVENT_FALSE_RESULT,

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventListenersContainer.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventListenersContainer.java 2017-05-03 17:34:52 UTC (rev 14335)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventListenersContainer.java 2017-05-03 17:48:13 UTC (rev 14336)
@@ -264,7 +264,7 @@
                     }
                 }
                 if (event.isImmediatePropagationStopped()) {
-                    break;
+                    return allResult;
                 }
             }
         }

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/UIEvent.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/UIEvent.java 2017-05-03 17:34:52 UTC (rev 14335)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/UIEvent.java 2017-05-03 17:48:13 UTC (rev 14336)
@@ -14,7 +14,6 @@
  */
 package com.gargoylesoftware.htmlunit.javascript.host.event;
 
-import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.EVENT_CANCEL_BUBBLE;
 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;
@@ -53,9 +52,6 @@
     /** Whether or not the "meta" key was pressed during the firing of the event. */
     private boolean metaKey_;
 
-    /** Chrome seems to maintain this */
-    private boolean cancelBubble_;
-
     /**
      * Creates a new UI event instance.
      */
@@ -109,9 +105,6 @@
     @Override
     @JsxGetter
     public boolean isCancelBubble() {
-        if (getBrowserVersion().hasFeature(EVENT_CANCEL_BUBBLE)) {
-            return cancelBubble_;
-        }
         return super.isCancelBubble();
     }
 
@@ -122,7 +115,6 @@
     @JsxSetter
     public void setCancelBubble(final boolean newValue) {
         super.setCancelBubble(newValue);
-        cancelBubble_ = newValue;
     }
 
     /**

Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event2Test.java
===================================================================
--- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event2Test.java 2017-05-03 17:34:52 UTC (rev 14335)
+++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event2Test.java 2017-05-03 17:48:13 UTC (rev 14336)
@@ -698,10 +698,8 @@
      * @throws Exception if the test fails
      */
     @Test
-    @Alerts(DEFAULT = {"window capturing", "div capturing", "span capturing", "div", "window capturing", "false",
-                "true"},
-            CHROME = {"window capturing", "div capturing", "span capturing", "div", "window capturing", "false",
-                "false"})
+    @Alerts({"window capturing", "div capturing", "span capturing", "div", "window capturing", "false",
+                "true"})
     public void stopPropagation() throws Exception {
         stopPropagation("stopPropagation()");
     }
@@ -809,10 +807,8 @@
      * @throws Exception if the test fails
      */
     @Test
-    @Alerts(DEFAULT = {"window capturing", "div capturing", "span capturing", "div", "window capturing", "false",
-                "true"},
-            CHROME = {"window capturing", "div capturing", "span capturing", "div", "window capturing", "false",
-                "false"})
+    @Alerts({"window capturing", "div capturing", "span capturing", "div", "window capturing", "false",
+                "true"})
     public void stopImmediatePropagation() throws Exception {
         stopPropagation("stopImmediatePropagation()");
     }


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