Mac: Flash of wrong-size content when tab-switching |
|||
Issue descriptionVersion: M54 (but it has been bothering me for a long time) OS: Mac What steps will reproduce the problem? (1) Open a window, open 2 tabs (2) Resize the window to be very small (3) Switch between all tabs (4) Resize the window to be big again (5) Switch tabs What is the expected output? You should not see any content at the small size -- the first frame you get should be the correct size. What do you see instead? You see a flash of content at the small size, then a switch to the right size. Bisected to You are probably looking for a change made after 378590 (known good), but no later than 378606 (first known bad). CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/3b7b8b27fd11096c0eaff14c44656481b669be5e..1a51c4b0e1961cf9947f7b93db5cc713af152de6 https://chromium.googlesource.com/chromium/src/+/65ff2ea7a5599fa69fed2f2bbae68470af0baf97 This came up as I as trying to clean up the RWHVMac to not send incorrect DPI and ColorSpace information for the first frame.
,
Jul 13 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/dfe8ae7e645a40ef10acfec1c4b2fdabb46a0735 commit dfe8ae7e645a40ef10acfec1c4b2fdabb46a0735 Author: tapted <tapted@chromium.org> Date: Wed Jul 13 03:45:37 2016 Mac: Do layout before adding the WebContents to the view hierarchy when switching tabs Currently you can sometimes see a flash of webcontent at the size it was when a tab was last active, before it updates to fill the window. This regressed in r378605, which tied a call to WebContents::WasShown to the insertion into the view hierarchy, which happens before setting the WebContents size. There's currently some tricky code to suppress auto-resizing when switching to/from a tab which might have an infobar showing. Make this simpler and fix the regression by establishing a correct size for the WebContents *before* it gets added to the view hierarchy, rather than after. Do this by having TabStripController delegate resposibility for setting view sizes and updating the view heirarchy to TabContentsController. This is probably nicer anyway, since TabContentsController already has most of the logic to pick a target WebContents size - it just needs to know what the size of its superview _will_ be rather than what it currently is. BUG= 627255 TEST=On Mac, create 2 tabs, make the window small, switch tabs and make the window big. Switch back to the first tab. There should be no flash the old, small web contents before it fills the window. Review-Url: https://codereview.chromium.org/2138213003 Cr-Commit-Position: refs/heads/master@{#404977} [modify] https://crrev.com/dfe8ae7e645a40ef10acfec1c4b2fdabb46a0735/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h [modify] https://crrev.com/dfe8ae7e645a40ef10acfec1c4b2fdabb46a0735/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm [modify] https://crrev.com/dfe8ae7e645a40ef10acfec1c4b2fdabb46a0735/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
,
Jul 13 2016
,
Jul 13 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/dfe8ae7e645a40ef10acfec1c4b2fdabb46a0735 commit dfe8ae7e645a40ef10acfec1c4b2fdabb46a0735 Author: tapted <tapted@chromium.org> Date: Wed Jul 13 03:45:37 2016 Mac: Do layout before adding the WebContents to the view hierarchy when switching tabs Currently you can sometimes see a flash of webcontent at the size it was when a tab was last active, before it updates to fill the window. This regressed in r378605, which tied a call to WebContents::WasShown to the insertion into the view hierarchy, which happens before setting the WebContents size. There's currently some tricky code to suppress auto-resizing when switching to/from a tab which might have an infobar showing. Make this simpler and fix the regression by establishing a correct size for the WebContents *before* it gets added to the view hierarchy, rather than after. Do this by having TabStripController delegate resposibility for setting view sizes and updating the view heirarchy to TabContentsController. This is probably nicer anyway, since TabContentsController already has most of the logic to pick a target WebContents size - it just needs to know what the size of its superview _will_ be rather than what it currently is. BUG= 627255 TEST=On Mac, create 2 tabs, make the window small, switch tabs and make the window big. Switch back to the first tab. There should be no flash the old, small web contents before it fills the window. Review-Url: https://codereview.chromium.org/2138213003 Cr-Commit-Position: refs/heads/master@{#404977} [modify] https://crrev.com/dfe8ae7e645a40ef10acfec1c4b2fdabb46a0735/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h [modify] https://crrev.com/dfe8ae7e645a40ef10acfec1c4b2fdabb46a0735/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm [modify] https://crrev.com/dfe8ae7e645a40ef10acfec1c4b2fdabb46a0735/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
|||
►
Sign in to add a comment |
|||
Comment 1 by tapted@chromium.org
, Jul 12 2016