Description[Contextual Search] Fixes ContentView regressions.
This CL fixes important regressions in the way ContentViews
are rendered in Contextual Search.
All loaded searches were being made visible, even when the
user didn't interact with the Panel. Now there's no way to
control the visibility of the Content from outside its class.
Instead, consumers should call acknowledgeIntentToShowContent()
to signal that there's an intent to show the Content, but only
the Content will actually control its visibility, which makes
the code more robust.
Also, the OverlayPanelContent class wasn't properly clearing
its internal states, which was causing other bugs. These bugs
happened, in part, because we are exposing methods to create
and destroy the ContentView. Also, tests were not creating
ContentViews, which the made the code confusing.
So, instead of making such method public, so they can be
overriden by tests (in order to keep track of whether
ContentViews have been created), now those methods are
private, and a new method didCreateContentView() has
been exposed so that the tests can assert the ContentView's
existence.
BUG=542785
BUG=542786
BUG=542790
Committed: https://crrev.com/9893e6aff9f1811ca5e0e3b3ab4f9fac19afec92
Cr-Commit-Position: refs/heads/master@{#354161}
Patch Set 1 #
Total comments: 22
Patch Set 2 : fix #Patch Set 3 : Addressing comments #Patch Set 4 : Add TODO as per offline chat with mdjones@ #
Total comments: 4
Patch Set 5 : Addressing Aurimas' comments #Patch Set 6 : fix #Messages
Total messages: 19 (6 generated)
|