New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: BrowserViews not painting their WebContents #29919
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm skeptical that DidFinishNavigation
is the right place to hook into to call Layout()
from. What lead you to that conclusion?
Should we be calling this instead when the view is added to the hierarchy?
@nornagon i was seeking something I could guarantee would be after the |
#29607 also looks similar. Can you check if the |
@zcbenz looks like the bounds are correct in both cases, unfortunately. |
It seems that changing the size of Calling BrowserWindow has this code so it is probably why it does not suffer from this problem: electron/shell/browser/api/electron_api_browser_window.cc Lines 156 to 165 in 385d0f5
Also note that the above code came from #6026, and since the implementation of |
11acf3b
to
115bb70
Compare
Using |
f5ff36b
to
fcd7578
Compare
6c9eb19
to
c037aa6
Compare
c037aa6
to
9a102de
Compare
Release Notes Persisted
|
I have automatically backported this PR to "14-x-y", please check out #30335 |
I have automatically backported this PR to "15-x-y", please check out #30336 |
/trop run backport-to 13-x-y |
The backport process for this PR has been manually initiated - sending your PR to |
I have automatically backported this PR to "13-x-y", please check out #31047 |
I tried it better this way |
Description of Change
Closes #29859.
Fixes an issue where
BrowserView
s would appear not to load theirwebContents
. Further investigation showed that it was in fact not that thewebContents
weren't being loaded, but that they weren't being painted properly. If I tried to opendevTools
on the webContents or calledsetBounds
after the initial URL load it would work - this tracked back toLayout
ininspectable_web_contents_view_views.h
and to a hierarchy change in https://chromium-review.googlesource.com/c/chromium/src/+/2780032. Essentially, the change meant thatLayout
was no longer called by Chromium in some of the places it was before.To fix this, I added an override for
RenderViewReady
and called intoLayout()
so that paints would happen properly again when they were supposed to.To verify:
Checklist
npm test
passesRelease Notes
Notes: Fixed an issue where
BrowserView
webContents would appear not to load in some circumstances.