Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Unified Diff: content/renderer/render_view_impl.cc

Issue 2784783002: DNS: Testing for [blink] Support (semi-)transparent background colors.
Patch Set: test with !hasAlpha instead of alpha > 0 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | third_party/WebKit/Source/core/frame/FrameView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 55d3c1eee9a7c16128b6da5741ca3d63e1deb01e..e553f04c27081f02fc651a3e735c48e11d55a365 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -164,6 +164,7 @@
#include "third_party/WebKit/public/web/WebWindowFeatures.h"
#include "third_party/icu/source/common/unicode/uchar.h"
#include "third_party/icu/source/common/unicode/uscript.h"
+#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/ui_base_switches_util.h"
#include "ui/events/latency_info.h"
#include "ui/gfx/geometry/point.h"
@@ -2251,10 +2252,16 @@ void RenderViewImpl::OnResize(const ResizeParams& params) {
}
void RenderViewImpl::OnSetBackgroundOpaque(bool opaque) {
- if (frame_widget_)
- frame_widget_->setIsTransparent(!opaque);
- if (compositor_)
- compositor_->setHasTransparentBackground(!opaque);
+ if (!frame_widget_)
+ return;
+
+ if (opaque) {
+ frame_widget_->clearBaseBackgroundColorOverride();
+ frame_widget_->clearBackgroundColorOverride();
+ } else {
+ frame_widget_->setBaseBackgroundColorOverride(SK_ColorTRANSPARENT);
+ frame_widget_->setBackgroundColorOverride(SK_ColorTRANSPARENT);
+ }
}
void RenderViewImpl::OnSetActive(bool active) {
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | third_party/WebKit/Source/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698