[HtmlUnit] SVN: [15546] trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/ javascript/host/css/ComputedCSSStyleDeclaration.java
rbri--- via HtmlUnit-develop <[email protected]> Tue, 28 Aug 2018 17:32:28 +0000
| Newsgroups | gmane.comp.java.htmlunit.devel |
|---|---|
| Message-ID | <[email protected]> |
Revision: 15546
http://sourceforge.net/p/htmlunit/code/15546
Author: rbri
Date: 2018-08-28 17:32:26 +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-27 18:41:21 UTC (rev 15545)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclaration.java 2018-08-28 17:32:26 UTC (rev 15546)
@@ -1506,7 +1506,7 @@
// We need to calculate the horizontal displacement caused by *previous* siblings.
left = 0;
DomNode prev = getElement().getDomNodeOrDie().getPreviousSibling();
- while (prev != null) {
+ while (prev != null && !(prev instanceof HtmlTableRow)) {
final Scriptable prevScriptable = prev.getScriptableObject();
if (prevScriptable instanceof HTMLElement) {
final HTMLElement e = (HTMLElement) prevScriptable;
@@ -1525,9 +1525,6 @@
left += content.trim().length() * getBrowserVersion().getPixesPerChar();
}
}
- if (prev instanceof HtmlTableRow) {
- break;
- }
prev = prev.getPreviousSibling();
}
}
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot