I added one additional format "EEE MMM dd yyyy HH mm ss 'GMT'Z" in the begining of all the 3 date patterns in com.gargoylesoftware.htmlunit.httpclient.HtmlUnitExpiresHandler, which seems fixed the problem.
Cookie expiration data parsing wrong
I created #1997
Element height calculation ignores children if the height of the element itself is 0
I agree. this looks more like a single element size calculation problem. I will try to make an independent test case and open a new issue.
Thanks. I pulled the code and it resolved the issue partially. There is still problem if the div contains children. For example, if the div above changed from <div id="div1" style="height: 18px"> aaa<br/> </div> to <div id="div1" style="height: 18px"> <iframe height="360" src="http://...."></iframe> </div> This part of code in ComputedCSSStyleDeclaration.getCalculatedHeight() won't calculate the size of children if the height of the div itself(EmptyHeight) is 0: int height = getEmptyHeight(); //...
It seems the next part of the code also needs to be commented out if there is child node involved: private int getCalculatedHeight() { // if (height_ != null) { // return height_.intValue(); // } int height = getEmptyHeight(); // if (height == 0) { // height_ = Integer.valueOf(0); // return 0; // } if (super.getHeight().isEmpty()) { final int contentHeight = getContentHeight(); if (contentHeight > 0) { height = contentHeight; } } height_ = Integer.valueOf(height); return height; }
The problem is in ComputedCSSStyleDeclaration.getCalculatedHeight() which uses the cached height property and it seems there is no way to reset it if the content of the element is changed. I commented the part to use the cache and it fixed the issue. I guess there should be better fix but I don't have enough understanding of this class so I leave it for you. :) private int getCalculatedHeight() { // if (height_ != null) { // return height_.intValue(); // } int height = getEmptyHeight(); if (height...