Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Issue 21843003: fix flashing bottom gray bar when navigating away from NTP w/ unpinned bookmark bar (Closed)

Created:
7 years, 4 months ago by kuan
Modified:
7 years, 3 months ago
CC:
chromium-reviews, tfarina
Visibility:
Public.

Description

fix flashing bottom gray bar when navigating away from NTP w/ unpinned bookmark bar cause: - when NTP has unpinned bmb, the web contents takes up the remaining height of the tab contents area. - when navigating away from NTP, unpinned bmb disappears, so the web contents take up the entire tab contents area, i.e. taller than when on NTP. - this resize of web contents view causes a flashing bottom gray bar after the NTP contents are cleared and before the new page contents are completely painted. fix is to prevent any resizing, and hence re-layout, of the new page contents: - add a method to WebContentsDelegate to allow size specification for newly-created render views. - WebContentsImpl calls this method when creating render views and updating their sizes. - this prevents render views from being created at a default size only to be resized immediately. - also added browser_tests for browser and content BUG=264207 TEST=verify per bug rpt Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=219794

Patch Set 1 #

Patch Set 2 : rm debug logging #

Patch Set 3 : rebased #

Patch Set 4 : reimpl as per scott's suggestion #

Patch Set 5 : impl mac & linux, add comment for new mtd #

Patch Set 6 : fix unittest build #

Patch Set 7 : rebased #

Patch Set 8 : add logging for mac tryjob #

Patch Set 9 : ready for review #

Patch Set 10 : disable test for mac #

Total comments: 1

Patch Set 11 : add comment for BrowserWindow #

Patch Set 12 : fix comment #

Total comments: 18

Patch Set 13 : addressed scott's comments #

Patch Set 14 : addressed scott's comments #

Total comments: 4

Patch Set 15 : addressed all comments #

Patch Set 16 : add more checks and tests #

Patch Set 17 : fix nits #

Patch Set 18 : re-impl GetSizeForNewRenderView and tests #

Total comments: 4

Patch Set 19 : fix linux resizing tests #

Total comments: 4

Patch Set 20 : addressed charlie's comments #

Patch Set 21 : fixed android build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+428 lines, -5 lines) Patch
M chrome/browser/ui/browser.h View 1 2 3 4 5 6 7 8 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +20 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +178 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_window.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +37 lines, -0 lines 0 comments Download
M chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/gtk/browser_window_gtk.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/gtk/browser_window_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/test/base/test_browser_window.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/base/test_browser_window.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +11 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_impl_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +123 lines, -0 lines 0 comments Download
M content/public/browser/web_contents_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +12 lines, -3 lines 0 comments Download
M content/public/browser/web_contents_delegate.cc View 1 2 3 4 5 6 7 8 15 16 17 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 39 (0 generated)
kuan
hi scott, ptal at this approach to fix the mentioned bug. for the record (in ...
7 years, 4 months ago (2013-08-03 00:25:55 UTC) #1
sky
> update the size of the WebContents view and the render view > host for ...
7 years, 4 months ago (2013-08-05 16:54:20 UTC) #2
kuan
On 2013/08/05 16:54:20, sky wrote: > > update the size of the WebContents view and ...
7 years, 4 months ago (2013-08-05 17:03:48 UTC) #3
sky
Can you resize the WebContentsView first then? Wouldn't that mean newly created ones get the ...
7 years, 4 months ago (2013-08-05 17:45:40 UTC) #4
kuan
On 2013/08/05 17:45:40, sky wrote: > Can you resize the WebContentsView first then? Wouldn't that ...
7 years, 4 months ago (2013-08-05 19:56:39 UTC) #5
sky
With your patch, do we create the renderer at one size only to resize it ...
7 years, 4 months ago (2013-08-05 23:49:11 UTC) #6
kuan
On 2013/08/05 23:49:11, sky wrote: > With your patch, do we create the renderer at ...
7 years, 4 months ago (2013-08-06 00:12:51 UTC) #7
sky
Because the size still effectively changes, how do you know there won't be a flash? ...
7 years, 4 months ago (2013-08-06 14:12:09 UTC) #8
sky
I suspect this would be cleaner, more straightforward and cross platform if WebContentsDelegate could specify ...
7 years, 4 months ago (2013-08-06 15:00:45 UTC) #9
kuan
hi john, i've re-implemented this as per scott's suggestion. this is views only, but before ...
7 years, 4 months ago (2013-08-07 19:46:33 UTC) #10
jam
On 2013/08/07 19:46:33, kuan wrote: > hi john, > > i've re-implemented this as per ...
7 years, 4 months ago (2013-08-07 19:51:26 UTC) #11
kuan
On 2013/08/07 19:51:26, jam wrote: > On 2013/08/07 19:46:33, kuan wrote: > > hi john, ...
7 years, 4 months ago (2013-08-07 20:00:57 UTC) #12
kuan
On 2013/08/07 20:00:57, kuan wrote: > On 2013/08/07 19:51:26, jam wrote: > > On 2013/08/07 ...
7 years, 4 months ago (2013-08-08 00:00:34 UTC) #13
Peter Kasting
Incidentally, from what I understand of this change, I agree that adding to the content ...
7 years, 4 months ago (2013-08-08 19:01:43 UTC) #14
jam
i see, ok, thanks for the explanation. lgtm. please add a comment to all new ...
7 years, 4 months ago (2013-08-09 03:44:58 UTC) #15
kuan
hi scott, jam@ has approved the addition of the new method to WebContentsDelegate. i've gotten ...
7 years, 4 months ago (2013-08-19 23:09:11 UTC) #16
sky
https://codereview.chromium.org/21843003/diff/129001/chrome/browser/ui/browser_browsertest.cc File chrome/browser/ui/browser_browsertest.cc (right): https://codereview.chromium.org/21843003/diff/129001/chrome/browser/ui/browser_browsertest.cc#newcode284 chrome/browser/ui/browser_browsertest.cc:284: gfx::Size created_size; Isn't this the size of the renderwidgethost ...
7 years, 4 months ago (2013-08-20 14:55:21 UTC) #17
kuan
i've addressed all comments in patch set 13. ptal. thx. https://codereview.chromium.org/21843003/diff/129001/chrome/browser/ui/browser_browsertest.cc File chrome/browser/ui/browser_browsertest.cc (right): https://codereview.chromium.org/21843003/diff/129001/chrome/browser/ui/browser_browsertest.cc#newcode284 ...
7 years, 4 months ago (2013-08-21 15:17:10 UTC) #18
sky
https://codereview.chromium.org/21843003/diff/129001/chrome/browser/ui/browser_window.h File chrome/browser/ui/browser_window.h (right): https://codereview.chromium.org/21843003/diff/129001/chrome/browser/ui/browser_window.h#newcode369 chrome/browser/ui/browser_window.h:369: virtual int GetExtraRenderViewHeightWithoutDetachedBookmarkBar() = 0; On 2013/08/21 15:17:11, kuan ...
7 years, 4 months ago (2013-08-21 20:45:34 UTC) #19
kuan
i've addressed all comments in patch set 14. ptal. thx. https://codereview.chromium.org/21843003/diff/129001/chrome/browser/ui/browser_window.h File chrome/browser/ui/browser_window.h (right): https://codereview.chromium.org/21843003/diff/129001/chrome/browser/ui/browser_window.h#newcode369 ...
7 years, 4 months ago (2013-08-21 22:54:52 UTC) #20
sky
https://codereview.chromium.org/21843003/diff/155001/content/browser/web_contents/web_contents_impl.h File content/browser/web_contents/web_contents_impl.h (right): https://codereview.chromium.org/21843003/diff/155001/content/browser/web_contents/web_contents_impl.h#newcode962 content/browser/web_contents/web_contents_impl.h:962: gfx::Size wcv_size_when_creating_rwhv_; I'm not sure there is enough. I ...
7 years, 4 months ago (2013-08-21 23:31:38 UTC) #21
kuan
hi charlie, could u pls help review the changes in web_contents_impl.h/cc, especially with respect to ...
7 years, 4 months ago (2013-08-21 23:35:56 UTC) #22
Charlie Reis
https://codereview.chromium.org/21843003/diff/155001/content/browser/web_contents/web_contents_impl.h File content/browser/web_contents/web_contents_impl.h (right): https://codereview.chromium.org/21843003/diff/155001/content/browser/web_contents/web_contents_impl.h#newcode962 content/browser/web_contents/web_contents_impl.h:962: gfx::Size wcv_size_when_creating_rwhv_; On 2013/08/21 23:31:38, sky wrote: > I'm ...
7 years, 4 months ago (2013-08-21 23:57:30 UTC) #23
kuan
https://codereview.chromium.org/21843003/diff/155001/content/browser/web_contents/web_contents_impl.h File content/browser/web_contents/web_contents_impl.h (right): https://codereview.chromium.org/21843003/diff/155001/content/browser/web_contents/web_contents_impl.h#newcode962 content/browser/web_contents/web_contents_impl.h:962: gfx::Size wcv_size_when_creating_rwhv_; On 2013/08/21 23:57:30, creis wrote: > On ...
7 years, 4 months ago (2013-08-22 00:08:03 UTC) #24
Charlie Reis
Ken, perhaps you have a better sense of what should be done instead? https://codereview.chromium.org/21843003/diff/155001/content/browser/web_contents/web_contents_impl.h File ...
7 years, 4 months ago (2013-08-22 00:25:20 UTC) #25
kuan
+jochen@, owner of content/browser/web_contents, who may have pointers for changes in web_contents_impl.h/cc. thx!
7 years, 4 months ago (2013-08-22 13:57:08 UTC) #26
kenrb
On 2013/08/22 00:25:20, creis wrote: > > should i store WebContentsView's size in RenderWidgetHostView and ...
7 years, 4 months ago (2013-08-22 18:04:43 UTC) #27
kuan
On 2013/08/22 18:04:43, kenrb wrote: > On 2013/08/22 00:25:20, creis wrote: > > > should ...
7 years, 4 months ago (2013-08-23 16:05:08 UTC) #28
sky
LGTM
7 years, 4 months ago (2013-08-23 16:57:48 UTC) #29
Charlie Reis
content/ LGTM with nits. https://codereview.chromium.org/21843003/diff/185001/content/browser/web_contents/web_contents_impl_browsertest.cc File content/browser/web_contents/web_contents_impl_browsertest.cc (right): https://codereview.chromium.org/21843003/diff/185001/content/browser/web_contents/web_contents_impl_browsertest.cc#newcode96 content/browser/web_contents/web_contents_impl_browsertest.cc:96: //return !resizing_wcv_ ? rvh_size_ : ...
7 years, 4 months ago (2013-08-23 19:12:34 UTC) #30
kuan
charlie, i've addressed ur comments in patch set 18, and make WebContentsImplBrowserTest resizing work on ...
7 years, 3 months ago (2013-08-26 19:00:46 UTC) #31
Elliot Glaysher
gtk lgtm
7 years, 3 months ago (2013-08-26 19:17:50 UTC) #32
Charlie Reis
content/ still LGTM. Also, I'm a content owner, so that's sufficient for content/browser/web_contents. https://codereview.chromium.org/21843003/diff/198001/content/browser/web_contents/web_contents_impl_browsertest.cc File ...
7 years, 3 months ago (2013-08-26 19:20:34 UTC) #33
sky
SLGTM
7 years, 3 months ago (2013-08-26 21:05:56 UTC) #34
sail
cocoa/* LGTM Will implement the cocoa portion once this lands.
7 years, 3 months ago (2013-08-26 21:39:41 UTC) #35
kuan
charlie, i've addressed the nits in patch set 19. since u've lgtm'ed (twice in fact ...
7 years, 3 months ago (2013-08-26 22:50:46 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/21843003/219001
7 years, 3 months ago (2013-08-26 22:56:36 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/21843003/246001
7 years, 3 months ago (2013-08-27 11:13:16 UTC) #38
commit-bot: I haz the power
7 years, 3 months ago (2013-08-27 15:29:27 UTC) #39
Message was sent while issue was closed.
Change committed as 219794

Powered by Google App Engine
This is Rietveld 408576698