Skip to content

Commit a4bbfa3

Browse files
committed
[webview_flutter] Update lightweight web engine binary
Signed-off-by: MuHong Byun <[email protected]>
1 parent b60f782 commit a4bbfa3

File tree

8 files changed

+29
-9
lines changed

8 files changed

+29
-9
lines changed

packages/webview_flutter/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,7 @@
4646
* Update webivew_flutter to 2.1.1
4747

4848
## 0.3.8
49-
* Update webivew_flutter to 2.3.0
49+
* Update webivew_flutter to 2.3.0
50+
51+
## 0.3.9
52+
* Update LWE binary (6bae13cb915bd41c5aac4aaaae72865f20924c03)

packages/webview_flutter/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: webview_flutter_tizen
22
description: Tizen implementation of the webview plugin
33
homepage: https://github.com/flutter-tizen/plugins
44
repository: https://github.com/flutter-tizen/plugins/tree/master/packages/webview_flutter
5-
version: 0.3.8
5+
version: 0.3.9
66

77
environment:
88
sdk: ">=2.14.0 <3.0.0"

packages/webview_flutter/tizen/inc/lwe/LWEWebView.h

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ class LWE_EXPORT Settings {
8585
bool NeedsDownloadWebFontsEarly() const;
8686
bool UseHttp2() const;
8787
uint32_t NeedsDownScaleImageResourceLargerThan() const;
88+
bool ScrollbarVisible() const;
89+
bool UseExternalPopup() const;
8890
void SetUserAgentString(const std::string& ua);
8991
void SetCacheMode(int mode);
9092
void SetProxyURL(const std::string& proxyURL);
@@ -101,6 +103,8 @@ class LWE_EXPORT Settings {
101103
void SetUseHttp2(bool b);
102104
void SetNeedsDownScaleImageResourceLargerThan(
103105
uint32_t demention); // Experimental
106+
void SetScrollbarVisible(bool visible);
107+
void SetUseExternalPopup(bool useExternalPopup);
104108

105109
private:
106110
std::string m_defaultUserAgent;
@@ -117,6 +121,8 @@ class LWE_EXPORT Settings {
117121
bool m_needsDownloadWebFontsEarly;
118122
bool m_useHttp2; // default value is false
119123
uint32_t m_needsDownScaleImageResourceLargerThan;
124+
bool m_scrollbarVisible;
125+
bool m_useExternalPopup;
120126
};
121127

122128
class LWE_EXPORT ResourceError {
@@ -149,6 +155,10 @@ class LWE_EXPORT WebContainer {
149155
size_t bufferStride;
150156
};
151157

158+
struct ExternalImageInfo {
159+
void* imageAddress;
160+
};
161+
152162
struct RenderResult {
153163
size_t updatedX;
154164
size_t updatedY;
@@ -163,6 +173,13 @@ class LWE_EXPORT WebContainer {
163173
void RegisterOnRenderedHandler(
164174
const std::function<void(WebContainer*,
165175
const RenderResult& renderResult)>& cb);
176+
177+
static WebContainer* CreateWithPlatformImage(
178+
unsigned width, unsigned height,
179+
const std::function<ExternalImageInfo(void)>& prepareImageCb,
180+
const std::function<void(WebContainer*, bool needsFlush)>& flushCb,
181+
float devicePixelRatio, const char* defaultFontName, const char* locale,
182+
const char* timezoneID);
166183
// <--- end of function set for render to buffer
167184

168185
// Function set for render with OpenGL
@@ -174,10 +191,6 @@ class LWE_EXPORT WebContainer {
174191
float devicePixelRatio, const char* defaultFontName, const char* locale,
175192
const char* timezoneID);
176193

177-
struct ExternalImageInfo {
178-
void* imageAddress;
179-
};
180-
181194
static WebContainer* CreateGLWithPlatformImage(
182195
unsigned width, unsigned height,
183196
const std::function<void(WebContainer*)>& onGLMakeCurrent,
@@ -187,6 +200,7 @@ class LWE_EXPORT WebContainer {
187200
const std::function<void(WebContainer*, bool needsFlush)>& flushCb,
188201
float devicePixelRatio, const char* defaultFontName, const char* locale,
189202
const char* timezoneID);
203+
190204
// <--- end of function set for render with OpenGL
191205

192206
// Function set for headless
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

packages/webview_flutter/tizen/src/webview.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ extern "C" size_t LWE_EXPORT createWebViewInstance(
2828
const char* timezoneID,
2929
const std::function<::LWE::WebContainer::ExternalImageInfo(void)>&
3030
prepareImageCb,
31-
const std::function<void(::LWE::WebContainer*, bool isRendered)>&
32-
renderedCb);
31+
const std::function<void(::LWE::WebContainer*, bool needsFlush)>& flushCb,
32+
bool useSWBackend);
3333

3434
template <typename T = flutter::EncodableValue>
3535
class NavigationRequestResult : public flutter::MethodResult<T> {
@@ -331,6 +331,8 @@ void WebView::ApplySettings(flutter::EncodableMap settings) {
331331
settings.SetUserAgentString(std::get<std::string>(val));
332332
webview_instance_->SetSettings(settings);
333333
}
334+
} else if ("zoomEnabled" == k) {
335+
// NOTE: Not supported by LWE on Tizen.
334336
} else {
335337
throw std::invalid_argument("Unknown WebView setting: " + k);
336338
}
@@ -788,7 +790,8 @@ void WebView::InitWebView() {
788790
candidate_surface_ = working_surface_;
789791
working_surface_ = nullptr;
790792
}
791-
});
793+
},
794+
false);
792795
#ifndef TV_PROFILE
793796
auto settings = webview_instance_->GetSettings();
794797
settings.SetUserAgentString(

0 commit comments

Comments
 (0)