-
Notifications
You must be signed in to change notification settings - Fork 52
[webview_flutter_tizen] Update webview_flutter to 4.13.1 #1009
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -701,6 +701,17 @@ void WebView::HandleWebViewMethodCall(const FlMethodCall& method_call, | |
| } else { | ||
| result->Error("Invalid argument", "The argument must be a string."); | ||
| } | ||
| } else if (method_name == "setVerticalScrollBarEnabled" || | ||
| method_name == "setHorizontalScrollBarEnabled") { | ||
| const auto* value = std::get_if<bool>(arguments); | ||
| if (value) { | ||
| scrollbar_enabled_ = *value; | ||
| EwkInternalApiBinding::GetInstance().view.MainFrameScrollbarVisibleSet( | ||
| webview_instance_, scrollbar_enabled_); | ||
| result->Success(); | ||
| } else { | ||
| result->Error("Invalid argument", "The argument must be a bool."); | ||
| } | ||
| } else { | ||
| result->NotImplemented(); | ||
| } | ||
|
|
@@ -773,6 +784,9 @@ void WebView::OnFrameRendered(void* data, Evas_Object* obj, void* event_info) { | |
|
|
||
| void WebView::OnLoadStarted(void* data, Evas_Object* obj, void* event_info) { | ||
| WebView* webview = static_cast<WebView*>(data); | ||
| EwkInternalApiBinding::GetInstance().view.MainFrameScrollbarVisibleSet( | ||
| webview->webview_instance_, webview->scrollbar_enabled_); | ||
|
Comment on lines
+787
to
+788
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this API always be called every time the page is reloaded?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This API should be called only after the webview is loaded.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does the setting get reset when the page reloads? If not, I think it would be better to use While this code will likely have little impact on performance or behavior, if you want to be clearer, it might be better to treat this as an API constraint and display a warning message if it is called before the page loads.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for your review. When I tried it, the And this API on the Flutter side can be called while the WebViewController is set up or after it is set up. Thank you again for your review. |
||
|
|
||
| std::string url = std::string(ewk_view_url_get(webview->webview_instance_)); | ||
| flutter::EncodableMap args = { | ||
| {flutter::EncodableValue("url"), flutter::EncodableValue(url)}}; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.