sproutcore/sproutcore — pull request #1059 by nicolasbadia (2013-08-21 12:36:25+00:00)
Title: Fixes issues with viewDidResize and a bunch of unit tests

I was having a big performance issue when adjusting the layout of a big collection view with a lot of children. I found out that it was because `viewDidResize` were call on every children while their size hasn't changed. This was because the method `_checkForResize` wasn't doing it's job well enough.

Indeed, there was some nasty code (marked as TODO) that wasn't correctly computing the size of the views. So I removed all that code to use `computeFrameWithParentFrame` which is the method to compute de frame. With that, I was able to correctly know if the size of an element (or its position) has changed (and don't call `viewDidResize` uselessly). In the case where it has changed, it lead to call `viewDidResize` and so recompute the frame. So I've overrode the `frame` property to use the result of `computeFrameWithParentFrame` that was computed earlier (calling this method twice is expensive).

With that, the time to execute the adjust method one my big collection view as drop from 1.1s to 80ms ! I was also able to correct some wrong unit tests in the viewDidResize test suite.

This PR also fixes 3 tests suite that was failing in Travis.