Skip to content

Commit 821a44f

Browse files
committed
WinForms - ChromiumWebBrowser remove workaround for address not always loading correctly when passed into CreateBrowser
Manually reverts commit 1ab4168
1 parent 02e3084 commit 821a44f

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

CefSharp.WinForms/ChromiumWebBrowser.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -623,12 +623,8 @@ private void CreateBrowser()
623623
{
624624
var windowInfo = new WindowInfo();
625625
windowInfo.SetAsChild(Handle);
626-
627-
//TODO: Revert temp workaround for default url not loading
628-
//NOTE: For chrome extensions we must pass in Url to CreateBrowser
629-
string address = Address.StartsWith("chrome-extension://") ? Address : null;
630626

631-
managedCefBrowserAdapter.CreateBrowser(windowInfo, BrowserSettings, (RequestContext)RequestContext, address);
627+
managedCefBrowserAdapter.CreateBrowser(windowInfo, BrowserSettings, (RequestContext)RequestContext, Address);
632628
}
633629
else
634630
{
@@ -648,13 +644,6 @@ void IWebBrowserInternal.OnAfterBrowserCreated(IBrowser browser)
648644
this.browser = browser;
649645
IsBrowserInitialized = true;
650646

651-
//TODO: Revert temp workaround for default url not loading
652-
//NOTE: For chrome extensions we are forced to pass in Url to CreateBrowser
653-
if (!string.IsNullOrEmpty(Address) && !Address.StartsWith("chrome-extension://"))
654-
{
655-
browser.MainFrame.LoadUrl(Address);
656-
}
657-
658647
// By the time this callback gets called, this control
659648
// is most likely hooked into a browser Form of some sort.
660649
// (Which is what ParentFormMessageInterceptor relies on.)

0 commit comments

Comments
 (0)