DescriptionFix DCHECK in infobar animation.
Solved in http://codereview.chromium.org/6788014/
Reason was traced down to OnBoundsChanged not getting called when the animation
fired even when the infobar's preferred size should have changed. Thus Paint
could get a different animation value from that of the previous animation value
without the height being adjusted by Layout. I think this may be in the case
where one infobar is opening when another is closing and the overall size of the
infobar container is not changing, hence squelches layout propagation to its
children.
In addition, when extensions load, they call set_target_height, which doesn't
cause Layout.
As a hopefully less fragile alternative to plugging all of the places where
Layout should be invalidated, I cache the height of the tab/bar along with the
paths, so that whenever Paint occurs, it always goes against the last SetBounds
values and doesn't have to recalculate based on animation, which may have
progressed without causing a Layout and subsequent SetBounds.
BUG=75451, 75450, 60990
TEST=browser_tests --gtest_filter=ExtensionApiTest.Infobars --gtest_repeat=100
Patch Set 1 #Patch Set 2 : Alternative fix by caching tab/bar heights with the paths. #Patch Set 3 : Added InvalidateLayout calls to animation and target_height changes. #
Messages
Total messages: 7 (0 generated)
|