Skip to content
Permalink
Browse files
Ignore some deprecation warnings encountered when compiling with newe…
…r 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:

Canonical link: https://commits.webkit.org/199251@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
burg committed Mar 12, 2018
1 parent 103c676 commit 2a1f22d01ab042a404548e9a88f2aabed31a03b5
Showing 4 changed files with 46 additions and 0 deletions.
@@ -1,3 +1,19 @@
2018-03-12 Brian Burg <bburg@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 <yoav@yoav.ws>

Runtime flag for link prefetch and remove link subresource.
@@ -1999,6 +1999,12 @@ static inline bool containsKanaLetters(const String& pattern)
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 @@ static void normalizeCharacters(const UChar* characters, unsigned length, Vector
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);
@@ -69,6 +69,12 @@ bool SurrogatePairAwareTextIterator::consumeSlowCase(UChar32& character, unsigne
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 @@ UChar32 SurrogatePairAwareTextIterator::normalizeVoicingMarks()
return 0;
}

#if COMPILER(CLANG)
#pragma clang diagnostic pop
#endif

}
@@ -69,6 +69,12 @@ String TextEncoding::decode(const char* data, size_t length, bool stopOnError, b
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 @@ Vector<uint8_t> TextEncoding::encode(StringView text, UnencodableHandling handli
return newTextCodec(*this)->encode(StringView { source, sourceLength }, handling);
}

#if COMPILER(CLANG)
#pragma clang diagnostic pop
#endif

const char* TextEncoding::domName() const
{
if (noExtendedTextEncodingNameUsed())

0 comments on commit 2a1f22d

Please sign in to comment.