| Index: Source/core/rendering/RenderBoxModelObject.cpp
|
| diff --git a/Source/core/rendering/RenderBoxModelObject.cpp b/Source/core/rendering/RenderBoxModelObject.cpp
|
| index 3917086023c2ddb19338130cb5ab893e5845337e..aada21668d2aeabe3d149fa3e8ad5fe5988748ad 100644
|
| --- a/Source/core/rendering/RenderBoxModelObject.cpp
|
| +++ b/Source/core/rendering/RenderBoxModelObject.cpp
|
| @@ -556,14 +556,14 @@ void RenderBoxModelObject::paintFillLayerExtended(const PaintInfo& paintInfo, co
|
| // while rendering.)
|
| if (forceBackgroundToWhite) {
|
| // Note that we can't reuse this variable below because the bgColor might be changed
|
| - bool shouldPaintBackgroundColor = !bgLayer->next() && bgColor.alpha();
|
| + bool shouldPaintBackgroundColor = !bgLayer->next() && bgColor.isValid() && bgColor.alpha();
|
| if (shouldPaintBackgroundImage || shouldPaintBackgroundColor) {
|
| bgColor = Color::white;
|
| shouldPaintBackgroundImage = false;
|
| }
|
| }
|
|
|
| - bool colorVisible = bgColor.alpha();
|
| + bool colorVisible = bgColor.isValid() && bgColor.alpha();
|
|
|
| // Fast path for drawing simple color backgrounds.
|
| if (!isRoot && !clippedWithLocalScrolling && !shouldPaintBackgroundImage && isBorderFill && !bgLayer->next()) {
|
| @@ -673,7 +673,7 @@ void RenderBoxModelObject::paintFillLayerExtended(const PaintInfo& paintInfo, co
|
| bool isOpaqueRoot = false;
|
| if (isRoot) {
|
| isOpaqueRoot = true;
|
| - if (!bgLayer->next() && !(bgColor.alpha() == 255) && view()->frameView()) {
|
| + if (!bgLayer->next() && !(bgColor.isValid() && bgColor.alpha() == 255) && view()->frameView()) {
|
| Element* ownerElement = document().ownerElement();
|
| if (ownerElement) {
|
| if (!ownerElement->hasTagName(frameTag)) {
|
| @@ -2401,7 +2401,7 @@ bool RenderBoxModelObject::boxShadowShouldBeAppliedToBackground(BackgroundBleedA
|
| return false;
|
|
|
| Color backgroundColor = resolveColor(CSSPropertyBackgroundColor);
|
| - if (backgroundColor.hasAlpha())
|
| + if (!backgroundColor.isValid() || backgroundColor.hasAlpha())
|
| return false;
|
|
|
| const FillLayer* lastBackgroundLayer = style()->backgroundLayers();
|
| @@ -2463,7 +2463,7 @@ void RenderBoxModelObject::paintBoxShadow(const PaintInfo& info, const LayoutRec
|
| if (shadowOffset.isZero() && !shadowBlur && !shadowSpread)
|
| continue;
|
|
|
| - const Color& shadowColor = resolveColor(shadow->color(), Color::stdShadowColor);
|
| + const Color& shadowColor = resolveColor(shadow->color());
|
|
|
| if (shadow->style() == Normal) {
|
| RoundedRect fillRect = border;
|
|
|