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

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: Rebased, removed unnecessary border colors, etc. 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..72bbb57701cee8c503a2c4f393debdc98840ebda 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,28 +69,28 @@ 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();
}
int borderTopWidth() const
{
- if (!m_image.hasImage() && (m_top.style() == BNONE || m_top.style() == BHIDDEN))
+ if (m_top.style() == BNONE || m_top.style() == BHIDDEN)
return 0;
return m_top.width();
}
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