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

Unified Diff: Source/core/style/BorderEdge.cpp

Issue 1173663003: BoxBorderPainter should use computed color alpha (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | « Source/core/style/BorderEdge.h ('k') | Source/core/style/ComputedStyle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/style/BorderEdge.cpp
diff --git a/Source/core/style/BorderEdge.cpp b/Source/core/style/BorderEdge.cpp
index fcfb8fca6cbccf5c6c44e494721991c6c3f82c0a..17d50b5dfd34ecbaf9a40d7f7824765b5e05e706 100644
--- a/Source/core/style/BorderEdge.cpp
+++ b/Source/core/style/BorderEdge.cpp
@@ -7,10 +7,9 @@
namespace blink {
-BorderEdge::BorderEdge(int edgeWidth, const Color& edgeColor, EBorderStyle edgeStyle, bool edgeIsTransparent, bool edgeIsPresent)
+BorderEdge::BorderEdge(int edgeWidth, const Color& edgeColor, EBorderStyle edgeStyle, bool edgeIsPresent)
: width(edgeWidth)
, color(edgeColor)
- , isTransparent(edgeIsTransparent)
, isPresent(edgeIsPresent)
, style(edgeStyle)
{
@@ -20,7 +19,6 @@ BorderEdge::BorderEdge(int edgeWidth, const Color& edgeColor, EBorderStyle edgeS
BorderEdge::BorderEdge()
: width(0)
- , isTransparent(false)
, isPresent(false)
, style(BHIDDEN)
{
@@ -28,7 +26,7 @@ BorderEdge::BorderEdge()
bool BorderEdge::hasVisibleColorAndStyle() const
{
- return style > BHIDDEN && !isTransparent;
+ return style > BHIDDEN && color.alpha() > 0;
}
bool BorderEdge::shouldRender() const
@@ -43,7 +41,7 @@ bool BorderEdge::presentButInvisible() const
bool BorderEdge::obscuresBackgroundEdge() const
{
- if (!isPresent || isTransparent || color.hasAlpha() || style == BHIDDEN)
+ if (!isPresent || color.hasAlpha() || style == BHIDDEN)
return false;
if (style == DOTTED || style == DASHED)
@@ -54,7 +52,7 @@ bool BorderEdge::obscuresBackgroundEdge() const
bool BorderEdge::obscuresBackground() const
{
- if (!isPresent || isTransparent || color.hasAlpha() || style == BHIDDEN)
+ if (!isPresent || color.hasAlpha() || style == BHIDDEN)
return false;
if (style == DOTTED || style == DASHED || style == DOUBLE)
« no previous file with comments | « Source/core/style/BorderEdge.h ('k') | Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698