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

Unified Diff: third_party/WebKit/Source/core/html/HTMLAreaElement.cpp

Issue 1631303002: Negative or zero radius for <area shape=circle> gives an empty shape (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « third_party/WebKit/LayoutTests/fast/html/area-processing-expected.txt ('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/html/HTMLAreaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLAreaElement.cpp b/third_party/WebKit/Source/core/html/HTMLAreaElement.cpp
index 1c096e2a2880d63decc0c9150b421cf4e5db70a9..cf0c5c1ecba4dfbcf563a94c3c34d3a529091b7f 100644
--- a/third_party/WebKit/Source/core/html/HTMLAreaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLAreaElement.cpp
@@ -160,7 +160,7 @@ Path HTMLAreaElement::getRegion(const LayoutSize& size) const
}
break;
case Circle:
- if (m_coords.size() >= 3) {
+ if (m_coords.size() >= 3 && m_coords[2].value() > 0) {
float r = clampCoordinate(m_coords[2]);
path.addEllipse(FloatRect(clampCoordinate(m_coords[0]) - r, clampCoordinate(m_coords[1]) - r, 2 * r, 2 * r));
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/html/area-processing-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698