We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Hide webview black background when resizing
### Describe the bug

By default in Windows, a webview will render a black background behind it. When resizing the webview, this black background becomes visible for a couple of frames while the html rendered on top is still in the process of updating, resulting in black "bars" appearing at the side of the webview when resizing it.

This can look quite ugly

### Steps to reproduce

see: https://youtu.be/Xj1rW4L-Pqk

```py
"""
My first application
"""
import toga
from toga.style import Pack
from toga.style.pack import COLUMN, ROW


class HelloWorld(toga.App):

    def startup(self):
        """
        Construct and show the Toga application.

        Usually, you would add your application to a main content box.
        We then create a main window (with a name matching the app), and
        show the main window.
        """
        web = toga.WebView(url='https://google.com')
        self.main_window = toga.MainWindow(title=self.formal_name)
        self.main_window.content = web
        self.main_window.show()




def main():
    helloWorld = HelloWorld("foobar",
                            "org.foo.bar")
    return helloWorld


main().main_loop()
```

### Environment

- Operating System:
- Windows 11, winforms
- Python version:
- 3.10
- Software versions:
  - Briefcase:
  - 0.3.12
  - Toga:
  - 0.3.0



--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `winforms/src/toga_winforms/widgets/webview.py`
Content:
```
1 import traceback
2 import webbrowser
3 from asyncio import get_event_loop
4 
5 from travertino.size import at_least
6 
7 import toga
8 from toga_winforms.keys import toga_key
9 from toga_winforms.libs import (
10     Action,
11     CoreWebView2CreationProperties,
12     String,
13     Task,
14     TaskScheduler,
15     Uri,
16     WebView2,
17     WebView2RuntimeNotFoundException,
18     WinForms,
19 )
20 
21 from .base import Widget
22 
23 
24 class TogaWebBrowser(WebView2):
25     def __init__(self, interface):
26         super().__init__()
27         self.interface = interface
28         self._edge_runtime_available = None  # Set to an unknown state initially
29 
30 
31 class WebView(Widget):
32     def create(self):
33         self.native = TogaWebBrowser(self.interface)
34         self.native.CoreWebView2InitializationCompleted += (
35             self.winforms_initialization_completed
36         )
37         self.native.NavigationCompleted += self.winforms_navigation_completed
38         self.native.KeyDown += self.winforms_key_down
39 
40         props = CoreWebView2CreationProperties()
41         props.UserDataFolder = str(toga.App.app.paths.cache / "WebView2")
42         self.native.CreationProperties = props
43 
44         # Trigger the configuration of the webview
45         self.native.EnsureCoreWebView2Async(None)
46 
47     def winforms_initialization_completed(self, sender, args):
48         # The WebView2 widget has an "internal" widget (CoreWebView2) that is
49         # the actual web view. The view isn't ready until the internal widget has
50         # completed initialization, and that isn't done until an explicit
51         # request is made (EnsureCoreWebView2Async).
52         if args.IsSuccess:
53             # We've initialized, so we must have the runtime
54             self.native._edge_runtime_available = True
55             try:
56                 settings = self.native.CoreWebView2.Settings
57 
58                 debug = True
59                 settings.AreDefaultContextMenusEnabled = debug
60                 settings.AreDefaultScriptDialogsEnabled = True
61                 settings.AreDevToolsEnabled = debug
62                 settings.IsBuiltInErrorPageEnabled = True
63                 settings.IsScriptEnabled = True
64                 settings.IsWebMessageEnabled = True
65                 settings.IsStatusBarEnabled = debug
66                 settings.IsZoomControlEnabled = True
67 
68                 self.set_user_agent(self.interface.user_agent)
69 
70                 if self.interface._html_content:
71                     self.set_content(self.interface.url, self.interface._html_content)
72                 else:
73                     self.set_url(self.interface.url)
74 
75             except Exception:
76                 traceback.print_exc()
77         else:
78             if isinstance(
79                 args.InitializationException, WebView2RuntimeNotFoundException
80             ):
81                 print("Could not find the Microsoft Edge WebView2 Runtime.")
82                 if self.native._edge_runtime_available is None:
83                     # The initialize message is sent twice on failure.
84                     # We only want to show the dialog once, so track that we
85                     # know the runtime is missing.
86                     self.native._edge_runtime_available = False
87                     WinForms.MessageBox.Show(
88                         "The Microsoft Edge WebView2 Runtime is not installed. "
89                         "Web content will not be displayed.\n\n"
90                         "Click OK to download the WebView2 Evergreen Runtime "
91                         "Bootstrapper from Microsoft.",
92                         "Missing Edge Webview2 runtime",
93                         WinForms.MessageBoxButtons.OK,
94                         WinForms.MessageBoxIcon.Error,
95                     )
96                     webbrowser.open(
97                         "https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section"
98                     )
99             else:
100                 print(args.InitializationException)
101 
102     def winforms_navigation_completed(self, sender, args):
103         if self.interface.on_webview_load:
104             self.interface.on_webview_load(self.interface)
105 
106     def winforms_key_down(self, sender, args):
107         if self.interface.on_key_down:
108             self.interface.on_key_down(self.interface, **toga_key(args))
109 
110     def set_on_key_down(self, handler):
111         pass
112 
113     def set_on_webview_load(self, handler):
114         pass
115 
116     def get_url(self):
117         return str(self.native.Source)
118 
119     def set_url(self, value):
120         if value:
121             self.native.Source = Uri(value)
122 
123     def set_content(self, root_url, content):
124         if content and self.native.CoreWebView2:
125             self.native.CoreWebView2.NavigateToString(content)
126 
127     def get_dom(self):
128         self.interface.factory.not_implemented("WebView.get_dom()")
129 
130     def set_user_agent(self, value):
131         user_agent = (
132             value
133             if value
134             else (
135                 "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
136                 "(KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.46"
137             )
138         )
139         if self.native.CoreWebView2:
140             self.native.CoreWebView2.Settings.UserAgent = user_agent
141 
142     async def evaluate_javascript(self, javascript):
143         loop = get_event_loop()
144         future = loop.create_future()
145 
146         task_scheduler = TaskScheduler.FromCurrentSynchronizationContext()
147         try:
148 
149             def callback(task):
150                 future.set_result(task.Result)
151 
152             self.native.ExecuteScriptAsync(javascript).ContinueWith(
153                 Action[Task[String]](callback), task_scheduler
154             )
155         except Exception:
156             traceback.print_exc()
157             future.set_result(None)
158 
159         return await future
160 
161     def invoke_javascript(self, javascript):
162         # The script will execute async, but you weren't going to get the result
163         # anyway, so it doesn't really matter.
164         self.native.ExecuteScriptAsync(javascript)
165 
166     def rehint(self):
167         self.interface.intrinsic.width = at_least(self.interface.MIN_WIDTH)
168         self.interface.intrinsic.height = at_least(self.interface.MIN_HEIGHT)
169
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/winforms/src/toga_winforms/widgets/webview.py b/winforms/src/toga_winforms/widgets/webview.py
--- a/winforms/src/toga_winforms/widgets/webview.py
+++ b/winforms/src/toga_winforms/widgets/webview.py
@@ -8,6 +8,7 @@
 from toga_winforms.keys import toga_key
 from toga_winforms.libs import (
     Action,
+    Color,
     CoreWebView2CreationProperties,
     String,
     Task,
@@ -43,6 +44,7 @@
 
         # Trigger the configuration of the webview
         self.native.EnsureCoreWebView2Async(None)
+        self.native.DefaultBackgroundColor = Color.Transparent
 
     def winforms_initialization_completed(self, sender, args):
         # The WebView2 widget has an "internal" widget (CoreWebView2) that is

{"golden_diff": "diff --git a/winforms/src/toga_winforms/widgets/webview.py b/winforms/src/toga_winforms/widgets/webview.py\n--- a/winforms/src/toga_winforms/widgets/webview.py\n+++ b/winforms/src/toga_winforms/widgets/webview.py\n@@ -8,6 +8,7 @@\n from toga_winforms.keys import toga_key\n from toga_winforms.libs import (\n     Action,\n+    Color,\n     CoreWebView2CreationProperties,\n     String,\n     Task,\n@@ -43,6 +44,7 @@\n \n         # Trigger the configuration of the webview\n         self.native.EnsureCoreWebView2Async(None)\n+        self.native.DefaultBackgroundColor = Color.Transparent\n \n     def winforms_initialization_completed(self, sender, args):\n         # The WebView2 widget has an \"internal\" widget (CoreWebView2) that is\n", "issue": "Hide webview black background when resizing\n### Describe the bug\r\n\r\nBy default in Windows, a webview will render a black background behind it. When resizing the webview, this black background becomes visible for a couple of frames while the html rendered on top is still in the process of updating, resulting in black \"bars\" appearing at the side of the webview when resizing it.\r\n\r\nThis can look quite ugly\r\n\r\n### Steps to reproduce\r\n\r\nsee: https://youtu.be/Xj1rW4L-Pqk\r\n\r\n```py\r\n\"\"\"\r\nMy first application\r\n\"\"\"\r\nimport toga\r\nfrom toga.style import Pack\r\nfrom toga.style.pack import COLUMN, ROW\r\n\r\n\r\nclass HelloWorld(toga.App):\r\n\r\n    def startup(self):\r\n        \"\"\"\r\n        Construct and show the Toga application.\r\n\r\n        Usually, you would add your application to a main content box.\r\n        We then create a main window (with a name matching the app), and\r\n        show the main window.\r\n        \"\"\"\r\n        web = toga.WebView(url='https://google.com')\r\n        self.main_window = toga.MainWindow(title=self.formal_name)\r\n        self.main_window.content = web\r\n        self.main_window.show()\r\n\r\n\r\n\r\n\r\ndef main():\r\n    helloWorld = HelloWorld(\"foobar\",\r\n                            \"org.foo.bar\")\r\n    return helloWorld\r\n\r\n\r\nmain().main_loop()\r\n```\r\n\r\n### Environment\r\n\r\n- Operating System:\r\n- Windows 11, winforms\r\n- Python version:\r\n- 3.10\r\n- Software versions:\r\n  - Briefcase:\r\n  - 0.3.12\r\n  - Toga:\r\n  - 0.3.0\r\n\r\n\n", "before_files": [{"content": "import traceback\nimport webbrowser\nfrom asyncio import get_event_loop\n\nfrom travertino.size import at_least\n\nimport toga\nfrom toga_winforms.keys import toga_key\nfrom toga_winforms.libs import (\n    Action,\n    CoreWebView2CreationProperties,\n    String,\n    Task,\n    TaskScheduler,\n    Uri,\n    WebView2,\n    WebView2RuntimeNotFoundException,\n    WinForms,\n)\n\nfrom .base import Widget\n\n\nclass TogaWebBrowser(WebView2):\n    def __init__(self, interface):\n        super().__init__()\n        self.interface = interface\n        self._edge_runtime_available = None  # Set to an unknown state initially\n\n\nclass WebView(Widget):\n    def create(self):\n        self.native = TogaWebBrowser(self.interface)\n        self.native.CoreWebView2InitializationCompleted += (\n            self.winforms_initialization_completed\n        )\n        self.native.NavigationCompleted += self.winforms_navigation_completed\n        self.native.KeyDown += self.winforms_key_down\n\n        props = CoreWebView2CreationProperties()\n        props.UserDataFolder = str(toga.App.app.paths.cache / \"WebView2\")\n        self.native.CreationProperties = props\n\n        # Trigger the configuration of the webview\n        self.native.EnsureCoreWebView2Async(None)\n\n    def winforms_initialization_completed(self, sender, args):\n        # The WebView2 widget has an \"internal\" widget (CoreWebView2) that is\n        # the actual web view. The view isn't ready until the internal widget has\n        # completed initialization, and that isn't done until an explicit\n        # request is made (EnsureCoreWebView2Async).\n        if args.IsSuccess:\n            # We've initialized, so we must have the runtime\n            self.native._edge_runtime_available = True\n            try:\n                settings = self.native.CoreWebView2.Settings\n\n                debug = True\n                settings.AreDefaultContextMenusEnabled = debug\n                settings.AreDefaultScriptDialogsEnabled = True\n                settings.AreDevToolsEnabled = debug\n                settings.IsBuiltInErrorPageEnabled = True\n                settings.IsScriptEnabled = True\n                settings.IsWebMessageEnabled = True\n                settings.IsStatusBarEnabled = debug\n                settings.IsZoomControlEnabled = True\n\n                self.set_user_agent(self.interface.user_agent)\n\n                if self.interface._html_content:\n                    self.set_content(self.interface.url, self.interface._html_content)\n                else:\n                    self.set_url(self.interface.url)\n\n            except Exception:\n                traceback.print_exc()\n        else:\n            if isinstance(\n                args.InitializationException, WebView2RuntimeNotFoundException\n            ):\n                print(\"Could not find the Microsoft Edge WebView2 Runtime.\")\n                if self.native._edge_runtime_available is None:\n                    # The initialize message is sent twice on failure.\n                    # We only want to show the dialog once, so track that we\n                    # know the runtime is missing.\n                    self.native._edge_runtime_available = False\n                    WinForms.MessageBox.Show(\n                        \"The Microsoft Edge WebView2 Runtime is not installed. \"\n                        \"Web content will not be displayed.\\n\\n\"\n                        \"Click OK to download the WebView2 Evergreen Runtime \"\n                        \"Bootstrapper from Microsoft.\",\n                        \"Missing Edge Webview2 runtime\",\n                        WinForms.MessageBoxButtons.OK,\n                        WinForms.MessageBoxIcon.Error,\n                    )\n                    webbrowser.open(\n                        \"https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section\"\n                    )\n            else:\n                print(args.InitializationException)\n\n    def winforms_navigation_completed(self, sender, args):\n        if self.interface.on_webview_load:\n            self.interface.on_webview_load(self.interface)\n\n    def winforms_key_down(self, sender, args):\n        if self.interface.on_key_down:\n            self.interface.on_key_down(self.interface, **toga_key(args))\n\n    def set_on_key_down(self, handler):\n        pass\n\n    def set_on_webview_load(self, handler):\n        pass\n\n    def get_url(self):\n        return str(self.native.Source)\n\n    def set_url(self, value):\n        if value:\n            self.native.Source = Uri(value)\n\n    def set_content(self, root_url, content):\n        if content and self.native.CoreWebView2:\n            self.native.CoreWebView2.NavigateToString(content)\n\n    def get_dom(self):\n        self.interface.factory.not_implemented(\"WebView.get_dom()\")\n\n    def set_user_agent(self, value):\n        user_agent = (\n            value\n            if value\n            else (\n                \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 \"\n                \"(KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.46\"\n            )\n        )\n        if self.native.CoreWebView2:\n            self.native.CoreWebView2.Settings.UserAgent = user_agent\n\n    async def evaluate_javascript(self, javascript):\n        loop = get_event_loop()\n        future = loop.create_future()\n\n        task_scheduler = TaskScheduler.FromCurrentSynchronizationContext()\n        try:\n\n            def callback(task):\n                future.set_result(task.Result)\n\n            self.native.ExecuteScriptAsync(javascript).ContinueWith(\n                Action[Task[String]](callback), task_scheduler\n            )\n        except Exception:\n            traceback.print_exc()\n            future.set_result(None)\n\n        return await future\n\n    def invoke_javascript(self, javascript):\n        # The script will execute async, but you weren't going to get the result\n        # anyway, so it doesn't really matter.\n        self.native.ExecuteScriptAsync(javascript)\n\n    def rehint(self):\n        self.interface.intrinsic.width = at_least(self.interface.MIN_WIDTH)\n        self.interface.intrinsic.height = at_least(self.interface.MIN_HEIGHT)\n", "path": "winforms/src/toga_winforms/widgets/webview.py"}], "after_files": [{"content": "import traceback\nimport webbrowser\nfrom asyncio import get_event_loop\n\nfrom travertino.size import at_least\n\nimport toga\nfrom toga_winforms.keys import toga_key\nfrom toga_winforms.libs import (\n    Action,\n    Color,\n    CoreWebView2CreationProperties,\n    String,\n    Task,\n    TaskScheduler,\n    Uri,\n    WebView2,\n    WebView2RuntimeNotFoundException,\n    WinForms,\n)\n\nfrom .base import Widget\n\n\nclass TogaWebBrowser(WebView2):\n    def __init__(self, interface):\n        super().__init__()\n        self.interface = interface\n        self._edge_runtime_available = None  # Set to an unknown state initially\n\n\nclass WebView(Widget):\n    def create(self):\n        self.native = TogaWebBrowser(self.interface)\n        self.native.CoreWebView2InitializationCompleted += (\n            self.winforms_initialization_completed\n        )\n        self.native.NavigationCompleted += self.winforms_navigation_completed\n        self.native.KeyDown += self.winforms_key_down\n\n        props = CoreWebView2CreationProperties()\n        props.UserDataFolder = str(toga.App.app.paths.cache / \"WebView2\")\n        self.native.CreationProperties = props\n\n        # Trigger the configuration of the webview\n        self.native.EnsureCoreWebView2Async(None)\n        self.native.DefaultBackgroundColor = Color.Transparent\n\n    def winforms_initialization_completed(self, sender, args):\n        # The WebView2 widget has an \"internal\" widget (CoreWebView2) that is\n        # the actual web view. The view isn't ready until the internal widget has\n        # completed initialization, and that isn't done until an explicit\n        # request is made (EnsureCoreWebView2Async).\n        if args.IsSuccess:\n            # We've initialized, so we must have the runtime\n            self.native._edge_runtime_available = True\n            try:\n                settings = self.native.CoreWebView2.Settings\n\n                debug = True\n                settings.AreDefaultContextMenusEnabled = debug\n                settings.AreDefaultScriptDialogsEnabled = True\n                settings.AreDevToolsEnabled = debug\n                settings.IsBuiltInErrorPageEnabled = True\n                settings.IsScriptEnabled = True\n                settings.IsWebMessageEnabled = True\n                settings.IsStatusBarEnabled = debug\n                settings.IsZoomControlEnabled = True\n\n                self.set_user_agent(self.interface.user_agent)\n\n                if self.interface._html_content:\n                    self.set_content(self.interface.url, self.interface._html_content)\n                else:\n                    self.set_url(self.interface.url)\n\n            except Exception:\n                traceback.print_exc()\n        else:\n            if isinstance(\n                args.InitializationException, WebView2RuntimeNotFoundException\n            ):\n                print(\"Could not find the Microsoft Edge WebView2 Runtime.\")\n                if self.native._edge_runtime_available is None:\n                    # The initialize message is sent twice on failure.\n                    # We only want to show the dialog once, so track that we\n                    # know the runtime is missing.\n                    self.native._edge_runtime_available = False\n                    WinForms.MessageBox.Show(\n                        \"The Microsoft Edge WebView2 Runtime is not installed. \"\n                        \"Web content will not be displayed.\\n\\n\"\n                        \"Click OK to download the WebView2 Evergreen Runtime \"\n                        \"Bootstrapper from Microsoft.\",\n                        \"Missing Edge Webview2 runtime\",\n                        WinForms.MessageBoxButtons.OK,\n                        WinForms.MessageBoxIcon.Error,\n                    )\n                    webbrowser.open(\n                        \"https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section\"\n                    )\n            else:\n                print(args.InitializationException)\n\n    def winforms_navigation_completed(self, sender, args):\n        if self.interface.on_webview_load:\n            self.interface.on_webview_load(self.interface)\n\n    def winforms_key_down(self, sender, args):\n        if self.interface.on_key_down:\n            self.interface.on_key_down(self.interface, **toga_key(args))\n\n    def set_on_key_down(self, handler):\n        pass\n\n    def set_on_webview_load(self, handler):\n        pass\n\n    def get_url(self):\n        return str(self.native.Source)\n\n    def set_url(self, value):\n        if value:\n            self.native.Source = Uri(value)\n\n    def set_content(self, root_url, content):\n        if content and self.native.CoreWebView2:\n            self.native.CoreWebView2.NavigateToString(content)\n\n    def get_dom(self):\n        self.interface.factory.not_implemented(\"WebView.get_dom()\")\n\n    def set_user_agent(self, value):\n        user_agent = (\n            value\n            if value\n            else (\n                \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 \"\n                \"(KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.46\"\n            )\n        )\n        if self.native.CoreWebView2:\n            self.native.CoreWebView2.Settings.UserAgent = user_agent\n\n    async def evaluate_javascript(self, javascript):\n        loop = get_event_loop()\n        future = loop.create_future()\n\n        task_scheduler = TaskScheduler.FromCurrentSynchronizationContext()\n        try:\n\n            def callback(task):\n                future.set_result(task.Result)\n\n            self.native.ExecuteScriptAsync(javascript).ContinueWith(\n                Action[Task[String]](callback), task_scheduler\n            )\n        except Exception:\n            traceback.print_exc()\n            future.set_result(None)\n\n        return await future\n\n    def invoke_javascript(self, javascript):\n        # The script will execute async, but you weren't going to get the result\n        # anyway, so it doesn't really matter.\n        self.native.ExecuteScriptAsync(javascript)\n\n    def rehint(self):\n        self.interface.intrinsic.width = at_least(self.interface.MIN_WIDTH)\n        self.interface.intrinsic.height = at_least(self.interface.MIN_HEIGHT)\n", "path": "winforms/src/toga_winforms/widgets/webview.py"}]}