]> source.dussan.org Git - vaadin-framework.git/commit
Fix for 'Aborting layout after 100 passess' (#13359)
authorTomi Virtanen <tltv@vaadin.com>
Fri, 16 May 2014 08:25:01 +0000 (11:25 +0300)
committerSauli Tähkäpää <sauli@vaadin.com>
Thu, 5 Jun 2014 12:48:13 +0000 (15:48 +0300)
commit9e494f526cad2e6302cddd31200800450d3c857e
tree69f4c8b13097f6a5ce9d354dca60134f47174154
parent94a051b54283230758280f9b7a609e27763bac93
Fix for 'Aborting layout after 100 passess' (#13359)

'Aborting layout after 100 passes.' is caused by LayoutManager falling
into a loop on rounding fractional layout slot sizes up and down while
trying to fit layout's content in the space available. LayoutManager
round always up, that causes this issue with IE9+ and Chrome. This
change helps LayoutManager to round fractional sizes down for browsers
that causes problems if rounded up.

Browsers may fall into the loop especially with a zoom level other than
100%. Not with any zoom level though. Problematic zoom level varies by
browser. OrderedLayoutExpandTest uses zoom levels other than 100%. Test
for Chrome is the only one that really is able to reproduce error
without the fix. IE9/10 would too, but the zoom level could not be set
exactly to the required 95% for IE. Test works best as a regression test
for other browsers.

Change-Id: Ie840b074df5fed5ea3b15fba9a6fd372a5c0b76a
client/src/com/vaadin/client/LayoutManager.java
client/src/com/vaadin/client/MeasuredSize.java
client/src/com/vaadin/client/Util.java
client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java
uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutExpand.java [new file with mode: 0644]
uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutExpandTest.java [new file with mode: 0644]