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

Unified Diff: Source/core/dom/Document.cpp

Issue 183893021: Add use counter for UTF-16 as a Web-exposed encoding Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 6 years, 10 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 | « no previous file | Source/core/frame/UseCounter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 90ef2a3dccc00b3c3b50bca35a02a9f08b7bb837..a09bd98bd1d203f9b4fbef163e96d59c14757cbd 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -4117,6 +4117,11 @@ void Document::setEncodingData(const DocumentEncodingData& newData)
m_encodingData = newData;
+ if (m_encodingData.encoding() == UTF16LittleEndianEncoding()
+ || m_encodingData.encoding() == UTF16BigEndianEncoding()) {
+ UseCounter::count(this, UseCounter::UTF16AsWebExposedEncoding);
+ }
+
// FIXME: Should be removed as part of https://code.google.com/p/chromium/issues/detail?id=319643
bool shouldUseVisualOrdering = m_encodingData.encoding().usesVisualOrdering();
if (shouldUseVisualOrdering != m_visuallyOrdered) {
« no previous file with comments | « no previous file | Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698