diff options
author | jbeich <jbeich@FreeBSD.org> | 2016-11-20 09:23:58 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2016-11-20 09:23:58 +0800 |
commit | 28e2900df0d6533e99fdfa0d9390b95ac28da350 (patch) | |
tree | d04d33dbfebdd6308b461528ddbeed32d047d45b /www/firefox | |
parent | 0d17761b576e8b326246525569b3d406b3ffc004 (diff) | |
download | freebsd-ports-gnome-28e2900df0d6533e99fdfa0d9390b95ac28da350.tar.gz freebsd-ports-gnome-28e2900df0d6533e99fdfa0d9390b95ac28da350.tar.zst freebsd-ports-gnome-28e2900df0d6533e99fdfa0d9390b95ac28da350.zip |
www/firefox: handle more line break classes after r426525
PR: 214384 (for tracking)
Obtained from: upstream + martin@NetBSD
Security: cargo cult
Diffstat (limited to 'www/firefox')
-rw-r--r-- | www/firefox/Makefile | 2 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1315986 | 49 |
2 files changed, 50 insertions, 1 deletions
diff --git a/www/firefox/Makefile b/www/firefox/Makefile index a963e9df8218..5e0290e1afa3 100644 --- a/www/firefox/Makefile +++ b/www/firefox/Makefile @@ -4,7 +4,7 @@ PORTNAME= firefox DISTVERSION= 50.0 DISTVERSIONSUFFIX=.source -PORTREVISION= 3 +PORTREVISION= 4 PORTEPOCH= 1 CATEGORIES= www ipv6 MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ diff --git a/www/firefox/files/patch-bug1315986 b/www/firefox/files/patch-bug1315986 new file mode 100644 index 000000000000..3d5e81bf2584 --- /dev/null +++ b/www/firefox/files/patch-bug1315986 @@ -0,0 +1,49 @@ +commit c0d2685148b5 +Author: Jonathan Kew <jkew@mozilla.com> +Date: Wed Nov 9 15:07:54 2016 +0000 + + Bug 1315986 - Update line-break class mapping in nsJISx4051LineBreaker to handle new classes in ICU58/Unicode 9, and add assertions to detect any future additions that will require further updates. r=masayuki +--- + intl/lwbrk/nsJISx4051LineBreaker.cpp | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git intl/lwbrk/nsJISx4051LineBreaker.cpp intl/lwbrk/nsJISx4051LineBreaker.cpp +index 0d89e91..1b262fa 100644 +--- intl/lwbrk/nsJISx4051LineBreaker.cpp ++++ intl/lwbrk/nsJISx4051LineBreaker.cpp +@@ -12,6 +12,10 @@ + #include "nsTArray.h" + #include "nsUnicodeProperties.h" + ++#if ENABLE_INTL_API ++#include "unicode/uchar.h" // for U_LB_COUNT until bug 1305700 ++#endif ++ + /* + + Simplification of Pair Table in JIS X 4051 +@@ -547,10 +551,22 @@ GetClass(uint32_t u) + /* CLOSE_PARENTHESIS = 36, [CP] */ CLASS_CLOSE_LIKE_CHARACTER, + /* CONDITIONAL_JAPANESE_STARTER = 37, [CJ] */ CLASS_CLOSE, + /* HEBREW_LETTER = 38, [HL] */ CLASS_CHARACTER, +- /* REGIONAL_INDICATOR = 39, [RI] */ CLASS_CHARACTER ++ /* REGIONAL_INDICATOR = 39, [RI] */ CLASS_CHARACTER, ++#if U_ICU_VERSION_MAJOR_NUM > 57 ++ /* E_BASE = 40, [EB] */ CLASS_BREAKABLE, ++ /* E_MODIFIER = 41, [EM] */ CLASS_CHARACTER, ++ /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER, ++#endif + }; + +- return sUnicodeLineBreakToClass[mozilla::unicode::GetLineBreakClass(u)]; ++#if ENABLE_INTL_API ++ static_assert(U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass), ++ "Gecko vs ICU LineBreak class mismatch"); ++#endif ++ ++ auto cls = mozilla::unicode::GetLineBreakClass(u); ++ MOZ_ASSERT(cls < mozilla::ArrayLength(sUnicodeLineBreakToClass)); ++ return sUnicodeLineBreakToClass[cls]; + } + + static bool |