diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt
index 0c90f7898..ac5f68950 100644
--- a/CHROMIUM_BUILD_COMPATIBILITY.txt
+++ b/CHROMIUM_BUILD_COMPATIBILITY.txt
@@ -12,3 +12,4 @@ Date | CEF Revision | Chromium Revision
2008-12-13 | /trunk@4 | /trunk@6968
2008-12-13 | /trunk@5 | /trunk@6975
2009-01-14 | /trunk@6 | /trunk@8029
+2009-01-21 | /trunk@8 | /trunk@8386
diff --git a/cef.sln b/cef.sln
index 4a0519d7c..d20c2f32e 100644
--- a/cef.sln
+++ b/cef.sln
@@ -12,11 +12,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCore", "..\webkit\build\
Release.AspNetCompiler.Debug = "False"
EndProjectSection
ProjectSection(ProjectDependencies) = postProject
- {31D88CBF-DC28-47A8-8838-BF81D528EE74} = {31D88CBF-DC28-47A8-8838-BF81D528EE74}
- {4BD929D4-494B-4EE8-91F6-FD0277A51D2B} = {4BD929D4-494B-4EE8-91F6-FD0277A51D2B}
+ {2E2D3301-2EC4-4C0F-B889-87073B30F673} = {2E2D3301-2EC4-4C0F-B889-87073B30F673}
+ {1444235E-0E97-4C80-A73E-EE73F3706C32} = {1444235E-0E97-4C80-A73E-EE73F3706C32}
{2F7EDFA2-EE27-4D83-8454-9EFBD5779203} = {2F7EDFA2-EE27-4D83-8454-9EFBD5779203}
{6EAD4A4B-2BBC-4974-8E45-BB5C16CC2AC9} = {6EAD4A4B-2BBC-4974-8E45-BB5C16CC2AC9}
- {2E2D3301-2EC4-4C0F-B889-87073B30F673} = {2E2D3301-2EC4-4C0F-B889-87073B30F673}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Port", "..\webkit\build\port\port.vcproj", "{5597AD47-3494-4750-A235-4F9C2F864700}"
@@ -38,8 +37,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Glue", "..\webkit\build\glu
{2E2D3301-2EC4-4C0F-B889-87073B30F673} = {2E2D3301-2EC4-4C0F-B889-87073B30F673}
{0B469837-3D46-484A-AFB3-C5A6C68730B9} = {0B469837-3D46-484A-AFB3-C5A6C68730B9}
{2F7EDFA2-EE27-4D83-8454-9EFBD5779203} = {2F7EDFA2-EE27-4D83-8454-9EFBD5779203}
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} = {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}
{60B43839-95E6-4526-A661-209F16335E0E} = {60B43839-95E6-4526-A661-209F16335E0E}
+ {1444235E-0E97-4C80-A73E-EE73F3706C32} = {1444235E-0E97-4C80-A73E-EE73F3706C32}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "skia", "..\skia\skia.vcproj", "{CD9CA56E-4E94-444C-87D4-58CA1E6F300D}"
@@ -125,9 +124,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml", "..\third_party\li
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
- ProjectSection(ProjectDependencies) = postProject
- {31D88CBF-DC28-47A8-8838-BF81D528EE74} = {31D88CBF-DC28-47A8-8838-BF81D528EE74}
- EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxslt", "..\third_party\libxslt\build\libxslt.vcproj", "{FC0E1FD0-5DD7-4041-A1C9-CD3C376E4EED}"
ProjectSection(WebsiteProperties) = preProject
@@ -135,7 +131,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxslt", "..\third_party\l
Release.AspNetCompiler.Debug = "False"
EndProjectSection
ProjectSection(ProjectDependencies) = postProject
- {4BD929D4-494B-4EE8-91F6-FD0277A51D2B} = {4BD929D4-494B-4EE8-91F6-FD0277A51D2B}
{F9810DE8-CBC3-4605-A7B1-ECA2D5292FD7} = {F9810DE8-CBC3-4605-A7B1-ECA2D5292FD7}
EndProjectSection
EndProject
@@ -240,30 +235,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base_gfx", "..\base\build\b
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libxml projects", "libxml projects", "{032541FB-1E7C-4423-B657-4A71FE180C8A}"
- ProjectSection(WebsiteProperties) = preProject
- Debug.AspNetCompiler.Debug = "True"
- Release.AspNetCompiler.Debug = "False"
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml_config", "..\third_party\libxml\build\libxml_config.vcproj", "{31D88CBF-DC28-47A8-8838-BF81D528EE74}"
- ProjectSection(WebsiteProperties) = preProject
- Debug.AspNetCompiler.Debug = "True"
- Release.AspNetCompiler.Debug = "False"
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libxslt projects", "libxslt projects", "{BC732CFC-DE0A-4CF5-B8AA-3269C2F6D399}"
- ProjectSection(WebsiteProperties) = preProject
- Debug.AspNetCompiler.Debug = "True"
- Release.AspNetCompiler.Debug = "False"
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxslt_config", "..\third_party\libxslt\build\libxslt_config.vcproj", "{4BD929D4-494B-4EE8-91F6-FD0277A51D2B}"
- ProjectSection(WebsiteProperties) = preProject
- Debug.AspNetCompiler.Debug = "True"
- Release.AspNetCompiler.Debug = "False"
- EndProjectSection
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "default_plugin", "..\webkit\default_plugin\default_plugin.vcproj", "{5916D37D-8C97-424F-A904-74E52594C2D6}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
@@ -271,7 +242,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "default_plugin", "..\webkit
EndProjectSection
ProjectSection(ProjectDependencies) = postProject
{60B43839-95E6-4526-A661-209F16335E0E} = {60B43839-95E6-4526-A661-209F16335E0E}
- {31D88CBF-DC28-47A8-8838-BF81D528EE74} = {31D88CBF-DC28-47A8-8838-BF81D528EE74}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCore_pcre", "..\webkit\build\JavaScriptCore\JavaScriptCore_pcre.vcproj", "{49909552-0B0C-4C14-8CF6-DB8A2ADE0934}"
@@ -413,6 +383,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webkit_resources", "..\webk
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCore_prebuild", "..\webkit\build\WebCore\WebCore_prebuild.vcproj", "{1444235E-0E97-4C80-A73E-EE73F3706C32}"
+ ProjectSection(WebsiteProperties) = preProject
+ Debug.AspNetCompiler.Debug = "True"
+ Release.AspNetCompiler.Debug = "False"
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Mixed Platforms = Debug|Mixed Platforms
@@ -596,22 +572,6 @@ Global
{A508ADD3-CECE-4E0F-8448-2F5E454DF551}.Release|Mixed Platforms.Build.0 = Release|Win32
{A508ADD3-CECE-4E0F-8448-2F5E454DF551}.Release|Win32.ActiveCfg = Release|Win32
{A508ADD3-CECE-4E0F-8448-2F5E454DF551}.Release|Win32.Build.0 = Release|Win32
- {31D88CBF-DC28-47A8-8838-BF81D528EE74}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
- {31D88CBF-DC28-47A8-8838-BF81D528EE74}.Debug|Mixed Platforms.Build.0 = Debug|Win32
- {31D88CBF-DC28-47A8-8838-BF81D528EE74}.Debug|Win32.ActiveCfg = Debug|Win32
- {31D88CBF-DC28-47A8-8838-BF81D528EE74}.Debug|Win32.Build.0 = Debug|Win32
- {31D88CBF-DC28-47A8-8838-BF81D528EE74}.Release|Mixed Platforms.ActiveCfg = Release|Win32
- {31D88CBF-DC28-47A8-8838-BF81D528EE74}.Release|Mixed Platforms.Build.0 = Release|Win32
- {31D88CBF-DC28-47A8-8838-BF81D528EE74}.Release|Win32.ActiveCfg = Release|Win32
- {31D88CBF-DC28-47A8-8838-BF81D528EE74}.Release|Win32.Build.0 = Release|Win32
- {4BD929D4-494B-4EE8-91F6-FD0277A51D2B}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
- {4BD929D4-494B-4EE8-91F6-FD0277A51D2B}.Debug|Mixed Platforms.Build.0 = Debug|Win32
- {4BD929D4-494B-4EE8-91F6-FD0277A51D2B}.Debug|Win32.ActiveCfg = Debug|Win32
- {4BD929D4-494B-4EE8-91F6-FD0277A51D2B}.Debug|Win32.Build.0 = Debug|Win32
- {4BD929D4-494B-4EE8-91F6-FD0277A51D2B}.Release|Mixed Platforms.ActiveCfg = Release|Win32
- {4BD929D4-494B-4EE8-91F6-FD0277A51D2B}.Release|Mixed Platforms.Build.0 = Release|Win32
- {4BD929D4-494B-4EE8-91F6-FD0277A51D2B}.Release|Win32.ActiveCfg = Release|Win32
- {4BD929D4-494B-4EE8-91F6-FD0277A51D2B}.Release|Win32.Build.0 = Release|Win32
{5916D37D-8C97-424F-A904-74E52594C2D6}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{5916D37D-8C97-424F-A904-74E52594C2D6}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{5916D37D-8C97-424F-A904-74E52594C2D6}.Debug|Win32.ActiveCfg = Debug|Win32
@@ -732,6 +692,14 @@ Global
{0B469837-3D46-484A-AFB3-C5A6C68730B9}.Release|Mixed Platforms.Build.0 = Release|Win32
{0B469837-3D46-484A-AFB3-C5A6C68730B9}.Release|Win32.ActiveCfg = Release|Win32
{0B469837-3D46-484A-AFB3-C5A6C68730B9}.Release|Win32.Build.0 = Release|Win32
+ {1444235E-0E97-4C80-A73E-EE73F3706C32}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {1444235E-0E97-4C80-A73E-EE73F3706C32}.Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {1444235E-0E97-4C80-A73E-EE73F3706C32}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1444235E-0E97-4C80-A73E-EE73F3706C32}.Debug|Win32.Build.0 = Debug|Win32
+ {1444235E-0E97-4C80-A73E-EE73F3706C32}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {1444235E-0E97-4C80-A73E-EE73F3706C32}.Release|Mixed Platforms.Build.0 = Release|Win32
+ {1444235E-0E97-4C80-A73E-EE73F3706C32}.Release|Win32.ActiveCfg = Release|Win32
+ {1444235E-0E97-4C80-A73E-EE73F3706C32}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -749,6 +717,7 @@ Global
{2F7EDFA2-EE27-4D83-8454-9EFBD5779203} = {CB43561E-A6F8-49E2-96A2-3F2BA1FFF21E}
{60B43839-95E6-4526-A661-209F16335E0E} = {CB43561E-A6F8-49E2-96A2-3F2BA1FFF21E}
{0B469837-3D46-484A-AFB3-C5A6C68730B9} = {CB43561E-A6F8-49E2-96A2-3F2BA1FFF21E}
+ {1444235E-0E97-4C80-A73E-EE73F3706C32} = {CB43561E-A6F8-49E2-96A2-3F2BA1FFF21E}
{6EAD4A4B-2BBC-4974-8E45-BB5C16CC2AC9} = {EF78C1F9-AA17-4CA5-B6CB-39B37A73A3DA}
{CD9CA56E-4E94-444C-87D4-58CA1E6F300D} = {EF78C1F9-AA17-4CA5-B6CB-39B37A73A3DA}
{1AFC1EC3-24FA-4260-B099-76319EC9977A} = {EF78C1F9-AA17-4CA5-B6CB-39B37A73A3DA}
@@ -756,8 +725,8 @@ Global
{8423AF0D-4B88-4EBF-94E1-E4D00D00E21C} = {EF78C1F9-AA17-4CA5-B6CB-39B37A73A3DA}
{238CE175-76CE-4A25-A676-69D115885601} = {EF78C1F9-AA17-4CA5-B6CB-39B37A73A3DA}
{873D095E-150E-4262-8C41-2D8ED02F0F57} = {EF78C1F9-AA17-4CA5-B6CB-39B37A73A3DA}
- {032541FB-1E7C-4423-B657-4A71FE180C8A} = {EF78C1F9-AA17-4CA5-B6CB-39B37A73A3DA}
- {BC732CFC-DE0A-4CF5-B8AA-3269C2F6D399} = {EF78C1F9-AA17-4CA5-B6CB-39B37A73A3DA}
+ {F9810DE8-CBC3-4605-A7B1-ECA2D5292FD7} = {EF78C1F9-AA17-4CA5-B6CB-39B37A73A3DA}
+ {FC0E1FD0-5DD7-4041-A1C9-CD3C376E4EED} = {EF78C1F9-AA17-4CA5-B6CB-39B37A73A3DA}
{2A70CBF0-847E-4E3A-B926-542A656DC7FE} = {EF78C1F9-AA17-4CA5-B6CB-39B37A73A3DA}
{EF5E94AB-B646-4E5B-A058-52EF07B8351C} = {EF78C1F9-AA17-4CA5-B6CB-39B37A73A3DA}
{7100F41F-868D-4E99-80A2-AF8E6574749D} = {EF78C1F9-AA17-4CA5-B6CB-39B37A73A3DA}
@@ -769,10 +738,6 @@ Global
{8C27D792-2648-4F5E-9ED0-374276327308} = {1AFC1EC3-24FA-4260-B099-76319EC9977A}
{A0D94973-D355-47A5-A1E2-3456F321F010} = {1AFC1EC3-24FA-4260-B099-76319EC9977A}
{B55CA863-B374-4BAF-95AC-539E4FA4C90C} = {873D095E-150E-4262-8C41-2D8ED02F0F57}
- {F9810DE8-CBC3-4605-A7B1-ECA2D5292FD7} = {032541FB-1E7C-4423-B657-4A71FE180C8A}
- {31D88CBF-DC28-47A8-8838-BF81D528EE74} = {032541FB-1E7C-4423-B657-4A71FE180C8A}
- {FC0E1FD0-5DD7-4041-A1C9-CD3C376E4EED} = {BC732CFC-DE0A-4CF5-B8AA-3269C2F6D399}
- {4BD929D4-494B-4EE8-91F6-FD0277A51D2B} = {BC732CFC-DE0A-4CF5-B8AA-3269C2F6D399}
{FA39524D-3067-4141-888D-28A86C66F2B9} = {08BAF606-555E-4048-A47E-22CFA89A21B4}
{6617FED9-C5D4-4907-BF55-A90062A6683F} = {08BAF606-555E-4048-A47E-22CFA89A21B4}
{C0334F9A-1168-4101-9DD8-C30FB252D435} = {B353A6A5-9551-4B76-908E-0F0A9B31E4CE}
diff --git a/libcef/browser_webview_delegate.cc b/libcef/browser_webview_delegate.cc
index ae74670fe..5372430ff 100644
--- a/libcef/browser_webview_delegate.cc
+++ b/libcef/browser_webview_delegate.cc
@@ -15,6 +15,7 @@
#include "request_impl.h"
#include "base/file_util.h"
+#include "base/gfx/gdi_util.h"
#include "base/gfx/point.h"
#include "base/message_loop.h"
#include "base/string_util.h"
@@ -501,10 +502,30 @@ void BrowserWebViewDelegate::Blur(WebWidget* webwidget) {
void BrowserWebViewDelegate::DidMove(WebWidget* webwidget,
const WebPluginGeometry& move) {
#if defined(OS_WIN)
- // TODO(port): add me once plugins work.
- WebPluginDelegateImpl::MoveWindow(
- move.window, move.window_rect, move.clip_rect, move.cutout_rects,
- move.visible);
+ HRGN hrgn = ::CreateRectRgn(move.clip_rect.x(),
+ move.clip_rect.y(),
+ move.clip_rect.right(),
+ move.clip_rect.bottom());
+ gfx::SubtractRectanglesFromRegion(hrgn, move.cutout_rects);
+
+ // Note: System will own the hrgn after we call SetWindowRgn,
+ // so we don't need to call DeleteObject(hrgn)
+ ::SetWindowRgn(move.window, hrgn, FALSE);
+
+ unsigned long flags = 0;
+ if (move.visible)
+ flags |= SWP_SHOWWINDOW;
+ else
+ flags |= SWP_HIDEWINDOW;
+
+ ::SetWindowPos(move.window,
+ NULL,
+ move.window_rect.x(),
+ move.window_rect.y(),
+ move.window_rect.width(),
+ move.window_rect.height(),
+ flags);
+
#endif
}
diff --git a/libcef/context.cc b/libcef/context.cc
index d2fdef28b..b15b889d0 100644
--- a/libcef/context.cc
+++ b/libcef/context.cc
@@ -11,6 +11,7 @@
#include "plugins/browser_plugin_list.h"
#include "base/at_exit.h"
+#include "base/command_line.h"
#include "base/icu_util.h"
#include "base/path_service.h"
#include "base/rand_util.h"
@@ -128,7 +129,10 @@ DWORD WINAPI ThreadHandlerUI(LPVOID lpParam)
DCHECK(SUCCEEDED(res));
// Instantiate the AtExitManager to avoid asserts and possible memory leaks.
- base::AtExitManager at_exit_manager;
+ base::AtExitManager at_exit_manager;
+
+ // Initialize the global CommandLine object.
+ CommandLine::Init(0, NULL);
// Instantiate the message loop for this thread.
MessageLoopForUI main_message_loop;
diff --git a/libcef/libcef_webkit_includes.vsprops b/libcef/libcef_webkit_includes.vsprops
index ca842509b..a80683bd7 100644
--- a/libcef/libcef_webkit_includes.vsprops
+++ b/libcef/libcef_webkit_includes.vsprops
@@ -6,6 +6,6 @@
>
diff --git a/libcef/plugins/browser_webplugin_delegate_impl.cc b/libcef/plugins/browser_webplugin_delegate_impl.cc
index b4205d1a7..81b10ea10 100644
--- a/libcef/plugins/browser_webplugin_delegate_impl.cc
+++ b/libcef/plugins/browser_webplugin_delegate_impl.cc
@@ -16,8 +16,6 @@
#include "base/file_util.h"
#include "base/message_loop.h"
-#include "base/gfx/gdi_util.h"
-#include "base/gfx/point.h"
#include "base/stats_counters.h"
#include "base/string_util.h"
#include "webkit/default_plugin/plugin_impl.h"
@@ -137,7 +135,6 @@ BrowserWebPluginDelegateImpl::BrowserWebPluginDelegateImpl(
plugin_wnd_proc_(NULL),
last_message_(0),
is_calling_wndproc(false),
- initial_plugin_resize_done_(false),
dummy_window_for_activation_(NULL),
handle_event_message_filter_hook_(NULL),
handle_event_pump_messages_event_(NULL),
@@ -287,13 +284,11 @@ void BrowserWebPluginDelegateImpl::DestroyInstance() {
void BrowserWebPluginDelegateImpl::UpdateGeometry(
const gfx::Rect& window_rect,
- const gfx::Rect& clip_rect,
- const std::vector& cutout_rects,
- bool visible) {
+ const gfx::Rect& clip_rect) {
if (windowless_) {
WindowlessUpdateGeometry(window_rect, clip_rect);
} else {
- WindowedUpdateGeometry(window_rect, clip_rect, cutout_rects, visible);
+ WindowedUpdateGeometry(window_rect, clip_rect);
}
}
@@ -342,6 +337,13 @@ void BrowserWebPluginDelegateImpl::SendJavaScriptStream(const std::string& url,
void BrowserWebPluginDelegateImpl::DidReceiveManualResponse(
const std::string& url, const std::string& mime_type,
const std::string& headers, uint32 expected_length, uint32 last_modified) {
+
+ if (!windowless_) {
+ // Calling NPP_WriteReady before NPP_SetWindow causes movies to not load in
+ // Flash. See http://b/issue?id=892174.
+ DCHECK(windowed_did_set_window_);
+ }
+
instance()->DidReceiveManualResponse(url, mime_type, headers,
expected_length, last_modified);
}
@@ -373,10 +375,8 @@ void BrowserWebPluginDelegateImpl::InstallMissingPlugin() {
void BrowserWebPluginDelegateImpl::WindowedUpdateGeometry(
const gfx::Rect& window_rect,
- const gfx::Rect& clip_rect,
- const std::vector& cutout_rects,
- bool visible) {
- if (WindowedReposition(window_rect, clip_rect, cutout_rects, visible) ||
+ const gfx::Rect& clip_rect) {
+ if (WindowedReposition(window_rect, clip_rect) ||
!windowed_did_set_window_) {
// Let the plugin know that it has been moved
WindowedSetWindow();
@@ -625,69 +625,33 @@ bool BrowserWebPluginDelegateImpl::CreateDummyWindowForActivation() {
return true;
}
-void BrowserWebPluginDelegateImpl::MoveWindow(
- HWND window,
- const gfx::Rect& window_rect,
- const gfx::Rect& clip_rect,
- const std::vector& cutout_rects,
- bool visible) {
- HRGN hrgn = ::CreateRectRgn(clip_rect.x(),
- clip_rect.y(),
- clip_rect.right(),
- clip_rect.bottom());
- gfx::SubtractRectanglesFromRegion(hrgn, cutout_rects);
-
- // Note: System will own the hrgn after we call SetWindowRgn,
- // so we don't need to call DeleteObject(hrgn)
- ::SetWindowRgn(window, hrgn, FALSE);
-
- unsigned long flags = 0;
- if (visible)
- flags |= SWP_SHOWWINDOW;
- else
- flags |= SWP_HIDEWINDOW;
-
- ::SetWindowPos(window,
- NULL,
- window_rect.x(),
- window_rect.y(),
- window_rect.width(),
- window_rect.height(),
- flags);
-}
-
bool BrowserWebPluginDelegateImpl::WindowedReposition(
const gfx::Rect& window_rect,
- const gfx::Rect& clip_rect,
- const std::vector& cutout_rects,
- bool visible) {
+ const gfx::Rect& clip_rect) {
if (!windowed_handle_) {
NOTREACHED();
return false;
}
- if (window_rect_ == window_rect && clip_rect_ == clip_rect &&
- cutout_rects == cutout_rects_ &&
- initial_plugin_resize_done_)
+ if (window_rect_ == window_rect && clip_rect_ == clip_rect)
return false;
+ // Clipping is handled by WebPlugin.
+ if (window_rect.size() != window_rect_.size()) {
+ ::SetWindowPos(windowed_handle_,
+ NULL,
+ 0,
+ 0,
+ window_rect.width(),
+ window_rect.height(),
+ SWP_SHOWWINDOW);
+ }
+
window_rect_ = window_rect;
clip_rect_ = clip_rect;
- cutout_rects_ = cutout_rects;
-
- if (!initial_plugin_resize_done_) {
- // We need to ensure that the plugin process continues to reposition
- // the plugin window until we receive an indication that it is now visible.
- // Subsequent repositions will be done by the browser.
- if (visible)
- initial_plugin_resize_done_ = true;
- // We created the window with 0 width and height since we didn't know it
- // at the time. Now that we know the geometry, we we can update its size
- // since the browser only calls SetWindowPos when scrolling occurs.
- MoveWindow(windowed_handle_, window_rect, clip_rect, cutout_rects, visible);
- // Ensure that the entire window gets repainted.
- ::InvalidateRect(windowed_handle_, NULL, FALSE);
- }
+
+ // Ensure that the entire window gets repainted.
+ ::InvalidateRect(windowed_handle_, NULL, FALSE);
return true;
}
diff --git a/libcef/plugins/browser_webplugin_delegate_impl.h b/libcef/plugins/browser_webplugin_delegate_impl.h
index b26954bcb..358bd26f1 100644
--- a/libcef/plugins/browser_webplugin_delegate_impl.h
+++ b/libcef/plugins/browser_webplugin_delegate_impl.h
@@ -47,14 +47,12 @@ class BrowserWebPluginDelegateImpl : public WebPluginDelegate {
WebPlugin* plugin,
bool load_manually);
virtual void UpdateGeometry(const gfx::Rect& window_rect,
- const gfx::Rect& clip_rect,
- const std::vector& cutout_rects,
- bool visible);
+ const gfx::Rect& clip_rect);
virtual void Paint(HDC hdc, const gfx::Rect& rect);
virtual void Print(HDC hdc);
virtual void SetFocus(); // only called when windowless
// only called when windowless
- virtual bool HandleEvent(NPEvent* event,
+ virtual bool HandleEvent(NPEvent* event,
WebCursor* cursor);
virtual NPObject* GetPluginScriptableObject();
virtual void DidFinishLoadWithReason(NPReason reason);
@@ -62,9 +60,9 @@ class BrowserWebPluginDelegateImpl : public WebPluginDelegate {
virtual void FlushGeometryUpdates() {
}
- virtual void SendJavaScriptStream(const std::string& url,
- const std::wstring& result,
- bool success, bool notify_needed,
+ virtual void SendJavaScriptStream(const std::string& url,
+ const std::wstring& result,
+ bool success, bool notify_needed,
int notify_data);
virtual void DidReceiveManualResponse(const std::string& url,
const std::string& mime_type,
@@ -97,16 +95,11 @@ class BrowserWebPluginDelegateImpl : public WebPluginDelegate {
PLUGIN_QUIRK_DIE_AFTER_UNLOAD = 32,
PLUGIN_QUIRK_PATCH_TRACKPOPUP_MENU = 64,
PLUGIN_QUIRK_PATCH_SETCURSOR = 128,
+ PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS = 256,
};
int quirks() { return quirks_; }
- static void MoveWindow(HWND window,
- const gfx::Rect& window_rect,
- const gfx::Rect& clip_rect,
- const std::vector& cutout_rects,
- bool visible);
-
private:
BrowserWebPluginDelegateImpl(gfx::NativeView containing_view,
NPAPI::BrowserPluginInstance *instance);
@@ -115,9 +108,7 @@ class BrowserWebPluginDelegateImpl : public WebPluginDelegate {
//--------------------------
// used for windowed plugins
void WindowedUpdateGeometry(const gfx::Rect& window_rect,
- const gfx::Rect& clip_rect,
- const std::vector& cutout_rects,
- bool visible);
+ const gfx::Rect& clip_rect);
// Create the native window.
// Returns true if the window is created (or already exists).
// Returns false if unable to create the window.
@@ -129,9 +120,7 @@ class BrowserWebPluginDelegateImpl : public WebPluginDelegate {
// Reposition the native window to be in sync with the given geometry.
// Returns true if the native window has moved or been clipped differently.
bool WindowedReposition(const gfx::Rect& window_rect,
- const gfx::Rect& clip_rect,
- const std::vector& cutout_rects,
- bool visible);
+ const gfx::Rect& clip_rect);
// Tells the plugin about the current state of the window.
// See NPAPI NPP_SetWindow for more information.
@@ -204,11 +193,6 @@ class BrowserWebPluginDelegateImpl : public WebPluginDelegate {
std::vector cutout_rects_;
int quirks_;
- // We only move/size the plugin window once after its creation. The
- // rest of the moves are controlled by the browser. This flag controls
- // this behaviour.
- bool initial_plugin_resize_done_;
-
// Windowless plugins don't have keyboard focus causing issues with the
// plugin not receiving keyboard events if the plugin enters a modal
// loop like TrackPopupMenuEx or MessageBox, etc.