mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-03-26 08:50:17 +01:00
parent
36668efc2f
commit
0ac37cefa1
@ -135,9 +135,10 @@ CefWebContentsViewOSR::CreateViewForPopupWidget(
|
|||||||
void CefWebContentsViewOSR::SetPageTitle(const base::string16& title) {}
|
void CefWebContentsViewOSR::SetPageTitle(const base::string16& title) {}
|
||||||
|
|
||||||
void CefWebContentsViewOSR::RenderViewCreated(content::RenderViewHost* host) {
|
void CefWebContentsViewOSR::RenderViewCreated(content::RenderViewHost* host) {
|
||||||
// |view| will be nullptr the first time this method is called for popup
|
if (!host)
|
||||||
// browsers.
|
return;
|
||||||
CefRenderWidgetHostViewOSR* view = GetView();
|
CefRenderWidgetHostViewOSR* view =
|
||||||
|
static_cast<CefRenderWidgetHostViewOSR*>(host->GetWidget()->GetView());
|
||||||
if (view)
|
if (view)
|
||||||
view->InstallTransparency();
|
view->InstallTransparency();
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,9 @@ patches = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
# Enable popups in offscreen rendering on OS X.
|
# Enable popups in offscreen rendering on OS X.
|
||||||
|
#
|
||||||
|
# Allow customization of the WebView background color.
|
||||||
|
# https://bitbucket.org/chromiumembedded/cef/issues/2345
|
||||||
'name': 'webkit_popups',
|
'name': 'webkit_popups',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -35,15 +35,14 @@ index 49be57cd2aad..417be7a55184 100644
|
|||||||
bool record_whole_document;
|
bool record_whole_document;
|
||||||
SavePreviousDocumentResources save_previous_document_resources;
|
SavePreviousDocumentResources save_previous_document_resources;
|
||||||
diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc
|
diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc
|
||||||
index 1d136aa56ff4..23c00d73b8ed 100644
|
index 1d136aa56ff4..2151ad629dd9 100644
|
||||||
--- content/renderer/render_view_impl.cc
|
--- content/renderer/render_view_impl.cc
|
||||||
+++ content/renderer/render_view_impl.cc
|
+++ content/renderer/render_view_impl.cc
|
||||||
@@ -1261,6 +1261,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
|
@@ -1261,6 +1261,7 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
|
||||||
blink::WebView* web_view,
|
blink::WebView* web_view,
|
||||||
CompositorDependencies* compositor_deps) {
|
CompositorDependencies* compositor_deps) {
|
||||||
ApplyWebPreferences(prefs, web_view);
|
ApplyWebPreferences(prefs, web_view);
|
||||||
+ if (GetWebFrameWidget())
|
+ web_view->SetBaseBackgroundColor(prefs.base_background_color);
|
||||||
+ GetWebFrameWidget()->SetBaseBackgroundColor(prefs.base_background_color);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderViewImpl::OnForceRedraw(const ui::LatencyInfo& latency_info) {
|
void RenderViewImpl::OnForceRedraw(const ui::LatencyInfo& latency_info) {
|
||||||
|
@ -27,7 +27,7 @@ index d0c5134a2ad6..1434134d4212 100644
|
|||||||
suppress_next_keypress_event_(false),
|
suppress_next_keypress_event_(false),
|
||||||
ime_accept_events_(true),
|
ime_accept_events_(true),
|
||||||
diff --git third_party/WebKit/Source/core/exported/WebViewImpl.h third_party/WebKit/Source/core/exported/WebViewImpl.h
|
diff --git third_party/WebKit/Source/core/exported/WebViewImpl.h third_party/WebKit/Source/core/exported/WebViewImpl.h
|
||||||
index 79a702679fec..f50dca632eb4 100644
|
index 79a702679fec..babc626a91bf 100644
|
||||||
--- third_party/WebKit/Source/core/exported/WebViewImpl.h
|
--- third_party/WebKit/Source/core/exported/WebViewImpl.h
|
||||||
+++ third_party/WebKit/Source/core/exported/WebViewImpl.h
|
+++ third_party/WebKit/Source/core/exported/WebViewImpl.h
|
||||||
@@ -107,7 +107,8 @@ class CORE_EXPORT WebViewImpl final
|
@@ -107,7 +107,8 @@ class CORE_EXPORT WebViewImpl final
|
||||||
@ -40,6 +40,15 @@ index 79a702679fec..f50dca632eb4 100644
|
|||||||
|
|
||||||
// WebWidget methods:
|
// WebWidget methods:
|
||||||
void Close() override;
|
void Close() override;
|
||||||
|
@@ -256,7 +257,7 @@ class CORE_EXPORT WebViewImpl final
|
||||||
|
HitTestResult CoreHitTestResultAt(const WebPoint&);
|
||||||
|
void InvalidateRect(const IntRect&);
|
||||||
|
|
||||||
|
- void SetBaseBackgroundColor(WebColor);
|
||||||
|
+ void SetBaseBackgroundColor(WebColor) override;
|
||||||
|
void SetBaseBackgroundColorOverride(WebColor);
|
||||||
|
void ClearBaseBackgroundColorOverride();
|
||||||
|
void SetBackgroundColorOverride(WebColor);
|
||||||
@@ -608,6 +609,8 @@ class CORE_EXPORT WebViewImpl final
|
@@ -608,6 +609,8 @@ class CORE_EXPORT WebViewImpl final
|
||||||
float fake_page_scale_animation_page_scale_factor_;
|
float fake_page_scale_animation_page_scale_factor_;
|
||||||
bool fake_page_scale_animation_use_anchor_;
|
bool fake_page_scale_animation_use_anchor_;
|
||||||
@ -63,7 +72,7 @@ index 98618289cfab..ec154753a350 100644
|
|||||||
|
|
||||||
DCHECK(RuntimeEnabledFeatures::PagePopupEnabled());
|
DCHECK(RuntimeEnabledFeatures::PagePopupEnabled());
|
||||||
diff --git third_party/WebKit/public/web/WebView.h third_party/WebKit/public/web/WebView.h
|
diff --git third_party/WebKit/public/web/WebView.h third_party/WebKit/public/web/WebView.h
|
||||||
index 8f30d3c30bac..6d156c7837fb 100644
|
index 8f30d3c30bac..062ae5e643bb 100644
|
||||||
--- third_party/WebKit/public/web/WebView.h
|
--- third_party/WebKit/public/web/WebView.h
|
||||||
+++ third_party/WebKit/public/web/WebView.h
|
+++ third_party/WebKit/public/web/WebView.h
|
||||||
@@ -360,6 +360,7 @@ class WebView : protected WebWidget {
|
@@ -360,6 +360,7 @@ class WebView : protected WebWidget {
|
||||||
@ -74,3 +83,12 @@ index 8f30d3c30bac..6d156c7837fb 100644
|
|||||||
|
|
||||||
// Hides any popup (suggestions, selects...) that might be showing.
|
// Hides any popup (suggestions, selects...) that might be showing.
|
||||||
virtual void HidePopups() = 0;
|
virtual void HidePopups() = 0;
|
||||||
|
@@ -390,6 +391,8 @@ class WebView : protected WebWidget {
|
||||||
|
unsigned inactive_background_color,
|
||||||
|
unsigned inactive_foreground_color) = 0;
|
||||||
|
|
||||||
|
+ virtual void SetBaseBackgroundColor(WebColor color) = 0;
|
||||||
|
+
|
||||||
|
// Modal dialog support ------------------------------------------------
|
||||||
|
|
||||||
|
// Call these methods before and after running a nested, modal event loop
|
||||||
|
Loading…
x
Reference in New Issue
Block a user