From b069132341ab1f8a25d8bc1f07bdb97a69f656b5 Mon Sep 17 00:00:00 2001 From: WeiYanglu Date: Wed, 23 Mar 2022 16:32:18 +0800 Subject: [PATCH 1/6] =?UTF-8?q?CHART-23172=20&=20CHART-23111=20v7=E7=9A=84?= =?UTF-8?q?jxbrowser=E6=B2=A1=E6=9C=89=E6=AD=A3=E7=A1=AE=E5=85=B3=E9=97=AD?= =?UTF-8?q?engine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/ui/ModernUIPane.java | 6 +++++- .../fr/design/ui/compatible/ModernUIPaneFactory.java | 4 ++-- .../com/fr/design/ui/compatible/NewModernUIPane.java | 11 ++++++++--- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java index 09fa2bbc08..16b09392f5 100644 --- a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java @@ -196,13 +196,17 @@ public class ModernUIPane extends BasicPane { private ModernUIPane pane; public Builder() { - this(BrowserType.HEAVYWEIGHT); } public Builder(BrowserType browserType) { this.pane = new ModernUIPane<>(browserType); } + public Builder init() { + this.pane = new ModernUIPane<>(BrowserType.HEAVYWEIGHT); + return this; + } + public Builder prepare(ScriptContextListener contextListener) { pane.browser.addScriptContextListener(contextListener); return this; diff --git a/designer-base/src/main/java/com/fr/design/ui/compatible/ModernUIPaneFactory.java b/designer-base/src/main/java/com/fr/design/ui/compatible/ModernUIPaneFactory.java index 68b8950f7c..e6b13ce13e 100644 --- a/designer-base/src/main/java/com/fr/design/ui/compatible/ModernUIPaneFactory.java +++ b/designer-base/src/main/java/com/fr/design/ui/compatible/ModernUIPaneFactory.java @@ -13,9 +13,9 @@ public class ModernUIPaneFactory { public static ModernUIPane.Builder modernUIPaneBuilder() { if (isV7()) { - return new NewModernUIPane.Builder<>(); + return new NewModernUIPane.Builder().init(); } else { - return new ModernUIPane.Builder<>(); + return new ModernUIPane.Builder().init(); } } diff --git a/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java index 0b56fc0ad6..3c30afbf06 100644 --- a/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java @@ -182,8 +182,7 @@ public class NewModernUIPane extends ModernUIPane { public void disposeBrowser() { if (browser != null) { - browser.close(); - browser = null; + browser.engine().close(); } } @@ -204,7 +203,13 @@ public class NewModernUIPane extends ModernUIPane { public static class Builder extends ModernUIPane.Builder { - private NewModernUIPane pane = new NewModernUIPane<>(); + private NewModernUIPane pane; + + @Override + public ModernUIPane.Builder init() { + this.pane = new NewModernUIPane<>(); + return this; + } public NewModernUIPane.Builder prepare(InjectJsCallback callback) { pane.browser.set(InjectJsCallback.class, callback); From c7b284ad9ef40d494999eb713f33ff33029b3e96 Mon Sep 17 00:00:00 2001 From: WeiYanglu Date: Wed, 23 Mar 2022 16:49:00 +0800 Subject: [PATCH 2/6] =?UTF-8?q?Revert=20"CHART-23172=20&=20CHART-23111=20v?= =?UTF-8?q?7=E7=9A=84jxbrowser=E6=B2=A1=E6=9C=89=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E5=85=B3=E9=97=ADengine"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit b069132341ab1f8a25d8bc1f07bdb97a69f656b5. --- .../src/main/java/com/fr/design/ui/ModernUIPane.java | 6 +----- .../fr/design/ui/compatible/ModernUIPaneFactory.java | 4 ++-- .../com/fr/design/ui/compatible/NewModernUIPane.java | 11 +++-------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java index 16b09392f5..09fa2bbc08 100644 --- a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java @@ -196,17 +196,13 @@ public class ModernUIPane extends BasicPane { private ModernUIPane pane; public Builder() { + this(BrowserType.HEAVYWEIGHT); } public Builder(BrowserType browserType) { this.pane = new ModernUIPane<>(browserType); } - public Builder init() { - this.pane = new ModernUIPane<>(BrowserType.HEAVYWEIGHT); - return this; - } - public Builder prepare(ScriptContextListener contextListener) { pane.browser.addScriptContextListener(contextListener); return this; diff --git a/designer-base/src/main/java/com/fr/design/ui/compatible/ModernUIPaneFactory.java b/designer-base/src/main/java/com/fr/design/ui/compatible/ModernUIPaneFactory.java index e6b13ce13e..68b8950f7c 100644 --- a/designer-base/src/main/java/com/fr/design/ui/compatible/ModernUIPaneFactory.java +++ b/designer-base/src/main/java/com/fr/design/ui/compatible/ModernUIPaneFactory.java @@ -13,9 +13,9 @@ public class ModernUIPaneFactory { public static ModernUIPane.Builder modernUIPaneBuilder() { if (isV7()) { - return new NewModernUIPane.Builder().init(); + return new NewModernUIPane.Builder<>(); } else { - return new ModernUIPane.Builder().init(); + return new ModernUIPane.Builder<>(); } } diff --git a/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java index 3c30afbf06..0b56fc0ad6 100644 --- a/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java @@ -182,7 +182,8 @@ public class NewModernUIPane extends ModernUIPane { public void disposeBrowser() { if (browser != null) { - browser.engine().close(); + browser.close(); + browser = null; } } @@ -203,13 +204,7 @@ public class NewModernUIPane extends ModernUIPane { public static class Builder extends ModernUIPane.Builder { - private NewModernUIPane pane; - - @Override - public ModernUIPane.Builder init() { - this.pane = new NewModernUIPane<>(); - return this; - } + private NewModernUIPane pane = new NewModernUIPane<>(); public NewModernUIPane.Builder prepare(InjectJsCallback callback) { pane.browser.set(InjectJsCallback.class, callback); From ea109b45f625c23e0b16fba0c6ba9f3c27702d3b Mon Sep 17 00:00:00 2001 From: WeiYanglu Date: Wed, 23 Mar 2022 16:49:51 +0800 Subject: [PATCH 3/6] =?UTF-8?q?CHART-23172=20&=20CHART-23111=20=E5=8F=AA?= =?UTF-8?q?=E5=A4=84=E7=90=86=E6=B2=A1=E6=AD=A3=E7=A1=AE=E5=85=B3=E9=97=AD?= =?UTF-8?q?engine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/ui/compatible/NewModernUIPane.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java index 0b56fc0ad6..9d9edf88cc 100644 --- a/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java @@ -182,8 +182,7 @@ public class NewModernUIPane extends ModernUIPane { public void disposeBrowser() { if (browser != null) { - browser.close(); - browser = null; + browser.engine().close(); } } From 541fd4f288cedde92f0d37d560481b5d9d02343c Mon Sep 17 00:00:00 2001 From: WeiYanglu Date: Wed, 23 Mar 2022 16:59:42 +0800 Subject: [PATCH 4/6] =?UTF-8?q?Revert=20"CHART-23172=20&=20CHART-23111=20?= =?UTF-8?q?=E5=8F=AA=E5=A4=84=E7=90=86=E6=B2=A1=E6=AD=A3=E7=A1=AE=E5=85=B3?= =?UTF-8?q?=E9=97=ADengine"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ea109b45f625c23e0b16fba0c6ba9f3c27702d3b. --- .../main/java/com/fr/design/ui/compatible/NewModernUIPane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java index 9d9edf88cc..0b56fc0ad6 100644 --- a/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java @@ -182,7 +182,8 @@ public class NewModernUIPane extends ModernUIPane { public void disposeBrowser() { if (browser != null) { - browser.engine().close(); + browser.close(); + browser = null; } } From c777d0889aef7f9710a9c012d1f609c0c2c53ebc Mon Sep 17 00:00:00 2001 From: WeiYanglu Date: Wed, 23 Mar 2022 17:00:16 +0800 Subject: [PATCH 5/6] =?UTF-8?q?CHART-23172=20&=20CHART-23111=20v7=E7=9A=84?= =?UTF-8?q?jxbrowser=E6=B2=A1=E6=9C=89=E6=AD=A3=E7=A1=AE=E5=85=B3=E9=97=AD?= =?UTF-8?q?engine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/ui/compatible/NewModernUIPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java index 0b56fc0ad6..2c8c891cbd 100644 --- a/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java @@ -182,7 +182,7 @@ public class NewModernUIPane extends ModernUIPane { public void disposeBrowser() { if (browser != null) { - browser.close(); + browser.engine().close(); browser = null; } From 4a8fd982c54bb83a96e3ee05ee5a7b9b7f8feae5 Mon Sep 17 00:00:00 2001 From: WeiYanglu Date: Wed, 23 Mar 2022 18:20:50 +0800 Subject: [PATCH 6/6] =?UTF-8?q?v7=E7=9A=84=E6=9E=84=E9=80=A0=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E4=B8=8D=E8=83=BD=E8=B5=B0v6=E7=9A=84=EF=BC=8C?= =?UTF-8?q?=E4=BC=9A=E4=B8=80=E7=9B=B4=E5=88=9B=E5=BB=BAv6=E7=9A=84Chromiu?= =?UTF-8?q?m=E8=BF=9B=E7=A8=8B=EF=BC=8C=E5=85=88=E6=90=9E=E4=B8=AA?= =?UTF-8?q?=E6=9E=84=E9=80=A0=E5=87=BD=E6=95=B0=E8=BF=99=E6=A0=B7=E5=A4=84?= =?UTF-8?q?=E7=90=86=E4=B8=8B..?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/ui/ModernUIPane.java | 4 ++++ .../java/com/fr/design/ui/compatible/NewModernUIPane.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java index 09fa2bbc08..5a0ead41e7 100644 --- a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java @@ -203,6 +203,10 @@ public class ModernUIPane extends BasicPane { this.pane = new ModernUIPane<>(browserType); } + public Builder(ModernUIPane pane) { + this.pane = pane; + } + public Builder prepare(ScriptContextListener contextListener) { pane.browser.addScriptContextListener(contextListener); return this; diff --git a/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java index 2c8c891cbd..59df782cde 100644 --- a/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java @@ -206,6 +206,10 @@ public class NewModernUIPane extends ModernUIPane { private NewModernUIPane pane = new NewModernUIPane<>(); + public Builder() { + super((ModernUIPane)null); + } + public NewModernUIPane.Builder prepare(InjectJsCallback callback) { pane.browser.set(InjectJsCallback.class, callback); return this;