Mercurial > dwindows
comparison win/edge.cpp @ 2085:43453c9a404c
Win: Implement DW_HTML_STOP for Edge (Chromium) now that it is suppported.
Fix a small memory leak and safety issue during Edge widget creation.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 03 Jun 2020 05:53:05 +0000 |
parents | 2dacac5e4023 |
children | 94ea915bd917 |
comparison
equal
deleted
inserted
replaced
2084:524cb235a555 | 2085:43453c9a404c |
---|---|
176 // loading of the edge webview contexts | 176 // loading of the edge webview contexts |
177 char *url = (char *)dw_window_get_data(hWnd, _DW_HTML_DATA_LOCATION); | 177 char *url = (char *)dw_window_get_data(hWnd, _DW_HTML_DATA_LOCATION); |
178 if (url) | 178 if (url) |
179 { | 179 { |
180 WebView->URL(url); | 180 WebView->URL(url); |
181 dw_window_set_data(hWnd, _DW_HTML_DATA_LOCATION, NULL); | |
181 free((void*)url); | 182 free((void*)url); |
182 } | 183 } |
183 char *raw = (char *)dw_window_get_data(hWnd, _DW_HTML_DATA_RAW); | 184 char *raw = (char *)dw_window_get_data(hWnd, _DW_HTML_DATA_RAW); |
184 if (raw) | 185 if (raw) |
185 { | 186 { |
186 WebView->Raw(raw); | 187 WebView->Raw(raw); |
188 dw_window_set_data(hWnd, _DW_HTML_DATA_RAW, NULL); | |
187 free((void*)raw); | 189 free((void*)raw); |
188 } | 190 } |
189 return S_OK; | 191 return S_OK; |
190 }).Get()); | 192 }).Get()); |
191 // Success | 193 // Success |
281 } | 283 } |
282 | 284 |
283 case DW_HTML_STOP: | 285 case DW_HTML_STOP: |
284 { | 286 { |
285 // Call the IWebView2WebView object's Stop function. | 287 // Call the IWebView2WebView object's Stop function. |
286 //WebView->Stop(); | 288 WebView->Stop(); |
287 } | 289 } |
288 } | 290 } |
289 } | 291 } |
290 } | 292 } |
291 | 293 |