Title: [229564] trunk/Source/WebCore
Revision
229564
Author
bb...@apple.com
Date
2018-03-12 16:46:06 -0700 (Mon, 12 Mar 2018)

Log Message

Ignore some deprecation warnings encountered when compiling with newer versions of ICU
https://bugs.webkit.org/show_bug.cgi?id=183584
<rdar://problem/38395317>

Reviewed by Daniel Bates.

Ignore new deprecation warnings. Where a function has more than one
deprecation warning, mark out the entire function so it remains readable.

* editing/TextIterator.cpp:
* platform/graphics/SurrogatePairAwareTextIterator.cpp:
(WebCore::SurrogatePairAwareTextIterator::normalizeVoicingMarks):
* platform/text/TextEncoding.cpp:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (229563 => 229564)


--- trunk/Source/WebCore/ChangeLog	2018-03-12 23:28:45 UTC (rev 229563)
+++ trunk/Source/WebCore/ChangeLog	2018-03-12 23:46:06 UTC (rev 229564)
@@ -1,3 +1,19 @@
+2018-03-12  Brian Burg  <bb...@apple.com>
+
+        Ignore some deprecation warnings encountered when compiling with newer versions of ICU
+        https://bugs.webkit.org/show_bug.cgi?id=183584
+        <rdar://problem/38395317>
+
+        Reviewed by Daniel Bates.
+
+        Ignore new deprecation warnings. Where a function has more than one
+        deprecation warning, mark out the entire function so it remains readable.
+
+        * editing/TextIterator.cpp:
+        * platform/graphics/SurrogatePairAwareTextIterator.cpp:
+        (WebCore::SurrogatePairAwareTextIterator::normalizeVoicingMarks):
+        * platform/text/TextEncoding.cpp:
+
 2018-03-12  Yoav Weiss  <y...@yoav.ws>
 
         Runtime flag for link prefetch and remove link subresource.

Modified: trunk/Source/WebCore/editing/TextIterator.cpp (229563 => 229564)


--- trunk/Source/WebCore/editing/TextIterator.cpp	2018-03-12 23:28:45 UTC (rev 229563)
+++ trunk/Source/WebCore/editing/TextIterator.cpp	2018-03-12 23:46:06 UTC (rev 229564)
@@ -1999,6 +1999,12 @@
     return false;
 }
 
+#if COMPILER(CLANG)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+// NOTE: ICU's unorm_normalize function is deprecated in some SDKs.
+
 static void normalizeCharacters(const UChar* characters, unsigned length, Vector<UChar>& buffer)
 {
     ASSERT(length);
@@ -2020,6 +2026,10 @@
     ASSERT(status == U_STRING_NOT_TERMINATED_WARNING);
 }
 
+#if COMPILER(CLANG)
+#pragma clang diagnostic pop
+#endif
+
 static bool isNonLatin1Separator(UChar32 character)
 {
     ASSERT_ARG(character, character >= 256);

Modified: trunk/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp (229563 => 229564)


--- trunk/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp	2018-03-12 23:28:45 UTC (rev 229563)
+++ trunk/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp	2018-03-12 23:46:06 UTC (rev 229564)
@@ -69,6 +69,12 @@
     return true;
 }
 
+#if COMPILER(CLANG)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+// NOTE: ICU's unorm_normalize function is deprecated in some SDKs.
+
 UChar32 SurrogatePairAwareTextIterator::normalizeVoicingMarks()
 {
     // According to http://www.unicode.org/Public/UNIDATA/UCD.html#Canonical_Combining_Class_Values
@@ -89,4 +95,8 @@
     return 0;
 }
 
+#if COMPILER(CLANG)
+#pragma clang diagnostic pop
+#endif
+
 }

Modified: trunk/Source/WebCore/platform/text/TextEncoding.cpp (229563 => 229564)


--- trunk/Source/WebCore/platform/text/TextEncoding.cpp	2018-03-12 23:28:45 UTC (rev 229563)
+++ trunk/Source/WebCore/platform/text/TextEncoding.cpp	2018-03-12 23:46:06 UTC (rev 229564)
@@ -69,6 +69,12 @@
     return newTextCodec(*this)->decode(data, length, true, stopOnError, sawError);
 }
 
+#if COMPILER(CLANG)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+// NOTE: ICU's unorm_quickCheck and unorm_normalize functions are deprecated in some SDKs.
+
 Vector<uint8_t> TextEncoding::encode(StringView text, UnencodableHandling handling) const
 {
     if (!m_name || text.isEmpty())
@@ -106,6 +112,10 @@
     return newTextCodec(*this)->encode(StringView { source, sourceLength }, handling);
 }
 
+#if COMPILER(CLANG)
+#pragma clang diagnostic pop
+#endif
+
 const char* TextEncoding::domName() const
 {
     if (noExtendedTextEncodingNameUsed())
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to