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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 1731373002: Allow to have a transparent UA dependent background. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Decouple background color and transparency in RenderWidgetHostView Created 4 years, 10 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
« cc/layers/picture_layer_impl.cc ('K') | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index d125094d9487110782a9e6e574d0efdd50706ff8..e86f79c4598c9c7b5ba0db48390003874bdf9027 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1285,8 +1285,10 @@ bool LayoutBox::getBackgroundPaintedExtent(LayoutRect& paintedExtent) const
bool LayoutBox::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const
{
+ // Instead of returning false unconditionnaly for the document, check if it
+ // is transparent.
if (isDocumentElement() || backgroundStolenForBeingBody())
- return false;
+ return !isTransparent();
trchen 2016/03/08 01:57:21 This change is incorrect. The document element ind
Color backgroundColor = resolveColor(CSSPropertyBackgroundColor);
if (backgroundColor.hasAlpha())
« cc/layers/picture_layer_impl.cc ('K') | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698