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

Unified Diff: third_party/WebKit/Source/core/style/BorderData.h

Issue 1457323004: Don't render border images when border-style is none (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
Index: third_party/WebKit/Source/core/style/BorderData.h
diff --git a/third_party/WebKit/Source/core/style/BorderData.h b/third_party/WebKit/Source/core/style/BorderData.h
index 2e1dc4a1ed94c27dea0b11f3f0ca08b87da61a9c..760388b9a80379c300f9bb216d43a8062594ee16 100644
--- a/third_party/WebKit/Source/core/style/BorderData.h
+++ b/third_party/WebKit/Source/core/style/BorderData.h
@@ -46,8 +46,7 @@ public:
bool hasBorder() const
{
- bool haveImage = m_image.hasImage();
- return m_left.nonZero(!haveImage) || m_right.nonZero(!haveImage) || m_top.nonZero(!haveImage) || m_bottom.nonZero(!haveImage);
+ return m_left.nonZero() || m_right.nonZero() || m_top.nonZero() || m_bottom.nonZero();
}
bool hasBorderFill() const
@@ -70,14 +69,14 @@ public:
int borderLeftWidth() const
{
- if (!m_image.hasImage() && (m_left.style() == BNONE || m_left.style() == BHIDDEN))
+ if (m_left.style() == BNONE || m_left.style() == BHIDDEN)
return 0;
return m_left.width();
}
int borderRightWidth() const
{
- if (!m_image.hasImage() && (m_right.style() == BNONE || m_right.style() == BHIDDEN))
+ if (m_right.style() == BNONE || m_right.style() == BHIDDEN)
return 0;
return m_right.width();
}
@@ -91,7 +90,7 @@ public:
int borderBottomWidth() const
{
- if (!m_image.hasImage() && (m_bottom.style() == BNONE || m_bottom.style() == BHIDDEN))
+ if (m_bottom.style() == BNONE || m_bottom.style() == BHIDDEN)
return 0;
return m_bottom.width();
}

Powered by Google App Engine
This is Rietveld 408576698