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

Unified Diff: third_party/WebKit/Source/core/svg/SVGRect.cpp

Issue 2037573002: Empty SVG viewbox should be treated invalid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added parsingError Created 4 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 | « third_party/WebKit/LayoutTests/svg/custom/empty-viewbox-attr-expected.svg ('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/svg/SVGRect.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGRect.cpp b/third_party/WebKit/Source/core/svg/SVGRect.cpp
index 37149e65f89e358ea3ff12f8e844236cefdcdc8a..aea18f0ab95ee8e00577fde90cfb05132aa6578d 100644
--- a/third_party/WebKit/Source/core/svg/SVGRect.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGRect.cpp
@@ -75,11 +75,8 @@ SVGParsingError SVGRect::setValueAsString(const String& string)
if (string.isNull())
return SVGParseStatus::NoError;
- if (string.isEmpty()) {
- m_value = FloatRect(0.0f, 0.0f, 0.0f, 0.0f);
- m_isValid = true;
- return SVGParseStatus::NoError;
- }
+ if (string.isEmpty())
+ return SVGParsingError(SVGParseStatus::ExpectedNumber, 0);
if (string.is8Bit()) {
const LChar* ptr = string.characters8();
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/custom/empty-viewbox-attr-expected.svg ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698