[HtmlUnit] SVN: [15555] trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/ javascript/host/css/ComputedCSSStyleDeclaration.java

rbri--- via HtmlUnit-develop <[email protected]> Tue, 28 Aug 2018 17:44:33 +0000
Newsgroups gmane.comp.java.htmlunit.devel
Message-ID <[email protected]>
Revision: 15555
          http://sourceforge.net/p/htmlunit/code/15555
Author:   rbri
Date:     2018-08-28 17:44:31 +0000 (Tue, 28 Aug 2018)
Log Message:
-----------
fix test

Modified Paths:
--------------
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclaration.java

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclaration.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclaration.java	2018-08-28 17:43:17 UTC (rev 15554)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclaration.java	2018-08-28 17:44:31 UTC (rev 15555)
@@ -1506,7 +1506,11 @@
             // We need to calculate the horizontal displacement caused by *previous* siblings.
             left = 0;
             DomNode prev = getElement().getDomNodeOrDie().getPreviousSibling();
-            while (prev != null && !(prev instanceof HtmlTableRow)) {
+            while (prev != null) {
+                if (prev instanceof HtmlTableRow) {
+                    break;
+                }
+
                 final Scriptable prevScriptable = prev.getScriptableObject();
                 if (prevScriptable instanceof HTMLElement) {
                     final HTMLElement e = (HTMLElement) prevScriptable;


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot