Skip to content

Commit cd11009

Browse files
committed
[webview_flutter] Update minor things
* Update lightweight web engine binary * Update version && change log * Enable resize function Signed-off-by: MuHong Byun <[email protected]>
1 parent 8c60c51 commit cd11009

File tree

6 files changed

+17
-3
lines changed

6 files changed

+17
-3
lines changed

packages/webview_flutter/CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@
1010
* Update webivew_flutter to 2.0.4
1111

1212
## 0.2.1
13-
* Add lightweight web engine binary for arm64
13+
* Add lightweight web engine binary for arm64
14+
15+
## 0.2.2
16+
* Update lightweight web engine binary & header file
17+
* Activate resizing function

packages/webview_flutter/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: webview_flutter_tizen
22
description: Tizen implementation of the webview plugin
33
homepage: https://github.com/flutter-tizen/plugins
4-
version: 0.2.1
4+
version: 0.2.2
55

66
environment:
77
sdk: ">=2.12.0 <3.0.0"

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

+3
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ class LWE_EXPORT Settings {
8383
void GetBaseForegroundColor(unsigned char& r, unsigned char& g,
8484
unsigned char& b, unsigned char& a) const;
8585
bool NeedsDownloadWebFontsEarly() const;
86+
bool UseHttp2() const;
8687
uint32_t NeedsDownScaleImageResourceLargerThan() const;
8788
void SetUserAgentString(const std::string& ua);
8889
void SetCacheMode(int mode);
@@ -97,6 +98,7 @@ class LWE_EXPORT Settings {
9798
void SetIdleModeJob(IdleModeJob j);
9899
void SetIdleModeCheckIntervalInMS(uint32_t intervalInMS);
99100
void SetNeedsDownloadWebFontsEarly(bool b);
101+
void SetUseHttp2(bool b);
100102
void SetNeedsDownScaleImageResourceLargerThan(
101103
uint32_t demention); // Experimental
102104

@@ -113,6 +115,7 @@ class LWE_EXPORT Settings {
113115
IdleModeJob m_idleModeJob; // default value is IdleModeJob::IdleModeFull
114116
uint32_t m_idleModeCheckIntervalInMS; // default value is 3000(ms)
115117
bool m_needsDownloadWebFontsEarly;
118+
bool m_useHttp2; // default value is false
116119
uint32_t m_needsDownScaleImageResourceLargerThan;
117120
};
118121

Binary file not shown.
Binary file not shown.

packages/webview_flutter/tizen/src/webview.cc

+8-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,14 @@ void WebView::Dispose() {
404404

405405
void WebView::Resize(double width, double height) {
406406
LOG_DEBUG("WebView::Resize width: %f height: %f \n", width, height);
407-
// NOTE: Not supported by LWE on Tizen.
407+
width_ = width;
408+
height_ = height;
409+
410+
if (candidate_surface_) {
411+
tbm_surface_destroy(candidate_surface_);
412+
candidate_surface_ = nullptr;
413+
}
414+
webview_instance_->ResizeTo(width_, height_);
408415
}
409416

410417
void WebView::Touch(int type, int button, double x, double y, double dx,

0 commit comments

Comments
 (0)