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

Unified Diff: Source/core/svg/SVGTextContentElement.cpp

Issue 890863003: Add UseCounters for the use of xml:lang in SVG (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | « Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGTextContentElement.cpp
diff --git a/Source/core/svg/SVGTextContentElement.cpp b/Source/core/svg/SVGTextContentElement.cpp
index 71feecf0996a0ccf1d26d1ce19397f2c5b42d39a..d40577362b9579447df9d77a5a76537a94a67b1f 100644
--- a/Source/core/svg/SVGTextContentElement.cpp
+++ b/Source/core/svg/SVGTextContentElement.cpp
@@ -30,6 +30,7 @@
#include "core/XMLNames.h"
#include "core/editing/FrameSelection.h"
#include "core/frame/LocalFrame.h"
+#include "core/frame/UseCounter.h"
#include "core/rendering/RenderObject.h"
#include "core/rendering/svg/SVGTextQuery.h"
@@ -224,10 +225,13 @@ void SVGTextContentElement::collectStyleForPresentationAttribute(const Qualified
else if (name.matches(XMLNames::spaceAttr)) {
DEFINE_STATIC_LOCAL(const AtomicString, preserveString, ("preserve", AtomicString::ConstructFromLiteral));
- if (value == preserveString)
+ if (value == preserveString) {
+ UseCounter::count(document(), UseCounter::WhiteSpacePreFromXMLSpace);
addPropertyToPresentationAttributeStyle(style, CSSPropertyWhiteSpace, CSSValuePre);
- else
+ } else {
+ UseCounter::count(document(), UseCounter::WhiteSpaceNowrapFromXMLSpace);
addPropertyToPresentationAttributeStyle(style, CSSPropertyWhiteSpace, CSSValueNowrap);
+ }
}
}
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698