webkitgtk4 package update
Signed-off-by: basebuilder_pel7x64builder0 <basebuilder@powerel.org>master
parent
fd55289f03
commit
4bddd1ddf2
|
@ -0,0 +1,15 @@
|
|||
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
|
||||
index da25d96e35b5..242ce8c00eeb 100644
|
||||
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
|
||||
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
|
||||
@@ -381,6 +381,10 @@ static void webkitWebContextConstructed(GObject* object)
|
||||
const char* useSingleWebProcess = getenv("WEBKIT_USE_SINGLE_WEB_PROCESS");
|
||||
if (useSingleWebProcess && strcmp(useSingleWebProcess, "0"))
|
||||
configuration.setUsesSingleWebProcess(true);
|
||||
+ else {
|
||||
+ if (!g_strcmp0(g_get_prgname(), "evolution"))
|
||||
+ configuration.setUsesSingleWebProcess(true);
|
||||
+ }
|
||||
}
|
||||
#endif
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
diff -ru orig.icu/source/layout/IndicReordering.cpp icu/source/layout/IndicReordering.cpp
|
||||
--- orig.icu/source/layout/IndicReordering.cpp 2016-04-15 18:30:15.788856946 +0200
|
||||
+++ icu/source/layout/IndicReordering.cpp 2016-04-15 18:30:39.244998995 +0200
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
+#define ccmpFeatureTag LE_CCMP_FEATURE_TAG
|
||||
#define loclFeatureTag LE_LOCL_FEATURE_TAG
|
||||
#define initFeatureTag LE_INIT_FEATURE_TAG
|
||||
#define nuktFeatureTag LE_NUKT_FEATURE_TAG
|
||||
@@ -35,6 +36,7 @@
|
||||
#define caltFeatureTag LE_CALT_FEATURE_TAG
|
||||
#define kernFeatureTag LE_KERN_FEATURE_TAG
|
||||
|
||||
+#define ccmpFeatureMask 0x00000001UL
|
||||
#define loclFeatureMask 0x80000000UL
|
||||
#define rphfFeatureMask 0x40000000UL
|
||||
#define blwfFeatureMask 0x20000000UL
|
||||
@@ -73,7 +75,7 @@
|
||||
|
||||
#define repositionedGlyphMask 0x00000002UL
|
||||
|
||||
-#define basicShapingFormsMask ( loclFeatureMask | nuktFeatureMask | akhnFeatureMask | rkrfFeatureMask | blwfFeatureMask | halfFeatureMask | vatuFeatureMask | cjctFeatureMask )
|
||||
+#define basicShapingFormsMask ( ccmpFeatureMask | loclFeatureMask | nuktFeatureMask | akhnFeatureMask | rkrfFeatureMask | blwfFeatureMask | halfFeatureMask | vatuFeatureMask | cjctFeatureMask )
|
||||
#define positioningFormsMask ( kernFeatureMask | distFeatureMask | abvmFeatureMask | blwmFeatureMask )
|
||||
#define presentationFormsMask ( presFeatureMask | abvsFeatureMask | blwsFeatureMask | pstsFeatureMask | halnFeatureMask | caltFeatureMask )
|
||||
|
||||
@@ -484,6 +486,7 @@
|
||||
#define tagArray0 (rphfFeatureMask | tagArray1)
|
||||
|
||||
static const FeatureMap featureMap[] = {
|
||||
+ {ccmpFeatureTag, ccmpFeatureMask},
|
||||
{loclFeatureTag, loclFeatureMask},
|
||||
{initFeatureTag, initFeatureMask},
|
||||
{nuktFeatureTag, nuktFeatureMask},
|
||||
@@ -506,6 +509,7 @@
|
||||
static const le_int32 featureCount = LE_ARRAY_SIZE(featureMap);
|
||||
|
||||
static const FeatureMap v2FeatureMap[] = {
|
||||
+ {ccmpFeatureTag, ccmpFeatureMask},
|
||||
{loclFeatureTag, loclFeatureMask},
|
||||
{nuktFeatureTag, nuktFeatureMask},
|
||||
{akhnFeatureTag, akhnFeatureMask},
|
|
@ -0,0 +1,129 @@
|
|||
Index: icu/trunk/source/layout/IndicReordering.cpp
|
||||
===================================================================
|
||||
--- icu/trunk/source/layout/IndicReordering.cpp (revision 25772)
|
||||
+++ icu/trunk/source/layout/IndicReordering.cpp (revision 26090)
|
||||
@@ -126,4 +126,8 @@
|
||||
FeatureMask fSMFeatures;
|
||||
|
||||
+ LEUnicode fPreBaseConsonant;
|
||||
+ LEUnicode fPreBaseVirama;
|
||||
+ le_int32 fPBCIndex;
|
||||
+ FeatureMask fPBCFeatures;
|
||||
|
||||
void saveMatra(LEUnicode matra, le_int32 matraIndex, IndicClassTable::CharClass matraClass)
|
||||
@@ -172,5 +176,6 @@
|
||||
fMatraFeatures(0), fMPreOutIndex(-1), fMPreFixups(mpreFixups),
|
||||
fVMabove(0), fVMpost(0), fVMIndex(0), fVMFeatures(0),
|
||||
- fSMabove(0), fSMbelow(0), fSMIndex(0), fSMFeatures(0)
|
||||
+ fSMabove(0), fSMbelow(0), fSMIndex(0), fSMFeatures(0),
|
||||
+ fPreBaseConsonant(0), fPreBaseVirama(0), fPBCIndex(0), fPBCFeatures(0)
|
||||
{
|
||||
// nothing else to do...
|
||||
@@ -191,4 +196,6 @@
|
||||
fVMabove = fVMpost = 0;
|
||||
fSMabove = fSMbelow = 0;
|
||||
+
|
||||
+ fPreBaseConsonant = fPreBaseVirama = 0;
|
||||
}
|
||||
|
||||
@@ -386,4 +393,12 @@
|
||||
}
|
||||
|
||||
+ void notePreBaseConsonant(le_uint32 index,LEUnicode PBConsonant, LEUnicode PBVirama, FeatureMask features)
|
||||
+ {
|
||||
+ fPBCIndex = index;
|
||||
+ fPreBaseConsonant = PBConsonant;
|
||||
+ fPreBaseVirama = PBVirama;
|
||||
+ fPBCFeatures = features;
|
||||
+ }
|
||||
+
|
||||
void noteBaseConsonant()
|
||||
{
|
||||
@@ -465,4 +480,20 @@
|
||||
}
|
||||
|
||||
+ void writePreBaseConsonant()
|
||||
+ {
|
||||
+ // The TDIL spec says that consonant + virama + RRA should produce a rakar in Malayalam. However,
|
||||
+ // it seems that almost none of the fonts for Malayalam are set up to handle this.
|
||||
+ // So, we're going to force the issue here by using the rakar as defined with RA in most fonts.
|
||||
+
|
||||
+ if (fPreBaseConsonant == 0x0d31) { // RRA
|
||||
+ fPreBaseConsonant = 0x0d30; // RA
|
||||
+ }
|
||||
+
|
||||
+ if (fPreBaseConsonant != 0) {
|
||||
+ writeChar(fPreBaseConsonant, fPBCIndex, fPBCFeatures);
|
||||
+ writeChar(fPreBaseVirama,fPBCIndex-1,fPBCFeatures);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
le_int32 getOutputIndex()
|
||||
{
|
||||
@@ -723,4 +754,5 @@
|
||||
}
|
||||
|
||||
+
|
||||
IndicClassTable::CharClass charClass = CC_RESERVED;
|
||||
IndicClassTable::CharClass nextClass = CC_RESERVED;
|
||||
@@ -730,7 +762,9 @@
|
||||
le_bool seenVattu = FALSE;
|
||||
le_bool seenBelowBaseForm = FALSE;
|
||||
+ le_bool seenPreBaseForm = FALSE;
|
||||
le_bool hasNukta = FALSE;
|
||||
le_bool hasBelowBaseForm = FALSE;
|
||||
le_bool hasPostBaseForm = FALSE;
|
||||
+ le_bool hasPreBaseForm = FALSE;
|
||||
|
||||
if (postBase < markStart && classTable->isNukta(chars[postBase])) {
|
||||
@@ -746,12 +780,20 @@
|
||||
hasBelowBaseForm = IndicClassTable::hasBelowBaseForm(charClass) && !hasNukta;
|
||||
hasPostBaseForm = IndicClassTable::hasPostBaseForm(charClass) && !hasNukta;
|
||||
+ hasPreBaseForm = IndicClassTable::hasPreBaseForm(charClass) && !hasNukta;
|
||||
|
||||
if (IndicClassTable::isConsonant(charClass)) {
|
||||
if (postBaseLimit == 0 || seenVattu ||
|
||||
(baseConsonant > baseLimit && !classTable->isVirama(chars[baseConsonant - 1])) ||
|
||||
- !(hasBelowBaseForm || hasPostBaseForm)) {
|
||||
+ !(hasBelowBaseForm || hasPostBaseForm || hasPreBaseForm)) {
|
||||
break;
|
||||
}
|
||||
|
||||
+ // Note any pre-base consonants
|
||||
+ if ( baseConsonant == lastConsonant && lastConsonant > 0 &&
|
||||
+ hasPreBaseForm && classTable->isVirama(chars[baseConsonant - 1])) {
|
||||
+ output.notePreBaseConsonant(lastConsonant,chars[lastConsonant],chars[lastConsonant-1],tagArray2);
|
||||
+ seenPreBaseForm = TRUE;
|
||||
+
|
||||
+ }
|
||||
// consonants with nuktas are never vattus
|
||||
seenVattu = IndicClassTable::isVattu(charClass) && !hasNukta;
|
||||
@@ -786,10 +828,12 @@
|
||||
|
||||
// write any pre-base consonants
|
||||
+ output.writePreBaseConsonant();
|
||||
+
|
||||
le_bool supressVattu = TRUE;
|
||||
|
||||
for (i = baseLimit; i < baseConsonant; i += 1) {
|
||||
LEUnicode ch = chars[i];
|
||||
- // Don't put 'blwf' on first consonant.
|
||||
- FeatureMask features = (i == baseLimit? tagArray2 : tagArray1);
|
||||
+ // Don't put 'pstf' or 'blwf' on anything before the base consonant.
|
||||
+ FeatureMask features = tagArray1 & ~( pstfFeatureMask | blwfFeatureMask );
|
||||
|
||||
charClass = classTable->getCharClass(ch);
|
||||
@@ -842,5 +886,5 @@
|
||||
|
||||
// write below-base consonants
|
||||
- if (baseConsonant != lastConsonant) {
|
||||
+ if (baseConsonant != lastConsonant && !seenPreBaseForm) {
|
||||
for (i = bcSpan + 1; i < postBase; i += 1) {
|
||||
output.writeChar(chars[i], i, tagArray1);
|
||||
@@ -872,5 +916,5 @@
|
||||
// write post-base consonants
|
||||
// FIXME: does this put the right tags on post-base consonants?
|
||||
- if (baseConsonant != lastConsonant) {
|
||||
+ if (baseConsonant != lastConsonant && !seenPreBaseForm) {
|
||||
if (postBase <= lastConsonant) {
|
||||
for (i = postBase; i <= lastConsonant; i += 1) {
|
|
@ -0,0 +1,14 @@
|
|||
diff -ru orig.icu/source/layout/LookupProcessor.cpp icu/source/layout/LookupProcessor.cpp
|
||||
--- orig.icu/source/layout/LookupProcessor.cpp 2016-03-23 21:56:44.000000000 +0100
|
||||
+++ icu/source/layout/LookupProcessor.cpp 2016-04-15 18:19:26.903927005 +0200
|
||||
@@ -223,7 +223,9 @@
|
||||
|
||||
if (requiredFeatureIndex != 0xFFFF) {
|
||||
requiredFeatureTable = featureListTable->getFeatureTable(featureListTable, requiredFeatureIndex, &requiredFeatureTag, success);
|
||||
- featureReferences += SWAPW(requiredFeatureTable->lookupCount);
|
||||
+ if (requiredFeatureTable.isValid()) {
|
||||
+ featureReferences += SWAPW(requiredFeatureTable->lookupCount);
|
||||
+ }
|
||||
}
|
||||
|
||||
lookupOrderArray = LE_NEW_ARRAY(le_uint16, featureReferences);
|
|
@ -0,0 +1,96 @@
|
|||
diff -ru orig.icu/source/test/cintltst/cnmdptst.c icu/source/test/cintltst/cnmdptst.c
|
||||
--- orig.icu/source/test/cintltst/cnmdptst.c 2016-03-23 21:48:18.000000000 +0100
|
||||
+++ icu/source/test/cintltst/cnmdptst.c 2016-04-15 18:34:06.148251985 +0200
|
||||
@@ -186,6 +186,12 @@
|
||||
/* Test exponential pattern*/
|
||||
static void TestExponential(void)
|
||||
{
|
||||
+/* erAck: fails on armv7hl, https://bugzilla.redhat.com/show_bug.cgi?id=1239574 */
|
||||
+#if 1
|
||||
+ /* Actually only 3 tests fail, but given the nested structure depending on
|
||||
+ * array sizes there's no simple "disable this and that". */
|
||||
+ return;
|
||||
+#endif
|
||||
int32_t pat_length, val_length, lval_length;
|
||||
int32_t ival, ilval, p, v, lneed;
|
||||
UNumberFormat *fmt;
|
||||
diff -ru orig.icu/source/test/intltest/dcfmtest.cpp icu/source/test/intltest/dcfmtest.cpp
|
||||
--- orig.icu/source/test/intltest/dcfmtest.cpp 2016-03-23 21:48:38.000000000 +0100
|
||||
+++ icu/source/test/intltest/dcfmtest.cpp 2016-04-15 18:34:06.148251985 +0200
|
||||
@@ -279,6 +279,13 @@
|
||||
//
|
||||
formatLineMat.reset(testLine);
|
||||
if (formatLineMat.lookingAt(status)) {
|
||||
+/* erAck: fails on armv7hl, https://bugzilla.redhat.com/show_bug.cgi?id=1239574 */
|
||||
+#if 1
|
||||
+// [Formattable] file dcfmtest.txt, line 62: expected "12.35E5", got "1.235E6"
|
||||
+// [StringPiece] file dcfmtest.txt, line 62: expected "12.35E5", got "1.235E6"
|
||||
+ if (lineNum == 62)
|
||||
+ continue;
|
||||
+#endif
|
||||
execFormatTest(lineNum,
|
||||
formatLineMat.group(1, status), // Pattern
|
||||
formatLineMat.group(2, status), // rounding mode
|
||||
diff -ru orig.icu/source/test/intltest/numfmtspectest.cpp icu/source/test/intltest/numfmtspectest.cpp
|
||||
--- orig.icu/source/test/intltest/numfmtspectest.cpp 2016-03-23 21:48:40.000000000 +0100
|
||||
+++ icu/source/test/intltest/numfmtspectest.cpp 2016-04-15 18:34:06.148251985 +0200
|
||||
@@ -137,11 +137,14 @@
|
||||
|
||||
void NumberFormatSpecificationTest::TestScientificNotation() {
|
||||
assertPatternFr("1,23E4", 12345.0, "0.00E0", TRUE);
|
||||
+/* erAck: fails on armv7hl, https://bugzilla.redhat.com/show_bug.cgi?id=1239574 */
|
||||
+#if 0
|
||||
assertPatternFr("123,00E2", 12300.0, "000.00E0", TRUE);
|
||||
assertPatternFr("123,0E2", 12300.0, "000.0#E0", TRUE);
|
||||
assertPatternFr("123,0E2", 12300.1, "000.0#E0", TRUE);
|
||||
assertPatternFr("123,01E2", 12301.0, "000.0#E0", TRUE);
|
||||
assertPatternFr("123,01E+02", 12301.0, "000.0#E+00", TRUE);
|
||||
+#endif
|
||||
assertPatternFr("12,3E3", 12345.0, "##0.00E0", TRUE);
|
||||
assertPatternFr("12,300E3", 12300.1, "##0.0000E0", TRUE);
|
||||
assertPatternFr("12,30E3", 12300.1, "##0.000#E0", TRUE);
|
||||
@@ -221,6 +224,8 @@
|
||||
assertEquals("", "USD (433.22)", result, TRUE);
|
||||
}
|
||||
}
|
||||
+/* erAck: fails on armv7hl, https://bugzilla.redhat.com/show_bug.cgi?id=1239574 */
|
||||
+#if 0
|
||||
const char *paddedSciPattern = "QU**00.#####E0";
|
||||
assertPatternFr("QU***43,3E-1", 4.33, paddedSciPattern, TRUE);
|
||||
{
|
||||
@@ -242,6 +247,7 @@
|
||||
}
|
||||
// padding cannot work as intended with scientific notation.
|
||||
assertPatternFr("QU**43,32E-1", 4.332, paddedSciPattern, TRUE);
|
||||
+#endif
|
||||
}
|
||||
|
||||
void NumberFormatSpecificationTest::assertPatternFr(
|
||||
diff -ru orig.icu/source/test/intltest/numfmtst.cpp icu/source/test/intltest/numfmtst.cpp
|
||||
--- orig.icu/source/test/intltest/numfmtst.cpp 2016-03-23 21:48:40.000000000 +0100
|
||||
+++ icu/source/test/intltest/numfmtst.cpp 2016-04-15 18:34:06.150251997 +0200
|
||||
@@ -730,6 +730,12 @@
|
||||
void
|
||||
NumberFormatTest::TestExponential(void)
|
||||
{
|
||||
+/* erAck: fails on armv7hl, https://bugzilla.redhat.com/show_bug.cgi?id=1239574 */
|
||||
+#if 1
|
||||
+ /* Actually only 3 tests fail, but given the nested structure depending on
|
||||
+ * array sizes there's no simple "disable this and that". */
|
||||
+ return;
|
||||
+#endif
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
DecimalFormatSymbols sym(Locale::getUS(), status);
|
||||
if (U_FAILURE(status)) { errcheckln(status, "FAIL: Bad status returned by DecimalFormatSymbols ct - %s", u_errorName(status)); return; }
|
||||
@@ -1846,8 +1852,11 @@
|
||||
(int32_t) 45678000, "5E7", status);
|
||||
expect(new DecimalFormat("00E0", US, status),
|
||||
(int32_t) 45678000, "46E6", status);
|
||||
+/* erAck: fails on armv7hl, https://bugzilla.redhat.com/show_bug.cgi?id=1239574 */
|
||||
+#if 0
|
||||
expect(new DecimalFormat("000E0", US, status),
|
||||
(int32_t) 45678000, "457E5", status);
|
||||
+#endif
|
||||
/*
|
||||
expect(new DecimalFormat("###E0", US, status),
|
||||
new Object[] { new Double(0.0000123), "12.3E-6",
|
|
@ -0,0 +1,156 @@
|
|||
Index: icu/trunk/source/common/locid.cpp
|
||||
===================================================================
|
||||
--- icu/source/common/locid.cpp (revision 39282)
|
||||
+++ icu/source/common/locid.cpp (revision 39384)
|
||||
@@ -45,4 +45,5 @@
|
||||
#include "ucln_cmn.h"
|
||||
#include "ustr_imp.h"
|
||||
+#include "charstr.h"
|
||||
|
||||
U_CDECL_BEGIN
|
||||
@@ -59,4 +60,10 @@
|
||||
static UHashtable *gDefaultLocalesHashT = NULL;
|
||||
static Locale *gDefaultLocale = NULL;
|
||||
+
|
||||
+/**
|
||||
+ * \def ULOC_STRING_LIMIT
|
||||
+ * strings beyond this value crash in CharString
|
||||
+ */
|
||||
+#define ULOC_STRING_LIMIT 357913941
|
||||
|
||||
U_NAMESPACE_END
|
||||
@@ -286,5 +293,5 @@
|
||||
else
|
||||
{
|
||||
- MaybeStackArray<char, ULOC_FULLNAME_CAPACITY> togo;
|
||||
+ UErrorCode status = U_ZERO_ERROR;
|
||||
int32_t size = 0;
|
||||
int32_t lsize = 0;
|
||||
@@ -292,5 +299,4 @@
|
||||
int32_t vsize = 0;
|
||||
int32_t ksize = 0;
|
||||
- char *p;
|
||||
|
||||
// Calculate the size of the resulting string.
|
||||
@@ -300,6 +306,12 @@
|
||||
{
|
||||
lsize = (int32_t)uprv_strlen(newLanguage);
|
||||
+ if ( lsize < 0 || lsize > ULOC_STRING_LIMIT ) { // int32 wrap
|
||||
+ setToBogus();
|
||||
+ return;
|
||||
+ }
|
||||
size = lsize;
|
||||
}
|
||||
+
|
||||
+ CharString togo(newLanguage, lsize, status); // start with newLanguage
|
||||
|
||||
// _Country
|
||||
@@ -307,4 +319,8 @@
|
||||
{
|
||||
csize = (int32_t)uprv_strlen(newCountry);
|
||||
+ if ( csize < 0 || csize > ULOC_STRING_LIMIT ) { // int32 wrap
|
||||
+ setToBogus();
|
||||
+ return;
|
||||
+ }
|
||||
size += csize;
|
||||
}
|
||||
@@ -321,4 +337,8 @@
|
||||
// remove trailing _'s
|
||||
vsize = (int32_t)uprv_strlen(newVariant);
|
||||
+ if ( vsize < 0 || vsize > ULOC_STRING_LIMIT ) { // int32 wrap
|
||||
+ setToBogus();
|
||||
+ return;
|
||||
+ }
|
||||
while( (vsize>1) && (newVariant[vsize-1] == SEP_CHAR) )
|
||||
{
|
||||
@@ -345,48 +365,30 @@
|
||||
{
|
||||
ksize = (int32_t)uprv_strlen(newKeywords);
|
||||
+ if ( ksize < 0 || ksize > ULOC_STRING_LIMIT ) {
|
||||
+ setToBogus();
|
||||
+ return;
|
||||
+ }
|
||||
size += ksize + 1;
|
||||
}
|
||||
|
||||
-
|
||||
// NOW we have the full locale string..
|
||||
-
|
||||
- /*if the whole string is longer than our internal limit, we need
|
||||
- to go to the heap for temporary buffers*/
|
||||
- if (size >= togo.getCapacity())
|
||||
- {
|
||||
- // If togo_heap could not be created, initialize with default settings.
|
||||
- if (togo.resize(size+1) == NULL) {
|
||||
- init(NULL, FALSE);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- togo[0] = 0;
|
||||
-
|
||||
// Now, copy it back.
|
||||
- p = togo.getAlias();
|
||||
- if ( lsize != 0 )
|
||||
- {
|
||||
- uprv_strcpy(p, newLanguage);
|
||||
- p += lsize;
|
||||
- }
|
||||
+
|
||||
+ // newLanguage is already copied
|
||||
|
||||
if ( ( vsize != 0 ) || (csize != 0) ) // at least: __v
|
||||
{ // ^
|
||||
- *p++ = SEP_CHAR;
|
||||
+ togo.append(SEP_CHAR, status);
|
||||
}
|
||||
|
||||
if ( csize != 0 )
|
||||
{
|
||||
- uprv_strcpy(p, newCountry);
|
||||
- p += csize;
|
||||
+ togo.append(newCountry, status);
|
||||
}
|
||||
|
||||
if ( vsize != 0)
|
||||
{
|
||||
- *p++ = SEP_CHAR; // at least: __v
|
||||
-
|
||||
- uprv_strncpy(p, newVariant, vsize); // Must use strncpy because
|
||||
- p += vsize; // of trimming (above).
|
||||
- *p = 0; // terminate
|
||||
+ togo.append(SEP_CHAR, status)
|
||||
+ .append(newVariant, vsize, status);
|
||||
}
|
||||
|
||||
@@ -394,19 +396,23 @@
|
||||
{
|
||||
if (uprv_strchr(newKeywords, '=')) {
|
||||
- *p++ = '@'; /* keyword parsing */
|
||||
+ togo.append('@', status); /* keyword parsing */
|
||||
}
|
||||
else {
|
||||
- *p++ = '_'; /* Variant parsing with a script */
|
||||
+ togo.append('_', status); /* Variant parsing with a script */
|
||||
if ( vsize == 0) {
|
||||
- *p++ = '_'; /* No country found */
|
||||
+ togo.append('_', status); /* No country found */
|
||||
}
|
||||
}
|
||||
- uprv_strcpy(p, newKeywords);
|
||||
- p += ksize;
|
||||
- }
|
||||
-
|
||||
+ togo.append(newKeywords, status);
|
||||
+ }
|
||||
+
|
||||
+ if (U_FAILURE(status)) {
|
||||
+ // Something went wrong with appending, etc.
|
||||
+ setToBogus();
|
||||
+ return;
|
||||
+ }
|
||||
// Parse it, because for example 'language' might really be a complete
|
||||
// string.
|
||||
- init(togo.getAlias(), FALSE);
|
||||
+ init(togo.data(), FALSE);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
diff -up icu/source/configure.ac.dont_use_clang_even_if_installed icu/source/configure.ac
|
||||
--- icu/source/configure.ac.dont_use_clang_even_if_installed 2017-02-10 13:36:23.708830671 +0100
|
||||
+++ icu/source/configure.ac 2017-02-10 13:37:00.618423307 +0100
|
||||
@@ -132,10 +132,10 @@ AC_SUBST(ENABLE_RELEASE)
|
||||
: ${CXXFLAGS=""}
|
||||
|
||||
# Checks for compilers
|
||||
-AC_PROG_CC([clang gcc cc c99 c89 xlc_r xlc cl.exe icc])
|
||||
+AC_PROG_CC([gcc cc c99 c89 xlc_r xlc cl.exe icc])
|
||||
# Make sure that we try clang++ first, which provides C++11 support.
|
||||
# The g++ compiler is less likely to support C++11.
|
||||
-AC_PROG_CXX([clang++ g++ c++ gpp xlC_r xlC aCC CC cxx cc++ cl.exe icc FCC KCC RCC])
|
||||
+AC_PROG_CXX([g++ c++ gpp xlC_r xlC aCC CC cxx cc++ cl.exe icc FCC KCC RCC])
|
||||
|
||||
# pkg-config is needed for harfbuzz support
|
||||
PKG_PROG_PKG_CONFIG([0.20])
|
|
@ -0,0 +1,128 @@
|
|||
Description: supply manual page for program that doesn't have one
|
||||
Author: Jay Berkenbilt <qjb@debian.org>
|
||||
Bug: http://bugs.icu-project.org/trac/ticket/7554
|
||||
|
||||
diff -r -u -N icu.orig/source/tools/gennorm2/gennorm2.8.in icu/source/tools/gennorm2/gennorm2.8.in
|
||||
--- icu.orig/source/tools/gennorm2/gennorm2.8.in 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ icu/source/tools/gennorm2/gennorm2.8.in 2013-02-25 16:43:28.297062638 +0100
|
||||
@@ -0,0 +1,71 @@
|
||||
+.\" Hey, Emacs! This is -*-nroff-*- you know...
|
||||
+.\"
|
||||
+.\" gennorm2.8: manual page for the gennorm2 utility
|
||||
+.\"
|
||||
+.\" Copyright (C) 2005-2006 International Business Machines Corporation and others
|
||||
+.\"
|
||||
+.TH GENNORM2 8 "15 March 2010" "ICU MANPAGE" "ICU @VERSION@ Manual"
|
||||
+.SH NAME
|
||||
+.B gennorm2
|
||||
+\- Builds binary data file with Unicode normalization data.
|
||||
+.SH SYNOPSIS
|
||||
+.B gennorm2
|
||||
+[
|
||||
+.BR "\-h\fP, \fB\-?\fP, \fB\-\-help"
|
||||
+]
|
||||
+[
|
||||
+.BR "\-V\fP, \fB\-\-version"
|
||||
+]
|
||||
+[
|
||||
+.BR "\-c\fP, \fB\-\-copyright"
|
||||
+]
|
||||
+[
|
||||
+.BR "\-v\fP, \fB\-\-verbose"
|
||||
+]
|
||||
+[
|
||||
+.BI "\-u\fP, \fB\-\-unicode" " unicode\-version\-number"
|
||||
+]
|
||||
+[
|
||||
+.BI "\-s\fP, \fB\-\-sourcedir" " source\-directory"
|
||||
+]
|
||||
+[
|
||||
+.BI "\-o\fP, \fB\-\-output" " output\-filename"
|
||||
+]
|
||||
+.BI "\fB\-\-fast"
|
||||
+.SH DESCRIPTION
|
||||
+.B gennorm2
|
||||
+reads text files that define Unicode normalization,
|
||||
+them, and builds a binary data file.
|
||||
+.SH OPTIONS
|
||||
+.TP
|
||||
+.BR "\-h\fP, \fB\-?\fP, \fB\-\-help"
|
||||
+Print help about usage and exit.
|
||||
+.TP
|
||||
+.BR "\-V\fP, \fB\-\-version"
|
||||
+Print the version of
|
||||
+.B gennorm2
|
||||
+and exit.
|
||||
+.TP
|
||||
+.BR "\-c\fP, \fB\-\-copyright"
|
||||
+Include a copyright notice.
|
||||
+.TP
|
||||
+.BR "\-v\fP, \fB\-\-verbose"
|
||||
+Display extra informative messages during execution.
|
||||
+.TP
|
||||
+.BR "\-u\fP, \fB\-\-unicode"
|
||||
+Specify Unicode version number, such as 5.2.0.
|
||||
+.TP
|
||||
+.BI "\-s\fP, \fB\-\-sourcedir" " source\-directory"
|
||||
+Specify the input directory.
|
||||
+.TP
|
||||
+.BI "\-s\fP, \fB\-\-sourcedir" " source\-directory"
|
||||
+Set the name of the output file.
|
||||
+.TP
|
||||
+.BI "\fB\-\-fast"
|
||||
+optimize the .nrm file for fast normalization,
|
||||
+which might increase its size (Writes fully decomposed
|
||||
+regular mappings instead of delta mappings.
|
||||
+You should measure the runtime speed to make sure that
|
||||
+this is a good trade-off.)
|
||||
+.SH COPYRIGHT
|
||||
+Copyright (C) 2009-2010 International Business Machines Corporation and others
|
||||
diff -r -u -N icu.orig/source/tools/gennorm2/Makefile.in icu/source/tools/gennorm2/Makefile.in
|
||||
--- icu.orig/source/tools/gennorm2/Makefile.in 2013-01-11 01:23:32.000000000 +0100
|
||||
+++ icu/source/tools/gennorm2/Makefile.in 2013-02-25 16:43:28.296062632 +0100
|
||||
@@ -16,8 +16,13 @@
|
||||
|
||||
TARGET_STUB_NAME = gennorm2
|
||||
|
||||
+SECTION = 8
|
||||
+
|
||||
+MAN_FILES = $(TARGET_STUB_NAME).$(SECTION)
|
||||
+
|
||||
+
|
||||
## Extra files to remove for 'make clean'
|
||||
-CLEANFILES = *~ $(DEPS)
|
||||
+CLEANFILES = *~ $(DEPS) $(MAN_FILES)
|
||||
|
||||
## Target information
|
||||
TARGET = $(BINDIR)/$(TARGET_STUB_NAME)$(EXEEXT)
|
||||
@@ -44,12 +49,16 @@
|
||||
dist: dist-local
|
||||
check: all check-local
|
||||
|
||||
-all-local: $(TARGET)
|
||||
+all-local: $(TARGET) $(MAN_FILES)
|
||||
|
||||
-install-local: all-local
|
||||
+install-local: all-local install-man
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(sbindir)
|
||||
$(INSTALL) $(TARGET) $(DESTDIR)$(sbindir)
|
||||
|
||||
+install-man: $(MAN_FILES)
|
||||
+ $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
|
||||
+ $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
|
||||
+
|
||||
dist-local:
|
||||
|
||||
clean-local:
|
||||
@@ -70,6 +79,11 @@
|
||||
$(POST_BUILD_STEP)
|
||||
|
||||
|
||||
+%.$(SECTION): $(srcdir)/%.$(SECTION).in
|
||||
+ cd $(top_builddir) \
|
||||
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
+
|
||||
+
|
||||
ifeq (,$(MAKECMDGOALS))
|
||||
-include $(DEPS)
|
||||
else
|
|
@ -0,0 +1,145 @@
|
|||
Description: supply manual page for program that doesn't have one
|
||||
Author: Jay Berkenbilt <qjb@debian.org>
|
||||
Bug: http://bugs.icu-project.org/trac/ticket/7665
|
||||
erAck: adapted to ICU 56.1 icu/source/tools/icuinfo/Makefile.in
|
||||
|
||||
diff -Nur orig.icu/source/tools/icuinfo/icuinfo.1.in icu/source/tools/icuinfo/icuinfo.1.in
|
||||
--- orig.icu/source/tools/icuinfo/icuinfo.1.in 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ icu/source/tools/icuinfo/icuinfo.1.in 2015-10-27 19:19:35.184056800 +0100
|
||||
@@ -0,0 +1,76 @@
|
||||
+.\" Hey, Emacs! This is -*-nroff-*- you know...
|
||||
+.\"
|
||||
+.\" icuinfo.1: manual page for the icuinfo utility
|
||||
+.\"
|
||||
+.\" Copyright (C) 2005-2006 International Business Machines Corporation and others
|
||||
+.\"
|
||||
+.TH ICUINFO 1 "1 May 2010" "ICU MANPAGE" "ICU @VERSION@ Manual"
|
||||
+.SH NAME
|
||||
+.B icuinfo
|
||||
+\- Shows some basic info about the current ICU
|
||||
+.SH SYNOPSIS
|
||||
+.B icuinfo
|
||||
+[
|
||||
+.BR "\-h\fP, \fB\-?\fP, \fB\-\-help"
|
||||
+]
|
||||
+[
|
||||
+.BR "\-V\fP, \fB\-\-version"
|
||||
+]
|
||||
+[
|
||||
+.BR "\-c\fP, \fB\-\-copyright"
|
||||
+]
|
||||
+[
|
||||
+.BI "\-i\fP, \fB\-\-icudatadir" " directory"
|
||||
+]
|
||||
+[
|
||||
+.BR "\-v\fP, \fB\-\-verbose"
|
||||
+]
|
||||
+[
|
||||
+.BI "\-L\fP, \fB\-\-list-plugins"
|
||||
+]
|
||||
+[
|
||||
+.BI "\-m\fP, \fB\-\-milisecond-time"
|
||||
+]
|
||||
+[
|
||||
+.BI "\-K\fP, \fB\-\-cleanup"
|
||||
+]
|
||||
+.SH DESCRIPTION
|
||||
+.B icuinfo
|
||||
+prints basic information about the current version of ICU.
|
||||
+.SH OPTIONS
|
||||
+.TP
|
||||
+.BR "\-h\fP, \fB\-?\fP, \fB\-\-help"
|
||||
+Print help about usage and exit.
|
||||
+.TP
|
||||
+.BR "\-V\fP, \fB\-\-version"
|
||||
+Print the version of
|
||||
+.B icuinfo
|
||||
+and exit.
|
||||
+.TP
|
||||
+.BR "\-c\fP, \fB\-\-copyright"
|
||||
+Embeds the standard ICU copyright into the
|
||||
+.IR output-file .
|
||||
+.TP
|
||||
+.BR "\-v\fP, \fB\-\-verbose"
|
||||
+Display extra informative messages during execution.
|
||||
+.TP
|
||||
+.BI "\-i\fP, \fB\-\-icudatadir" " directory"
|
||||
+Look for any necessary ICU data files in
|
||||
+.IR directory .
|
||||
+For example, the file
|
||||
+.B pnames.icu
|
||||
+must be located when ICU's data is not built as a shared library.
|
||||
+The default ICU data directory is specified by the environment variable
|
||||
+.BR ICU_DATA .
|
||||
+Most configurations of ICU do not require this argument.
|
||||
+.TP
|
||||
+.BI "\-L\fP, \fB\-\-list-plugins"
|
||||
+If specified, list and diagnose issues with ICU plugins.
|
||||
+.TP
|
||||
+.BI "\-K\fP, \fB\-\-cleanup"
|
||||
+Attempt to unload plugins before exiting.
|
||||
+.TP
|
||||
+.BI "\-m\fP, \fB\-\-milisecond-time"
|
||||
+Print the current UTC time in milliseconds.
|
||||
+.SH COPYRIGHT
|
||||
+Copyright (C) 2010 International Business Machines Corporation and others
|
||||
diff -Nur orig.icu/source/tools/icuinfo/Makefile.in icu/source/tools/icuinfo/Makefile.in
|
||||
--- orig.icu/source/tools/icuinfo/Makefile.in 2015-10-08 05:53:56.000000000 +0200
|
||||
+++ icu/source/tools/icuinfo/Makefile.in 2015-10-27 19:23:19.115509906 +0100
|
||||
@@ -14,8 +14,15 @@
|
||||
## Build directory information
|
||||
subdir = tools/icuinfo
|
||||
|
||||
+TARGET_STUB_NAME = icuinfo
|
||||
+
|
||||
+SECTION = 1
|
||||
+
|
||||
+MAN_FILES = $(TARGET_STUB_NAME).$(SECTION)
|
||||
+
|
||||
+
|
||||
## Extra files to remove for 'make clean'
|
||||
-CLEANFILES = *~ $(DEPS) $(PLUGIN_OBJECTS) $(PLUGINFILE) $(PLUGIN)
|
||||
+CLEANFILES = *~ $(DEPS) $(PLUGIN_OBJECTS) $(PLUGINFILE) $(PLUGIN) $(MAN_FILES)
|
||||
|
||||
## Target information
|
||||
TARGET = icuinfo$(EXEEXT)
|
||||
@@ -35,7 +42,8 @@
|
||||
|
||||
## List of phony targets
|
||||
.PHONY : all all-local install install-local clean clean-local \
|
||||
-distclean distclean-local dist dist-local check check-local plugin-check
|
||||
+distclean distclean-local dist dist-local check check-local plugin-check \
|
||||
+install-man
|
||||
|
||||
## Clear suffix list
|
||||
.SUFFIXES :
|
||||
@@ -48,12 +56,16 @@
|
||||
dist: dist-local
|
||||
check: all check-local
|
||||
|
||||
-all-local: $(TARGET)
|
||||
+all-local: $(TARGET) $(MAN_FILES)
|
||||
|
||||
-install-local: all-local
|
||||
+install-local: all-local install-man
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
|
||||
$(INSTALL) $(TARGET) $(DESTDIR)$(bindir)
|
||||
|
||||
+install-man: $(MAN_FILES)
|
||||
+ $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
|
||||
+ $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
|
||||
+
|
||||
dist-local:
|
||||
|
||||
clean-local:
|
||||
@@ -103,6 +115,10 @@
|
||||
@echo "Plugins are disabled (use --enable-plugins to enable)"
|
||||
endif
|
||||
|
||||
+%.$(SECTION): $(srcdir)/%.$(SECTION).in
|
||||
+ cd $(top_builddir) \
|
||||
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
+
|
||||
ifeq (,$(MAKECMDGOALS))
|
||||
-include $(DEPS)
|
||||
else
|
|
@ -0,0 +1,244 @@
|
|||
# Offsets corected from https://ssl.icu-project.org/trac/changeset/39109
|
||||
diff -ru icu.orig/source/common/uloc.cpp icu/source/common/uloc.cpp
|
||||
--- icu.orig/source/common/uloc.cpp 2016-03-23 21:50:12.000000000 +0100
|
||||
+++ icu/source/common/uloc.cpp 2016-11-01 15:21:16.542151312 +0100
|
||||
@@ -2246,7 +2246,7 @@
|
||||
typedef struct {
|
||||
float q;
|
||||
int32_t dummy; /* to avoid uninitialized memory copy from qsort */
|
||||
- char *locale;
|
||||
+ char locale[ULOC_FULLNAME_CAPACITY+1];
|
||||
} _acceptLangItem;
|
||||
|
||||
static int32_t U_CALLCONV
|
||||
@@ -2288,9 +2288,7 @@
|
||||
UEnumeration* availableLocales,
|
||||
UErrorCode *status)
|
||||
{
|
||||
- _acceptLangItem *j;
|
||||
- _acceptLangItem smallBuffer[30];
|
||||
- char **strs;
|
||||
+ MaybeStackArray<_acceptLangItem, 4> items; // Struct for collecting items.
|
||||
char tmp[ULOC_FULLNAME_CAPACITY +1];
|
||||
int32_t n = 0;
|
||||
const char *itemEnd;
|
||||
@@ -2300,11 +2298,7 @@
|
||||
int32_t res;
|
||||
int32_t i;
|
||||
int32_t l = (int32_t)uprv_strlen(httpAcceptLanguage);
|
||||
- int32_t jSize;
|
||||
- char *tempstr; /* Use for null pointer check */
|
||||
|
||||
- j = smallBuffer;
|
||||
- jSize = UPRV_LENGTHOF(smallBuffer);
|
||||
if(U_FAILURE(*status)) {
|
||||
return -1;
|
||||
}
|
||||
@@ -2332,27 +2326,29 @@
|
||||
while(isspace(*t)) {
|
||||
t++;
|
||||
}
|
||||
- j[n].q = (float)_uloc_strtod(t,NULL);
|
||||
+ items[n].q = (float)_uloc_strtod(t,NULL);
|
||||
} else {
|
||||
/* no semicolon - it's 1.0 */
|
||||
- j[n].q = 1.0f;
|
||||
+ items[n].q = 1.0f;
|
||||
paramEnd = itemEnd;
|
||||
}
|
||||
- j[n].dummy=0;
|
||||
+ items[n].dummy=0;
|
||||
/* eat spaces prior to semi */
|
||||
for(t=(paramEnd-1);(paramEnd>s)&&isspace(*t);t--)
|
||||
;
|
||||
- /* Check for null pointer from uprv_strndup */
|
||||
- tempstr = uprv_strndup(s,(int32_t)((t+1)-s));
|
||||
- if (tempstr == NULL) {
|
||||
- *status = U_MEMORY_ALLOCATION_ERROR;
|
||||
- return -1;
|
||||
- }
|
||||
- j[n].locale = tempstr;
|
||||
- uloc_canonicalize(j[n].locale,tmp,UPRV_LENGTHOF(tmp),status);
|
||||
- if(strcmp(j[n].locale,tmp)) {
|
||||
- uprv_free(j[n].locale);
|
||||
- j[n].locale=uprv_strdup(tmp);
|
||||
+ int32_t slen = ((t+1)-s);
|
||||
+ if(slen > ULOC_FULLNAME_CAPACITY) {
|
||||
+ *status = U_BUFFER_OVERFLOW_ERROR;
|
||||
+ return -1; // too big
|
||||
+ }
|
||||
+ uprv_strncpy(items[n].locale, s, slen);
|
||||
+ items[n].locale[slen]=0; // terminate
|
||||
+ int32_t clen = uloc_canonicalize(items[n].locale, tmp, UPRV_LENGTHOF(tmp)-1, status);
|
||||
+ if(U_FAILURE(*status)) return -1;
|
||||
+ if((clen!=slen) || (uprv_strncmp(items[n].locale, tmp, slen))) {
|
||||
+ // canonicalization had an effect- copy back
|
||||
+ uprv_strncpy(items[n].locale, tmp, clen);
|
||||
+ items[n].locale[clen] = 0; // terminate
|
||||
}
|
||||
#if defined(ULOC_DEBUG)
|
||||
/*fprintf(stderr,"%d: s <%s> q <%g>\n", n, j[n].locale, j[n].q);*/
|
||||
@@ -2362,63 +2358,29 @@
|
||||
while(*s==',') { /* eat duplicate commas */
|
||||
s++;
|
||||
}
|
||||
- if(n>=jSize) {
|
||||
- if(j==smallBuffer) { /* overflowed the small buffer. */
|
||||
- j = static_cast<_acceptLangItem *>(uprv_malloc(sizeof(j[0])*(jSize*2)));
|
||||
- if(j!=NULL) {
|
||||
- uprv_memcpy(j,smallBuffer,sizeof(j[0])*jSize);
|
||||
- }
|
||||
+ if(n>=items.getCapacity()) { // If we need more items
|
||||
+ if(NULL == items.resize(items.getCapacity()*2, items.getCapacity())) {
|
||||
+ *status = U_MEMORY_ALLOCATION_ERROR;
|
||||
+ return -1;
|
||||
+ }
|
||||
#if defined(ULOC_DEBUG)
|
||||
- fprintf(stderr,"malloced at size %d\n", jSize);
|
||||
+ fprintf(stderr,"malloced at size %d\n", items.getCapacity());
|
||||
#endif
|
||||
- } else {
|
||||
- j = static_cast<_acceptLangItem *>(uprv_realloc(j, sizeof(j[0])*jSize*2));
|
||||
-#if defined(ULOC_DEBUG)
|
||||
- fprintf(stderr,"re-alloced at size %d\n", jSize);
|
||||
-#endif
|
||||
- }
|
||||
- jSize *= 2;
|
||||
- if(j==NULL) {
|
||||
- *status = U_MEMORY_ALLOCATION_ERROR;
|
||||
- return -1;
|
||||
- }
|
||||
}
|
||||
}
|
||||
- uprv_sortArray(j, n, sizeof(j[0]), uloc_acceptLanguageCompare, NULL, TRUE, status);
|
||||
+ uprv_sortArray(items.getAlias(), n, sizeof(items[0]), uloc_acceptLanguageCompare, NULL, TRUE, status);
|
||||
+ LocalArray<const char*> strs(new const char*[n], *status);
|
||||
if(U_FAILURE(*status)) {
|
||||
- if(j != smallBuffer) {
|
||||
-#if defined(ULOC_DEBUG)
|
||||
- fprintf(stderr,"freeing j %p\n", j);
|
||||
-#endif
|
||||
- uprv_free(j);
|
||||
- }
|
||||
- return -1;
|
||||
- }
|
||||
- strs = static_cast<char **>(uprv_malloc((size_t)(sizeof(strs[0])*n)));
|
||||
- /* Check for null pointer */
|
||||
- if (strs == NULL) {
|
||||
- uprv_free(j); /* Free to avoid memory leak */
|
||||
- *status = U_MEMORY_ALLOCATION_ERROR;
|
||||
- return -1;
|
||||
+ return -1;
|
||||
}
|
||||
for(i=0;i<n;i++) {
|
||||
#if defined(ULOC_DEBUG)
|
||||
/*fprintf(stderr,"%d: s <%s> q <%g>\n", i, j[i].locale, j[i].q);*/
|
||||
#endif
|
||||
- strs[i]=j[i].locale;
|
||||
+ strs[i]=items[i].locale;
|
||||
}
|
||||
res = uloc_acceptLanguage(result, resultAvailable, outResult,
|
||||
- (const char**)strs, n, availableLocales, status);
|
||||
- for(i=0;i<n;i++) {
|
||||
- uprv_free(strs[i]);
|
||||
- }
|
||||
- uprv_free(strs);
|
||||
- if(j != smallBuffer) {
|
||||
-#if defined(ULOC_DEBUG)
|
||||
- fprintf(stderr,"freeing j %p\n", j);
|
||||
-#endif
|
||||
- uprv_free(j);
|
||||
- }
|
||||
+ strs.getAlias(), n, availableLocales, status);
|
||||
return res;
|
||||
}
|
||||
|
||||
diff -ru icu.orig/source/test/cintltst/cloctst.c icu/source/test/cintltst/cloctst.c
|
||||
--- icu.orig/source/test/cintltst/cloctst.c 2016-03-23 21:48:18.000000000 +0100
|
||||
+++ icu/source/test/cintltst/cloctst.c 2016-11-01 15:21:16.544151315 +0100
|
||||
@@ -2775,16 +2775,20 @@
|
||||
const char *icuSet; /**< ? */
|
||||
const char *expect; /**< The expected locale result */
|
||||
UAcceptResult res; /**< The expected error code */
|
||||
+ UErrorCode expectStatus; /**< expected status */
|
||||
} tests[] = {
|
||||
- /*0*/{ 0, NULL, "mt_MT", ULOC_ACCEPT_VALID },
|
||||
- /*1*/{ 1, NULL, "en", ULOC_ACCEPT_VALID },
|
||||
- /*2*/{ 2, NULL, "en", ULOC_ACCEPT_FALLBACK },
|
||||
- /*3*/{ 3, NULL, "", ULOC_ACCEPT_FAILED },
|
||||
- /*4*/{ 4, NULL, "es", ULOC_ACCEPT_VALID },
|
||||
-
|
||||
- /*5*/{ 5, NULL, "en", ULOC_ACCEPT_VALID }, /* XF */
|
||||
- /*6*/{ 6, NULL, "ja", ULOC_ACCEPT_FALLBACK }, /* XF */
|
||||
- /*7*/{ 7, NULL, "zh", ULOC_ACCEPT_FALLBACK }, /* XF */
|
||||
+ /*0*/{ 0, NULL, "mt_MT", ULOC_ACCEPT_VALID, U_ZERO_ERROR},
|
||||
+ /*1*/{ 1, NULL, "en", ULOC_ACCEPT_VALID, U_ZERO_ERROR},
|
||||
+ /*2*/{ 2, NULL, "en", ULOC_ACCEPT_FALLBACK, U_ZERO_ERROR},
|
||||
+ /*3*/{ 3, NULL, "", ULOC_ACCEPT_FAILED, U_ZERO_ERROR},
|
||||
+ /*4*/{ 4, NULL, "es", ULOC_ACCEPT_VALID, U_ZERO_ERROR},
|
||||
+ /*5*/{ 5, NULL, "en", ULOC_ACCEPT_VALID, U_ZERO_ERROR}, /* XF */
|
||||
+ /*6*/{ 6, NULL, "ja", ULOC_ACCEPT_FALLBACK, U_ZERO_ERROR}, /* XF */
|
||||
+ /*7*/{ 7, NULL, "zh", ULOC_ACCEPT_FALLBACK, U_ZERO_ERROR}, /* XF */
|
||||
+ /*8*/{ 8, NULL, "", ULOC_ACCEPT_FAILED, U_ZERO_ERROR }, /* */
|
||||
+ /*9*/{ 9, NULL, "", ULOC_ACCEPT_FAILED, U_ZERO_ERROR }, /* */
|
||||
+ /*10*/{10, NULL, "", ULOC_ACCEPT_FAILED, U_BUFFER_OVERFLOW_ERROR }, /* */
|
||||
+ /*11*/{11, NULL, "", ULOC_ACCEPT_FAILED, U_BUFFER_OVERFLOW_ERROR }, /* */
|
||||
};
|
||||
const int32_t numTests = UPRV_LENGTHOF(tests);
|
||||
static const char *http[] = {
|
||||
@@ -2800,10 +2804,25 @@
|
||||
"xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, "
|
||||
"xxx-yyy;q=.01, xxx-yyy;q=.01, xxx-yyy;q=.01, xx-yy;q=.1, "
|
||||
"es",
|
||||
-
|
||||
/*5*/ "zh-xx;q=0.9, en;q=0.6",
|
||||
/*6*/ "ja-JA",
|
||||
/*7*/ "zh-xx;q=0.9",
|
||||
+ /*08*/ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
||||
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
||||
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
||||
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", // 156
|
||||
+ /*09*/ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
||||
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
||||
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
||||
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB", // 157 (this hits U_STRING_NOT_TERMINATED_WARNING )
|
||||
+ /*10*/ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
||||
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
||||
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
||||
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABC", // 158
|
||||
+ /*11*/ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
||||
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
||||
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
||||
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", // 163 bytes
|
||||
};
|
||||
|
||||
for(i=0;i<numTests;i++) {
|
||||
@@ -2818,17 +2837,22 @@
|
||||
(void)rc; /* Suppress set but not used warning. */
|
||||
uenum_close(available);
|
||||
log_verbose(" got %s, %s [%s]\n", tmp[0]?tmp:"(EMPTY)", acceptResult(outResult), u_errorName(status));
|
||||
- if(outResult != tests[i].res) {
|
||||
+ if(status != tests[i].expectStatus) {
|
||||
+ log_err_status(status, "FAIL: expected status %s but got %s\n", u_errorName(tests[i].expectStatus), u_errorName(status));
|
||||
+ } else if(U_SUCCESS(tests[i].expectStatus)) {
|
||||
+ /* don't check content if expected failure */
|
||||
+ if(outResult != tests[i].res) {
|
||||
log_err_status(status, "FAIL: #%d: expected outResult of %s but got %s\n", i,
|
||||
acceptResult( tests[i].res),
|
||||
acceptResult( outResult));
|
||||
log_info("test #%d: http[%s], ICU[%s], expect %s, %s\n",
|
||||
i, http[tests[i].httpSet], tests[i].icuSet, tests[i].expect,acceptResult(tests[i].res));
|
||||
- }
|
||||
- if((outResult>0)&&uprv_strcmp(tmp, tests[i].expect)) {
|
||||
- log_err_status(status, "FAIL: #%d: expected %s but got %s\n", i, tests[i].expect, tmp);
|
||||
- log_info("test #%d: http[%s], ICU[%s], expect %s, %s\n",
|
||||
- i, http[tests[i].httpSet], tests[i].icuSet, tests[i].expect, acceptResult(tests[i].res));
|
||||
+ }
|
||||
+ if((outResult>0)&&uprv_strcmp(tmp, tests[i].expect)) {
|
||||
+ log_err_status(status, "FAIL: #%d: expected %s but got %s\n", i, tests[i].expect, tmp);
|
||||
+ log_info("test #%d: http[%s], ICU[%s], expect %s, %s\n",
|
||||
+ i, http[tests[i].httpSet], tests[i].icuSet, tests[i].expect, acceptResult(tests[i].res));
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,156 @@
|
|||
# https://ssl.icu-project.org/trac/changeset/39671
|
||||
Index: /trunk/icu4c/source/common/utext.cpp
|
||||
===================================================================
|
||||
--- icu.orig/source/common/utext.cpp
|
||||
+++ icu/source/common/utext.cpp
|
||||
@@ -848,7 +848,13 @@
|
||||
|
||||
// Chunk size.
|
||||
-// Must be less than 85, because of byte mapping from UChar indexes to native indexes.
|
||||
-// Worst case is three native bytes to one UChar. (Supplemenaries are 4 native bytes
|
||||
-// to two UChars.)
|
||||
+// Must be less than 42 (256/6), because of byte mapping from UChar indexes to native indexes.
|
||||
+// Worst case there are six UTF-8 bytes per UChar.
|
||||
+// obsolete 6 byte form fd + 5 trails maps to fffd
|
||||
+// obsolete 5 byte form fc + 4 trails maps to fffd
|
||||
+// non-shortest 4 byte forms maps to fffd
|
||||
+// normal supplementaries map to a pair of utf-16, two utf8 bytes per utf-16 unit
|
||||
+// mapToUChars array size must allow for the worst case, 6.
|
||||
+// This could be brought down to 4, by treating fd and fc as pure illegal,
|
||||
+// rather than obsolete lead bytes. But that is not compatible with the utf-8 access macros.
|
||||
//
|
||||
enum { UTF8_TEXT_CHUNK_SIZE=32 };
|
||||
@@ -890,5 +896,5 @@
|
||||
// one for a supplementary starting in the last normal position,
|
||||
// and one for an entry for the buffer limit position.
|
||||
- uint8_t mapToUChars[UTF8_TEXT_CHUNK_SIZE*3+6]; // Map native offset from bufNativeStart to
|
||||
+ uint8_t mapToUChars[UTF8_TEXT_CHUNK_SIZE*6+6]; // Map native offset from bufNativeStart to
|
||||
// correspoding offset in filled part of buf.
|
||||
int32_t align;
|
||||
@@ -1033,4 +1039,5 @@
|
||||
u8b = (UTF8Buf *)ut->p; // the current buffer
|
||||
mapIndex = ix - u8b->toUCharsMapStart;
|
||||
+ U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars));
|
||||
ut->chunkOffset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx;
|
||||
return TRUE;
|
||||
@@ -1299,4 +1306,8 @@
|
||||
// If index is at the end, there is no character there to look at.
|
||||
if (ix != ut->b) {
|
||||
+ // Note: this function will only move the index back if it is on a trail byte
|
||||
+ // and there is a preceding lead byte and the sequence from the lead
|
||||
+ // through this trail could be part of a valid UTF-8 sequence
|
||||
+ // Otherwise the index remains unchanged.
|
||||
U8_SET_CP_START(s8, 0, ix);
|
||||
}
|
||||
@@ -1312,5 +1323,8 @@
|
||||
uint8_t *mapToNative = u8b->mapToNative;
|
||||
uint8_t *mapToUChars = u8b->mapToUChars;
|
||||
- int32_t toUCharsMapStart = ix - (UTF8_TEXT_CHUNK_SIZE*3 + 1);
|
||||
+ int32_t toUCharsMapStart = ix - sizeof(UTF8Buf::mapToUChars) + 1;
|
||||
+ // Note that toUCharsMapStart can be negative. Happens when the remaining
|
||||
+ // text from current position to the beginning is less than the buffer size.
|
||||
+ // + 1 because mapToUChars must have a slot at the end for the bufNativeLimit entry.
|
||||
int32_t destIx = UTF8_TEXT_CHUNK_SIZE+2; // Start in the overflow region
|
||||
// at end of buffer to leave room
|
||||
@@ -1339,4 +1353,5 @@
|
||||
// Special case ASCII range for speed.
|
||||
buf[destIx] = (UChar)c;
|
||||
+ U_ASSERT(toUCharsMapStart <= srcIx);
|
||||
mapToUChars[srcIx - toUCharsMapStart] = (uint8_t)destIx;
|
||||
mapToNative[destIx] = (uint8_t)(srcIx - toUCharsMapStart);
|
||||
@@ -1368,4 +1383,5 @@
|
||||
mapToUChars[sIx-- - toUCharsMapStart] = (uint8_t)destIx;
|
||||
} while (sIx >= srcIx);
|
||||
+ U_ASSERT(toUCharsMapStart <= (srcIx+1));
|
||||
|
||||
// Set native indexing limit to be the current position.
|
||||
@@ -1542,4 +1558,5 @@
|
||||
U_ASSERT(index<=ut->chunkNativeLimit);
|
||||
int32_t mapIndex = index - u8b->toUCharsMapStart;
|
||||
+ U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars));
|
||||
int32_t offset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx;
|
||||
U_ASSERT(offset>=0 && offset<=ut->chunkLength);
|
||||
Index: /trunk/icu4c/source/test/intltest/utxttest.cpp
|
||||
===================================================================
|
||||
--- icu.orig/source/test/intltest/utxttest.cpp
|
||||
+++ icu/source/test/intltest/utxttest.cpp
|
||||
@@ -68,4 +68,6 @@
|
||||
case 7: name = "Ticket12130";
|
||||
if (exec) Ticket12130(); break;
|
||||
+ case 8: name = "Ticket12888";
|
||||
+ if (exec) Ticket12888(); break;
|
||||
default: name = ""; break;
|
||||
}
|
||||
@@ -1584,2 +1586,62 @@
|
||||
utext_close(&ut);
|
||||
}
|
||||
+
|
||||
+// Ticket 12888: bad handling of illegal utf-8 containing many instances of the archaic, now illegal,
|
||||
+// six byte utf-8 forms. Original implementation had an assumption that
|
||||
+// there would be at most three utf-8 bytes per UTF-16 code unit.
|
||||
+// The five and six byte sequences map to a single replacement character.
|
||||
+
|
||||
+void UTextTest::Ticket12888() {
|
||||
+ const char *badString =
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
|
||||
+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80";
|
||||
+
|
||||
+ UErrorCode status = U_ZERO_ERROR;
|
||||
+ LocalUTextPointer ut(utext_openUTF8(NULL, badString, -1, &status));
|
||||
+ TEST_SUCCESS(status);
|
||||
+ for (;;) {
|
||||
+ UChar32 c = utext_next32(ut.getAlias());
|
||||
+ if (c == U_SENTINEL) {
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ int32_t endIdx = utext_getNativeIndex(ut.getAlias());
|
||||
+ if (endIdx != (int32_t)strlen(badString)) {
|
||||
+ errln("%s:%d expected=%d, actual=%d", __FILE__, __LINE__, strlen(badString), endIdx);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ for (int32_t prevIndex = endIdx; prevIndex>0;) {
|
||||
+ UChar32 c = utext_previous32(ut.getAlias());
|
||||
+ int32_t currentIndex = utext_getNativeIndex(ut.getAlias());
|
||||
+ if (c != 0xfffd) {
|
||||
+ errln("%s:%d (expected, actual, index) = (%d, %d, %d)\n",
|
||||
+ __FILE__, __LINE__, 0xfffd, c, currentIndex);
|
||||
+ break;
|
||||
+ }
|
||||
+ if (currentIndex != prevIndex - 6) {
|
||||
+ errln("%s:%d: wrong index. Expected, actual = %d, %d",
|
||||
+ __FILE__, __LINE__, prevIndex - 6, currentIndex);
|
||||
+ break;
|
||||
+ }
|
||||
+ prevIndex = currentIndex;
|
||||
+ }
|
||||
+}
|
||||
Index: /trunk/icu4c/source/test/intltest/utxttest.h
|
||||
===================================================================
|
||||
--- icu.orig/source/test/intltest/utxttest.h
|
||||
+++ icu/source/test/intltest/utxttest.h
|
||||
@@ -39,4 +39,5 @@
|
||||
void Ticket10983();
|
||||
void Ticket12130();
|
||||
+ void Ticket12888();
|
||||
|
||||
private:
|
|
@ -0,0 +1,16 @@
|
|||
diff --git a/Source/WTF/wtf/PageBlock.h b/Source/WTF/wtf/PageBlock.h
|
||||
index 33d9118d..3e99decf 100644
|
||||
--- a/Source/WTF/wtf/PageBlock.h
|
||||
+++ b/Source/WTF/wtf/PageBlock.h
|
||||
@@ -49,9 +49,9 @@ namespace WTF {
|
||||
// Use 64 KiB for any unknown CPUs to be conservative.
|
||||
#if OS(DARWIN)
|
||||
constexpr size_t CeilingOnPageSize = 16 * KB;
|
||||
-#elif OS(WINDOWS) || CPU(MIPS) || CPU(MIPS64) || CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64)
|
||||
+#elif OS(WINDOWS) || CPU(MIPS) || CPU(MIPS64) || CPU(X86) || CPU(X86_64) || CPU(ARM)
|
||||
constexpr size_t CeilingOnPageSize = 4 * KB;
|
||||
-#elif CPU(UNKNOWN) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE)
|
||||
+#elif CPU(UNKNOWN) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(ARM64)
|
||||
constexpr size_t CeilingOnPageSize = 64 * KB;
|
||||
#else
|
||||
#error Must set CeilingOnPageSize in PageBlock.h when adding a new CPU architecture!
|
|
@ -0,0 +1,25 @@
|
|||
Index: /Source/JavaScriptCore/heap/GCMemoryOperations.h
|
||||
===================================================================
|
||||
--- /Source/JavaScriptCore/heap/GCMemoryOperations.h (revision 261325)
|
||||
+++ /Source/JavaScriptCore/heap/GCMemoryOperations.h (revision 261326)
|
||||
@@ -54,5 +54,5 @@
|
||||
};
|
||||
|
||||
-#if COMPILER(GCC_COMPATIBLE) && USE(JSVALUE64)
|
||||
+#if COMPILER(GCC_COMPATIBLE) && (CPU(X86_64) || CPU(ARM64))
|
||||
if (bytes <= smallCutoff)
|
||||
slowPathForwardMemcpy();
|
||||
@@ -122,6 +122,4 @@
|
||||
: "d0", "d1", "memory"
|
||||
);
|
||||
-#else
|
||||
- slowPathForwardMemcpy();
|
||||
#endif // CPU(X86_64)
|
||||
} else {
|
||||
@@ -140,5 +138,5 @@
|
||||
#else
|
||||
slowPathForwardMemcpy();
|
||||
-#endif // COMPILER(GCC_COMPATIBLE)
|
||||
+#endif // COMPILER(GCC_COMPATIBLE) && (CPU(X86_64) || CPU(ARM64))
|
||||
#else
|
||||
memcpy(dst, src, bytes);
|
|
@ -0,0 +1,53 @@
|
|||
diff --git a/Source/JavaScriptCore/API/glib/JSCOptions.cpp b/Source/JavaScriptCore/API/glib/JSCOptions.cpp
|
||||
index e730b85563f3..0d66596626d6 100644
|
||||
--- a/Source/JavaScriptCore/API/glib/JSCOptions.cpp
|
||||
+++ b/Source/JavaScriptCore/API/glib/JSCOptions.cpp
|
||||
@@ -73,7 +73,6 @@ static void valueToGValue(int32_t value, GValue* gValue)
|
||||
g_value_set_int(gValue, value);
|
||||
}
|
||||
|
||||
-#if CPU(ADDRESS64)
|
||||
static bool valueFromGValue(const GValue* gValue, unsigned& value)
|
||||
{
|
||||
value = g_value_get_uint(gValue);
|
||||
@@ -84,7 +83,6 @@ static void valueToGValue(unsigned value, GValue* gValue)
|
||||
{
|
||||
g_value_set_uint(gValue, value);
|
||||
}
|
||||
-#endif
|
||||
|
||||
static bool valueFromGValue(const GValue* gValue, size_t& value)
|
||||
{
|
||||
@@ -542,12 +540,10 @@ static JSCOptionType jscOptionsType(int)
|
||||
return JSC_OPTION_INT;
|
||||
}
|
||||
|
||||
-#if CPU(ADDRESS64)
|
||||
static JSCOptionType jscOptionsType(unsigned)
|
||||
{
|
||||
return JSC_OPTION_UINT;
|
||||
}
|
||||
-#endif
|
||||
|
||||
static JSCOptionType jscOptionsType(size_t)
|
||||
{
|
||||
diff --git a/Source/JavaScriptCore/runtime/Options.cpp b/Source/JavaScriptCore/runtime/Options.cpp
|
||||
index 74ccdeb2794c..359618472534 100644
|
||||
--- a/Source/JavaScriptCore/runtime/Options.cpp
|
||||
+++ b/Source/JavaScriptCore/runtime/Options.cpp
|
||||
@@ -88,7 +88,6 @@ Optional<OptionsStorage::Unsigned> parse(const char* string)
|
||||
return WTF::nullopt;
|
||||
}
|
||||
|
||||
-#if CPU(ADDRESS64) || OS(DARWIN)
|
||||
template<>
|
||||
Optional<OptionsStorage::Size> parse(const char* string)
|
||||
{
|
||||
@@ -97,7 +96,6 @@ Optional<OptionsStorage::Size> parse(const char* string)
|
||||
return value;
|
||||
return WTF::nullopt;
|
||||
}
|
||||
-#endif // CPU(ADDRESS64) || OS(DARWIN)
|
||||
|
||||
template<>
|
||||
Optional<OptionsStorage::Double> parse(const char* string)
|
|
@ -0,0 +1,35 @@
|
|||
From ecbb859d88eacad10bf556044abaeaed6c9b32fc Mon Sep 17 00:00:00 2001
|
||||
From: "berto@igalia.com"
|
||||
<berto@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
|
||||
Date: Thu, 2 Nov 2017 13:41:16 +0000
|
||||
Subject: [PATCH] Unreviewed, fix typos in library names for the GTK+ port.
|
||||
|
||||
* Source/cmake/OptionsGTK.cmake:
|
||||
|
||||
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@224329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
|
||||
---
|
||||
ChangeLog | 6 ++++++
|
||||
Source/cmake/OptionsGTK.cmake | 4 ++--
|
||||
2 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
|
||||
index 2b440a27376..6c99868ae86 100644
|
||||
--- a/Source/cmake/OptionsGTK.cmake
|
||||
+++ b/Source/cmake/OptionsGTK.cmake
|
||||
@@ -367,11 +367,11 @@ endif ()
|
||||
if (USE_WOFF2)
|
||||
find_package(BrotliDec 1.0.1)
|
||||
if (NOT BROTLIDEC_FOUND)
|
||||
- message(FATAL_ERROR "librotlidec is needed for USE_WOFF2.")
|
||||
+ message(FATAL_ERROR "libbrotlidec is needed for USE_WOFF2.")
|
||||
endif ()
|
||||
find_package(WOFF2Dec 1.0.1)
|
||||
if (NOT WOFF2DEC_FOUND)
|
||||
- message(FATAL_ERROR "liwoff2dec is needed for USE_WOFF2.")
|
||||
+ message(FATAL_ERROR "libwoff2dec is needed for USE_WOFF2.")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
--
|
||||
2.16.2
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
|
||||
index 79012303d508..4ca6d6acbc6f 100644
|
||||
--- a/Source/cmake/OptionsGTK.cmake
|
||||
+++ b/Source/cmake/OptionsGTK.cmake
|
||||
@@ -20,7 +20,7 @@ set(INTROSPECTION_INSTALL_TYPELIBDIR "${LIB_INSTALL_DIR}/girepository-1.0")
|
||||
find_package(Cairo 1.14.0 REQUIRED)
|
||||
find_package(Fontconfig 2.8.0 REQUIRED)
|
||||
find_package(Freetype 2.4.2 REQUIRED)
|
||||
-find_package(LibGcrypt 1.6.0 REQUIRED)
|
||||
+find_package(LibGcrypt 1.5.3 REQUIRED)
|
||||
find_package(GLIB 2.44.0 REQUIRED COMPONENTS gio gio-unix gobject gthread gmodule)
|
||||
find_package(GTK3 3.22.0 REQUIRED)
|
||||
find_package(GDK3 3.22.0 REQUIRED)
|
|
@ -0,0 +1,509 @@
|
|||
--- webkitgtk-2.22.5/Source/cmake/FindWebP.cmake.no_webp_demux 2019-01-22 13:38:34.224690921 +0100
|
||||
+++ webkitgtk-2.22.5/Source/cmake/FindWebP.cmake 2019-01-22 14:21:18.442548284 +0100
|
||||
@@ -33,34 +33,20 @@ find_package(PkgConfig)
|
||||
pkg_check_modules(PC_WEBP QUIET libwebp)
|
||||
|
||||
# Look for the header file.
|
||||
-find_path(WEBP_INCLUDE_DIR
|
||||
+find_path(WEBP_INCLUDE_DIRS
|
||||
NAMES webp/decode.h
|
||||
HINTS ${PC_WEBP_INCLUDEDIR} ${PC_WEBP_INCLUDE_DIRS}
|
||||
)
|
||||
-list(APPEND WEBP_INCLUDE_DIRS ${WEBP_INCLUDE_DIR})
|
||||
mark_as_advanced(WEBP_INCLUDE_DIRS)
|
||||
|
||||
# Look for the library.
|
||||
find_library(
|
||||
- WEBP_LIBRARY
|
||||
+ WEBP_LIBRARIES
|
||||
NAMES webp
|
||||
HINTS ${PC_WEBP_LIBDIR} ${PC_WEBP_LIBRARY_DIRS}
|
||||
)
|
||||
-list(APPEND WEBP_LIBRARIES ${WEBP_LIBRARY})
|
||||
|
||||
-find_path(WEBP_DEMUX_INCLUDE_DIR
|
||||
- NAMES webp/demux.h
|
||||
- HINTS ${PC_WEBP_INCLUDEDIR} ${PC_WEBP_INCLUDE_DIRS}
|
||||
-)
|
||||
-list(APPEND WEBP_INCLUDE_DIRS ${WEBP_DEMUX_INCLUDE_DIR})
|
||||
-
|
||||
-find_library(WEBP_DEMUX_LIBRARY
|
||||
- NAMES webpdemux
|
||||
- HINTS ${PC_WEBP_LIBDIR} ${PC_WEBP_LIBRARY_DIRS}
|
||||
-)
|
||||
-list(APPEND WEBP_LIBRARIES ${WEBP_DEMUX_LIBRARY})
|
||||
-
|
||||
-mark_as_advanced(WEBP_DEMUX_INCLUDE_DIR WEBP_DEMUX_LIBRARY WEBP_INCLUDE_DIR WEBP_LIBRARY WEBP_LIBRARIES)
|
||||
+mark_as_advanced(WEBP_LIBRARIES)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(WebP REQUIRED_VARS WEBP_INCLUDE_DIRS WEBP_LIBRARIES
|
||||
--- webkitgtk-2.22.5/Source/WebCore/platform/graphics/ImageBackingStore.h.no_webp_demux 2017-11-30 11:23:29.000000000 +0100
|
||||
+++ webkitgtk-2.22.5/Source/WebCore/platform/graphics/ImageBackingStore.h 2019-01-22 13:38:34.224690921 +0100
|
||||
@@ -147,6 +147,7 @@ public:
|
||||
setPixel(pixelAt(x, y), r, g, b, a);
|
||||
}
|
||||
|
||||
+#if ENABLE(APNG)
|
||||
void blendPixel(uint32_t* dest, unsigned r, unsigned g, unsigned b, unsigned a)
|
||||
{
|
||||
if (!a)
|
||||
@@ -174,6 +175,7 @@ public:
|
||||
else
|
||||
*dest = makeUnPremultipliedRGBA(r, g, b, a).value();
|
||||
}
|
||||
+#endif
|
||||
|
||||
static bool isOverSize(const IntSize& size)
|
||||
{
|
||||
--- webkitgtk-2.22.5/Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.cpp.no_webp_demux 2019-01-22 13:38:34.225690919 +0100
|
||||
+++ webkitgtk-2.22.5/Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.cpp 2019-01-22 14:48:11.041983180 +0100
|
||||
@@ -32,49 +32,47 @@
|
||||
|
||||
#if USE(WEBP)
|
||||
|
||||
-namespace WebCore {
|
||||
+// Backward emulation for earlier versions than 0.1.99.
|
||||
+#if (WEBP_DECODER_ABI_VERSION < 0x0163)
|
||||
+#define MODE_rgbA MODE_RGBA
|
||||
+#define MODE_bgrA MODE_BGRA
|
||||
+#endif
|
||||
+
|
||||
+#if CPU(BIG_ENDIAN) || CPU(MIDDLE_ENDIAN)
|
||||
+inline WEBP_CSP_MODE outputMode(bool hasAlpha) { return hasAlpha ? MODE_rgbA : MODE_RGBA; }
|
||||
+#else // LITTLE_ENDIAN, output BGRA pixels.
|
||||
+inline WEBP_CSP_MODE outputMode(bool hasAlpha) { return hasAlpha ? MODE_bgrA : MODE_BGRA; }
|
||||
+#endif
|
||||
|
||||
-// Convenience function to improve code readability, as WebPDemuxGetFrame is +1 based.
|
||||
-bool webpFrameAtIndex(WebPDemuxer* demuxer, size_t index, WebPIterator* webpFrame)
|
||||
-{
|
||||
- return WebPDemuxGetFrame(demuxer, index + 1, webpFrame);
|
||||
-}
|
||||
+namespace WebCore {
|
||||
|
||||
WEBPImageDecoder::WEBPImageDecoder(AlphaOption alphaOption, GammaAndColorProfileOption gammaAndColorProfileOption)
|
||||
: ScalableImageDecoder(alphaOption, gammaAndColorProfileOption)
|
||||
+ , m_decoder(0)
|
||||
+ , m_hasAlpha(false)
|
||||
{
|
||||
}
|
||||
|
||||
-WEBPImageDecoder::~WEBPImageDecoder() = default;
|
||||
-
|
||||
-void WEBPImageDecoder::setData(SharedBuffer& data, bool allDataReceived)
|
||||
+WEBPImageDecoder::~WEBPImageDecoder()
|
||||
{
|
||||
- if (failed())
|
||||
- return;
|
||||
-
|
||||
- // We need to ensure that the header is parsed everytime new data arrives, as the number
|
||||
- // of frames may change until we have the complete data. If the size has not been obtained
|
||||
- // yet, the call to ScalableImageDecoder::setData() will call parseHeader() and set
|
||||
- // m_headerParsed to true, so the call to parseHeader() at the end won't do anything. If the size
|
||||
- // is available, then parseHeader() is only called once.
|
||||
- m_headerParsed = false;
|
||||
- ScalableImageDecoder::setData(data, allDataReceived);
|
||||
- parseHeader();
|
||||
+ clear();
|
||||
}
|
||||
|
||||
-RepetitionCount WEBPImageDecoder::repetitionCount() const
|
||||
+void WEBPImageDecoder::clear()
|
||||
{
|
||||
- if (failed())
|
||||
- return RepetitionCountOnce;
|
||||
-
|
||||
- return m_repetitionCount ? m_repetitionCount : RepetitionCountInfinite;
|
||||
+ if (m_decoder)
|
||||
+ WebPIDelete(m_decoder);
|
||||
+ m_decoder = 0;
|
||||
}
|
||||
|
||||
ScalableImageDecoderFrame* WEBPImageDecoder::frameBufferAtIndex(size_t index)
|
||||
{
|
||||
- if (index >= frameCount())
|
||||
+ if (index)
|
||||
return 0;
|
||||
|
||||
+ if (m_frameBufferCache.isEmpty())
|
||||
+ m_frameBufferCache.grow(1);
|
||||
+
|
||||
// The size of m_frameBufferCache may be smaller than the index requested. This can happen
|
||||
// because new data may have arrived with a bigger frameCount, but decode() hasn't been called
|
||||
// yet, which is the one that resizes the cache.
|
||||
@@ -86,275 +84,73 @@ ScalableImageDecoderFrame* WEBPImageDeco
|
||||
return &m_frameBufferCache[index];
|
||||
}
|
||||
|
||||
-size_t WEBPImageDecoder::findFirstRequiredFrameToDecode(size_t frameIndex, WebPDemuxer* demuxer)
|
||||
-{
|
||||
- // The first frame doesn't depend on any other.
|
||||
- if (!frameIndex)
|
||||
- return 0;
|
||||
-
|
||||
- // Go backwards and find the first complete frame.
|
||||
- size_t firstIncompleteFrame = frameIndex;
|
||||
- for (; firstIncompleteFrame; --firstIncompleteFrame) {
|
||||
- if (m_frameBufferCache[firstIncompleteFrame - 1].isComplete())
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- // Check if there are any independent frames between firstIncompleteFrame and frameIndex.
|
||||
- for (size_t firstIndependentFrame = frameIndex; firstIndependentFrame > firstIncompleteFrame ; --firstIndependentFrame) {
|
||||
- WebPIterator webpFrame;
|
||||
- if (!webpFrameAtIndex(demuxer, firstIndependentFrame, &webpFrame))
|
||||
- continue;
|
||||
-
|
||||
- IntRect frameRect(webpFrame.x_offset, webpFrame.y_offset, webpFrame.width, webpFrame.height);
|
||||
- if (!frameRect.contains({ { }, size() }))
|
||||
- continue;
|
||||
-
|
||||
- // This frame covers the whole area and doesn't have alpha, so it can be rendered without
|
||||
- // dependencies.
|
||||
- if (!webpFrame.has_alpha)
|
||||
- return firstIndependentFrame;
|
||||
-
|
||||
- // This frame covers the whole area and its disposalMethod is RestoreToBackground, which means
|
||||
- // that the next frame will be rendered on top of a transparent background, and can be decoded
|
||||
- // without dependencies. This can only be checked for frames prior to frameIndex.
|
||||
- if (firstIndependentFrame < frameIndex && m_frameBufferCache[firstIndependentFrame].disposalMethod() == ScalableImageDecoderFrame::DisposalMethod::RestoreToBackground)
|
||||
- return firstIndependentFrame + 1;
|
||||
- }
|
||||
-
|
||||
- return firstIncompleteFrame;
|
||||
-}
|
||||
-
|
||||
-void WEBPImageDecoder::decode(size_t frameIndex, bool allDataReceived)
|
||||
+bool WEBPImageDecoder::decode(bool onlySize, bool)
|
||||
{
|
||||
if (failed())
|
||||
- return;
|
||||
-
|
||||
- // This can be executed both in the main thread (when not using async decoding) or in the decoding thread.
|
||||
- // When executed in the decoding thread, a call to setData() from the main thread may change the data
|
||||
- // the WebPDemuxer is using, leaving it in an inconsistent state, so we need to protect the data.
|
||||
- RefPtr<SharedBuffer::DataSegment> protectedData(m_data);
|
||||
- WebPData inputData = { reinterpret_cast<const uint8_t*>(protectedData->data()), protectedData->size() };
|
||||
- WebPDemuxState demuxerState;
|
||||
- WebPDemuxer* demuxer = WebPDemuxPartial(&inputData, &demuxerState);
|
||||
- if (!demuxer) {
|
||||
- setFailed();
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- m_frameBufferCache.resize(m_frameCount);
|
||||
-
|
||||
- // It is a fatal error if all data is received and we have decoded all frames available but the file is truncated.
|
||||
- if (frameIndex >= m_frameBufferCache.size() - 1 && allDataReceived && demuxer && demuxerState != WEBP_DEMUX_DONE) {
|
||||
- WebPDemuxDelete(demuxer);
|
||||
- setFailed();
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- for (size_t i = findFirstRequiredFrameToDecode(frameIndex, demuxer); i <= frameIndex; i++)
|
||||
- decodeFrame(i, demuxer);
|
||||
+ return false;
|
||||
|
||||
- WebPDemuxDelete(demuxer);
|
||||
-}
|
||||
+ const uint8_t* dataBytes = reinterpret_cast<const uint8_t*>(m_data->data());
|
||||
+ const size_t dataSize = m_data->size();
|
||||
|
||||
-void WEBPImageDecoder::decodeFrame(size_t frameIndex, WebPDemuxer* demuxer)
|
||||
-{
|
||||
- if (failed())
|
||||
- return;
|
||||
+ if (ScalableImageDecoder::encodedDataStatus() < EncodedDataStatus::SizeAvailable) {
|
||||
+ static const size_t imageHeaderSize = 30;
|
||||
+ if (dataSize < imageHeaderSize)
|
||||
+ return false;
|
||||
+ int width, height;
|
||||
+#if (WEBP_DECODER_ABI_VERSION >= 0x0163)
|
||||
+ WebPBitstreamFeatures features;
|
||||
+ if (WebPGetFeatures(dataBytes, dataSize, &features) != VP8_STATUS_OK)
|
||||
+ return setFailed();
|
||||
+ width = features.width;
|
||||
+ height = features.height;
|
||||
+ m_hasAlpha = features.has_alpha;
|
||||
+#else
|
||||
+ // Earlier version won't be able to display WebP files with alpha.
|
||||
+ if (!WebPGetInfo(dataBytes, dataSize, &width, &height))
|
||||
+ return setFailed();
|
||||
+ m_hasAlpha = false;
|
||||
+#endif
|
||||
+ if (!setSize(IntSize(width, height)))
|
||||
+ return setFailed();
|
||||
+ }
|
||||
+
|
||||
+ ASSERT(ScalableImageDecoder::encodedDataStatus() >= EncodedDataStatus::SizeAvailable);
|
||||
+ if (onlySize)
|
||||
+ return true;
|
||||
|
||||
- WebPIterator webpFrame;
|
||||
- if (!webpFrameAtIndex(demuxer, frameIndex, &webpFrame))
|
||||
- return;
|
||||
-
|
||||
- const uint8_t* dataBytes = reinterpret_cast<const uint8_t*>(webpFrame.fragment.bytes);
|
||||
- size_t dataSize = webpFrame.fragment.size;
|
||||
- bool blend = webpFrame.blend_method == WEBP_MUX_BLEND ? true : false;
|
||||
-
|
||||
- ASSERT(m_frameBufferCache.size() > frameIndex);
|
||||
- auto& buffer = m_frameBufferCache[frameIndex];
|
||||
- buffer.setDuration(Seconds::fromMilliseconds(webpFrame.duration));
|
||||
- buffer.setDisposalMethod(webpFrame.dispose_method == WEBP_MUX_DISPOSE_BACKGROUND ? ScalableImageDecoderFrame::DisposalMethod::RestoreToBackground : ScalableImageDecoderFrame::DisposalMethod::DoNotDispose);
|
||||
+ ASSERT(!m_frameBufferCache.isEmpty());
|
||||
+ auto& buffer = m_frameBufferCache[0];
|
||||
ASSERT(!buffer.isComplete());
|
||||
|
||||
- if (buffer.isInvalid() && !initFrameBuffer(frameIndex, &webpFrame)) {
|
||||
- setFailed();
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- WebPDecBuffer decoderBuffer;
|
||||
- WebPInitDecBuffer(&decoderBuffer);
|
||||
- decoderBuffer.colorspace = MODE_RGBA;
|
||||
- decoderBuffer.u.RGBA.stride = webpFrame.width * sizeof(uint32_t);
|
||||
- decoderBuffer.u.RGBA.size = decoderBuffer.u.RGBA.stride * webpFrame.height;
|
||||
- decoderBuffer.is_external_memory = 1;
|
||||
- auto p = makeUniqueArray<uint8_t>(decoderBuffer.u.RGBA.size);
|
||||
- decoderBuffer.u.RGBA.rgba = p.get();
|
||||
- if (!decoderBuffer.u.RGBA.rgba) {
|
||||
- setFailed();
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- WebPIDecoder* decoder = WebPINewDecoder(&decoderBuffer);
|
||||
- if (!decoder) {
|
||||
- setFailed();
|
||||
- return;
|
||||
+ if (buffer.isInvalid()) {
|
||||
+ if (!buffer.initialize(size(), m_premultiplyAlpha))
|
||||
+ return setFailed();
|
||||
+ buffer.setDecodingStatus(DecodingStatus::Partial);
|
||||
+ buffer.setHasAlpha(m_hasAlpha);
|
||||
+ }
|
||||
+
|
||||
+ if (!m_decoder) {
|
||||
+ WEBP_CSP_MODE mode = outputMode(m_hasAlpha);
|
||||
+ if (!m_premultiplyAlpha)
|
||||
+ mode = outputMode(false);
|
||||
+ int rowStride = size().width() * sizeof(RGBA32);
|
||||
+ uint8_t* output = reinterpret_cast<uint8_t*>(buffer.backingStore()->pixelAt(0, 0));
|
||||
+ int outputSize = size().height() * rowStride;
|
||||
+ m_decoder = WebPINewRGB(mode, output, outputSize, rowStride);
|
||||
+ if (!m_decoder)
|
||||
+ return setFailed();
|
||||
}
|
||||
|
||||
- switch (WebPIUpdate(decoder, dataBytes, dataSize)) {
|
||||
+ switch (WebPIUpdate(m_decoder, dataBytes, dataSize)) {
|
||||
case VP8_STATUS_OK:
|
||||
- applyPostProcessing(frameIndex, decoder, decoderBuffer, blend);
|
||||
buffer.setDecodingStatus(DecodingStatus::Complete);
|
||||
- break;
|
||||
+ clear();
|
||||
+ return true;
|
||||
case VP8_STATUS_SUSPENDED:
|
||||
- if (!isAllDataReceived()) {
|
||||
- applyPostProcessing(frameIndex, decoder, decoderBuffer, blend);
|
||||
- buffer.setDecodingStatus(DecodingStatus::Partial);
|
||||
- break;
|
||||
- }
|
||||
- // Fallthrough.
|
||||
- default:
|
||||
- setFailed();
|
||||
- }
|
||||
-
|
||||
- WebPIDelete(decoder);
|
||||
-}
|
||||
-
|
||||
-bool WEBPImageDecoder::initFrameBuffer(size_t frameIndex, const WebPIterator* webpFrame)
|
||||
-{
|
||||
- if (frameIndex >= frameCount())
|
||||
return false;
|
||||
-
|
||||
- auto& buffer = m_frameBufferCache[frameIndex];
|
||||
-
|
||||
- // Initialize the frame rect in our buffer.
|
||||
- IntRect frameRect(webpFrame->x_offset, webpFrame->y_offset, webpFrame->width, webpFrame->height);
|
||||
-
|
||||
- // Make sure the frameRect doesn't extend outside the buffer.
|
||||
- frameRect.intersect({ { }, size() });
|
||||
-
|
||||
- if (!frameIndex || !m_frameBufferCache[frameIndex - 1].backingStore()) {
|
||||
- // This frame doesn't rely on any previous data.
|
||||
- if (!buffer.initialize(size(), m_premultiplyAlpha))
|
||||
- return false;
|
||||
- } else {
|
||||
- const auto& prevBuffer = m_frameBufferCache[frameIndex - 1];
|
||||
- ASSERT(prevBuffer.isComplete());
|
||||
-
|
||||
- // Preserve the last frame as the starting state for this frame.
|
||||
- if (!prevBuffer.backingStore() || !buffer.initialize(*prevBuffer.backingStore()))
|
||||
- return false;
|
||||
-
|
||||
- if (prevBuffer.disposalMethod() == ScalableImageDecoderFrame::DisposalMethod::RestoreToBackground) {
|
||||
- // We want to clear the previous frame to transparent, without
|
||||
- // affecting pixels in the image outside of the frame.
|
||||
- const IntRect& prevRect = prevBuffer.backingStore()->frameRect();
|
||||
- buffer.backingStore()->clearRect(prevRect);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- buffer.setHasAlpha(webpFrame->has_alpha);
|
||||
- buffer.backingStore()->setFrameRect(frameRect);
|
||||
-
|
||||
- return true;
|
||||
-}
|
||||
-
|
||||
-void WEBPImageDecoder::applyPostProcessing(size_t frameIndex, WebPIDecoder* decoder, WebPDecBuffer& decoderBuffer, bool blend)
|
||||
-{
|
||||
- auto& buffer = m_frameBufferCache[frameIndex];
|
||||
- int decodedWidth = 0;
|
||||
- int decodedHeight = 0;
|
||||
- if (!WebPIDecGetRGB(decoder, &decodedHeight, &decodedWidth, 0, 0))
|
||||
- return; // See also https://bugs.webkit.org/show_bug.cgi?id=74062
|
||||
- if (decodedHeight <= 0)
|
||||
- return;
|
||||
-
|
||||
- const IntRect& frameRect = buffer.backingStore()->frameRect();
|
||||
- ASSERT_WITH_SECURITY_IMPLICATION(decodedWidth == frameRect.width());
|
||||
- ASSERT_WITH_SECURITY_IMPLICATION(decodedHeight <= frameRect.height());
|
||||
- const int left = frameRect.x();
|
||||
- const int top = frameRect.y();
|
||||
-
|
||||
- for (int y = 0; y < decodedHeight; y++) {
|
||||
- const int canvasY = top + y;
|
||||
- for (int x = 0; x < decodedWidth; x++) {
|
||||
- const int canvasX = left + x;
|
||||
- auto* address = buffer.backingStore()->pixelAt(canvasX, canvasY);
|
||||
- uint8_t* pixel = decoderBuffer.u.RGBA.rgba + (y * frameRect.width() + x) * sizeof(uint32_t);
|
||||
- if (blend && (pixel[3] < 255))
|
||||
- buffer.backingStore()->blendPixel(address, pixel[0], pixel[1], pixel[2], pixel[3]);
|
||||
- else
|
||||
- buffer.backingStore()->setPixel(address, pixel[0], pixel[1], pixel[2], pixel[3]);
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-void WEBPImageDecoder::parseHeader()
|
||||
-{
|
||||
- if (m_headerParsed)
|
||||
- return;
|
||||
-
|
||||
- m_headerParsed = true;
|
||||
-
|
||||
- const unsigned webpHeaderSize = 30; // RIFF_HEADER_SIZE + CHUNK_HEADER_SIZE + VP8_FRAME_HEADER_SIZE
|
||||
- if (m_data->size() < webpHeaderSize)
|
||||
- return; // Await VP8X header so WebPDemuxPartial succeeds.
|
||||
-
|
||||
- WebPData inputData = { reinterpret_cast<const uint8_t*>(m_data->data()), m_data->size() };
|
||||
- WebPDemuxState demuxerState;
|
||||
- WebPDemuxer* demuxer = WebPDemuxPartial(&inputData, &demuxerState);
|
||||
- if (!demuxer) {
|
||||
- setFailed();
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- m_frameCount = WebPDemuxGetI(demuxer, WEBP_FF_FRAME_COUNT);
|
||||
- if (!m_frameCount) {
|
||||
- WebPDemuxDelete(demuxer);
|
||||
- return; // Wait until the encoded image frame data arrives.
|
||||
- }
|
||||
-
|
||||
- int width = WebPDemuxGetI(demuxer, WEBP_FF_CANVAS_WIDTH);
|
||||
- int height = WebPDemuxGetI(demuxer, WEBP_FF_CANVAS_HEIGHT);
|
||||
- if (!isSizeAvailable() && !setSize(IntSize(width, height))) {
|
||||
- WebPDemuxDelete(demuxer);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- m_formatFlags = WebPDemuxGetI(demuxer, WEBP_FF_FORMAT_FLAGS);
|
||||
- if (!(m_formatFlags & ANIMATION_FLAG))
|
||||
- m_repetitionCount = WebCore::RepetitionCountNone;
|
||||
- else {
|
||||
- // Since we have parsed at least one frame, even if partially,
|
||||
- // the global animation (ANIM) properties have been read since
|
||||
- // an ANIM chunk must precede the ANMF frame chunks.
|
||||
- m_repetitionCount = WebPDemuxGetI(demuxer, WEBP_FF_LOOP_COUNT);
|
||||
- ASSERT(m_repetitionCount == (m_repetitionCount & 0xffff)); // Loop count is always <= 16 bits.
|
||||
- if (!m_repetitionCount)
|
||||
- m_repetitionCount = WebCore::RepetitionCountInfinite;
|
||||
- }
|
||||
-
|
||||
- WebPDemuxDelete(demuxer);
|
||||
-}
|
||||
-
|
||||
-void WEBPImageDecoder::clearFrameBufferCache(size_t clearBeforeFrame)
|
||||
-{
|
||||
- if (m_frameBufferCache.isEmpty())
|
||||
- return;
|
||||
-
|
||||
- // We don't want to delete the last frame in the cache, as is may be needed for
|
||||
- // decoding when new data arrives. See GIFImageDecoder for the full explanation.
|
||||
- clearBeforeFrame = std::min(clearBeforeFrame, m_frameBufferCache.size() - 1);
|
||||
-
|
||||
- // Also from GIFImageDecoder: We need to preserve frames such that:
|
||||
- // * We don't clear |clearBeforeFrame|.
|
||||
- // * We don't clear the frame we're currently decoding.
|
||||
- // * We don't clear any frame from which a future initFrameBuffer() call will copy bitmap data.
|
||||
- //
|
||||
- // In WEBP every frame depends on the previous one or none. That means that frames after clearBeforeFrame
|
||||
- // won't need any frame before them to render, so we can clear them all.
|
||||
- for (int i = clearBeforeFrame - 1; i >= 0; i--) {
|
||||
- auto& buffer = m_frameBufferCache[i];
|
||||
- if (!buffer.isInvalid())
|
||||
- buffer.clear();
|
||||
+ default:
|
||||
+ clear();
|
||||
+ return setFailed();
|
||||
}
|
||||
}
|
||||
|
||||
--- webkitgtk-2.22.5/Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.h.no_webp_demux 2018-07-25 13:56:31.000000000 +0200
|
||||
+++ webkitgtk-2.22.5/Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.h 2019-01-22 14:11:28.656237722 +0100
|
||||
@@ -33,7 +33,6 @@
|
||||
#if USE(WEBP)
|
||||
|
||||
#include "webp/decode.h"
|
||||
-#include "webp/demux.h"
|
||||
|
||||
namespace WebCore {
|
||||
|
||||
@@ -47,26 +46,18 @@ public:
|
||||
virtual ~WEBPImageDecoder();
|
||||
|
||||
String filenameExtension() const override { return "webp"_s; }
|
||||
- void setData(SharedBuffer&, bool) final;
|
||||
ScalableImageDecoderFrame* frameBufferAtIndex(size_t index) override;
|
||||
- RepetitionCount repetitionCount() const override;
|
||||
- size_t frameCount() const override { return m_frameCount; }
|
||||
- void clearFrameBufferCache(size_t) override;
|
||||
|
||||
private:
|
||||
WEBPImageDecoder(AlphaOption, GammaAndColorProfileOption);
|
||||
- void tryDecodeSize(bool) override { parseHeader(); }
|
||||
- void decode(size_t, bool);
|
||||
- void decodeFrame(size_t, WebPDemuxer*);
|
||||
- void parseHeader();
|
||||
- bool initFrameBuffer(size_t, const WebPIterator*);
|
||||
- void applyPostProcessing(size_t, WebPIDecoder*, WebPDecBuffer&, bool);
|
||||
- size_t findFirstRequiredFrameToDecode(size_t, WebPDemuxer*);
|
||||
-
|
||||
- int m_repetitionCount { 0 };
|
||||
- size_t m_frameCount { 0 };
|
||||
- int m_formatFlags { 0 };
|
||||
- bool m_headerParsed { false };
|
||||
+ void tryDecodeSize(bool allDataReceived) override { decode(true, allDataReceived); }
|
||||
+
|
||||
+ bool decode(bool onlySize, bool allDataReceived);
|
||||
+
|
||||
+ WebPIDecoder* m_decoder;
|
||||
+ bool m_hasAlpha;
|
||||
+
|
||||
+ void clear();
|
||||
};
|
||||
|
||||
} // namespace WebCore
|
|
@ -0,0 +1,371 @@
|
|||
diff --git a/Source/WebCore/dom/ElementIdentifier.h b/Source/WebCore/dom/ElementIdentifier.h
|
||||
index 2ed378242a4c..5cea026d9362 100644
|
||||
--- a/Source/WebCore/dom/ElementIdentifier.h
|
||||
+++ b/Source/WebCore/dom/ElementIdentifier.h
|
||||
@@ -25,11 +25,150 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
-#include <wtf/ObjectIdentifier.h>
|
||||
+#include <atomic>
|
||||
+#include <mutex>
|
||||
+#include <wtf/HashTraits.h>
|
||||
+#include <wtf/NeverDestroyed.h>
|
||||
+#include <wtf/text/TextStream.h>
|
||||
+#include <wtf/text/WTFString.h>
|
||||
|
||||
namespace WebCore {
|
||||
|
||||
enum ElementIdentifierType { };
|
||||
-using ElementIdentifier = ObjectIdentifier<ElementIdentifierType>;
|
||||
|
||||
+class ElementIdentifierBase {
|
||||
+protected:
|
||||
+ WTF_EXPORT_PRIVATE static uint64_t generateIdentifierInternal();
|
||||
+ WTF_EXPORT_PRIVATE static uint64_t generateThreadSafeIdentifierInternal();
|
||||
+};
|
||||
+
|
||||
+class ElementIdentifier : private ElementIdentifierBase {
|
||||
+public:
|
||||
+ static ElementIdentifier generate()
|
||||
+ {
|
||||
+ RELEASE_ASSERT(!m_generationProtected);
|
||||
+ return ElementIdentifier { generateIdentifierInternal() };
|
||||
+ }
|
||||
+
|
||||
+ static ElementIdentifier generateThreadSafe()
|
||||
+ {
|
||||
+ RELEASE_ASSERT(!m_generationProtected);
|
||||
+ return ElementIdentifier { generateThreadSafeIdentifierInternal() };
|
||||
+ }
|
||||
+
|
||||
+ static void enableGenerationProtection()
|
||||
+ {
|
||||
+ m_generationProtected = true;
|
||||
+ }
|
||||
+
|
||||
+ ElementIdentifier() = default;
|
||||
+
|
||||
+ ElementIdentifier(WTF::HashTableDeletedValueType) : m_identifier(hashTableDeletedValue()) { }
|
||||
+ bool isHashTableDeletedValue() const { return m_identifier == hashTableDeletedValue(); }
|
||||
+
|
||||
+ template<typename Encoder> void encode(Encoder& encoder) const
|
||||
+ {
|
||||
+ ASSERT(isValidIdentifier(m_identifier));
|
||||
+ encoder << m_identifier;
|
||||
+ }
|
||||
+ template<typename Decoder> static Optional<ElementIdentifier> decode(Decoder& decoder)
|
||||
+ {
|
||||
+ Optional<uint64_t> identifier;
|
||||
+ decoder >> identifier;
|
||||
+ if (!identifier || !isValidIdentifier(*identifier))
|
||||
+ return WTF::nullopt;
|
||||
+ return ElementIdentifier { *identifier };
|
||||
+ }
|
||||
+
|
||||
+ bool operator==(const ElementIdentifier& other) const
|
||||
+ {
|
||||
+ return m_identifier == other.m_identifier;
|
||||
+ }
|
||||
+
|
||||
+ bool operator!=(const ElementIdentifier& other) const
|
||||
+ {
|
||||
+ return m_identifier != other.m_identifier;
|
||||
+ }
|
||||
+
|
||||
+ operator uint64_t() const { return m_identifier; }
|
||||
+ uint64_t toUInt64() const { return m_identifier; }
|
||||
+ explicit operator bool() const { return m_identifier; }
|
||||
+
|
||||
+ String loggingString() const
|
||||
+ {
|
||||
+ return String::number(m_identifier);
|
||||
+ }
|
||||
+
|
||||
+ struct MarkableTraits {
|
||||
+ static bool isEmptyValue(ElementIdentifier identifier)
|
||||
+ {
|
||||
+ return !identifier.m_identifier;
|
||||
+ }
|
||||
+
|
||||
+ static constexpr ElementIdentifier emptyValue()
|
||||
+ {
|
||||
+ return ElementIdentifier();
|
||||
+ }
|
||||
+ };
|
||||
+
|
||||
+private:
|
||||
+ friend ElementIdentifier makeElementIdentifier(uint64_t);
|
||||
+ friend struct HashTraits<ElementIdentifier>;
|
||||
+ friend struct ElementIdentifierHash;
|
||||
+
|
||||
+ static uint64_t hashTableDeletedValue() { return std::numeric_limits<uint64_t>::max(); }
|
||||
+ static bool isValidIdentifier(uint64_t identifier) { return identifier && identifier != hashTableDeletedValue(); }
|
||||
+
|
||||
+ explicit constexpr ElementIdentifier(uint64_t identifier)
|
||||
+ : m_identifier(identifier)
|
||||
+ {
|
||||
+ }
|
||||
+
|
||||
+ uint64_t m_identifier { 0 };
|
||||
+ inline static bool m_generationProtected { false };
|
||||
+};
|
||||
+
|
||||
+inline ElementIdentifier makeElementIdentifier(uint64_t identifier)
|
||||
+{
|
||||
+ return ElementIdentifier { identifier };
|
||||
+}
|
||||
+
|
||||
+struct ElementIdentifierHash {
|
||||
+ static unsigned hash(const ElementIdentifier& identifier) { return WTF::intHash(identifier.m_identifier); }
|
||||
+ static bool equal(const ElementIdentifier& a, const ElementIdentifier& b) { return a == b; }
|
||||
+ static constexpr bool safeToCompareToEmptyOrDeleted = true;
|
||||
+};
|
||||
+
|
||||
+inline TextStream& operator<<(TextStream& ts, const ElementIdentifier& identifier)
|
||||
+{
|
||||
+ ts << identifier.toUInt64();
|
||||
+ return ts;
|
||||
+}
|
||||
+
|
||||
+inline uint64_t ElementIdentifierBase::generateIdentifierInternal()
|
||||
+{
|
||||
+ static uint64_t current;
|
||||
+ return ++current;
|
||||
}
|
||||
+
|
||||
+inline uint64_t ElementIdentifierBase::generateThreadSafeIdentifierInternal()
|
||||
+{
|
||||
+ static LazyNeverDestroyed<std::atomic<uint64_t>> current;
|
||||
+ static std::once_flag initializeCurrentIdentifier;
|
||||
+ std::call_once(initializeCurrentIdentifier, [] {
|
||||
+ current.construct(0);
|
||||
+ });
|
||||
+ return ++current.get();
|
||||
+}
|
||||
+
|
||||
+} // namespace WebCore
|
||||
+
|
||||
+namespace WTF {
|
||||
+
|
||||
+template<> struct HashTraits<WebCore::ElementIdentifier> : SimpleClassHashTraits<WebCore::ElementIdentifier> { };
|
||||
+
|
||||
+template<> struct DefaultHash<WebCore::ElementIdentifier> {
|
||||
+ typedef WebCore::ElementIdentifierHash Hash;
|
||||
+};
|
||||
+
|
||||
+} // namespace WTF
|
||||
diff --git a/Source/WebCore/page/PageIdentifier.h b/Source/WebCore/page/PageIdentifier.h
|
||||
index 44d5f8d29756..07f7f2750af2 100644
|
||||
--- a/Source/WebCore/page/PageIdentifier.h
|
||||
+++ b/Source/WebCore/page/PageIdentifier.h
|
||||
@@ -25,11 +25,150 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
-#include <wtf/ObjectIdentifier.h>
|
||||
+#include <atomic>
|
||||
+#include <mutex>
|
||||
+#include <wtf/HashTraits.h>
|
||||
+#include <wtf/NeverDestroyed.h>
|
||||
+#include <wtf/text/TextStream.h>
|
||||
+#include <wtf/text/WTFString.h>
|
||||
|
||||
namespace WebCore {
|
||||
|
||||
enum PageIdentifierType { };
|
||||
-using PageIdentifier = ObjectIdentifier<PageIdentifierType>;
|
||||
|
||||
+class PageIdentifierBase {
|
||||
+protected:
|
||||
+ WTF_EXPORT_PRIVATE static uint64_t generateIdentifierInternal();
|
||||
+ WTF_EXPORT_PRIVATE static uint64_t generateThreadSafeIdentifierInternal();
|
||||
+};
|
||||
+
|
||||
+class PageIdentifier : private PageIdentifierBase {
|
||||
+public:
|
||||
+ static PageIdentifier generate()
|
||||
+ {
|
||||
+ RELEASE_ASSERT(!m_generationProtected);
|
||||
+ return PageIdentifier { generateIdentifierInternal() };
|
||||
+ }
|
||||
+
|
||||
+ static PageIdentifier generateThreadSafe()
|
||||
+ {
|
||||
+ RELEASE_ASSERT(!m_generationProtected);
|
||||
+ return PageIdentifier { generateThreadSafeIdentifierInternal() };
|
||||
+ }
|
||||
+
|
||||
+ static void enableGenerationProtection()
|
||||
+ {
|
||||
+ m_generationProtected = true;
|
||||
+ }
|
||||
+
|
||||
+ PageIdentifier() = default;
|
||||
+
|
||||
+ PageIdentifier(WTF::HashTableDeletedValueType) : m_identifier(hashTableDeletedValue()) { }
|
||||
+ bool isHashTableDeletedValue() const { return m_identifier == hashTableDeletedValue(); }
|
||||
+
|
||||
+ template<typename Encoder> void encode(Encoder& encoder) const
|
||||
+ {
|
||||
+ ASSERT(isValidIdentifier(m_identifier));
|
||||
+ encoder << m_identifier;
|
||||
+ }
|
||||
+ template<typename Decoder> static Optional<PageIdentifier> decode(Decoder& decoder)
|
||||
+ {
|
||||
+ Optional<uint64_t> identifier;
|
||||
+ decoder >> identifier;
|
||||
+ if (!identifier || !isValidIdentifier(*identifier))
|
||||
+ return WTF::nullopt;
|
||||
+ return PageIdentifier { *identifier };
|
||||
+ }
|
||||
+
|
||||
+ bool operator==(const PageIdentifier& other) const
|
||||
+ {
|
||||
+ return m_identifier == other.m_identifier;
|
||||
+ }
|
||||
+
|
||||
+ bool operator!=(const PageIdentifier& other) const
|
||||
+ {
|
||||
+ return m_identifier != other.m_identifier;
|
||||
+ }
|
||||
+
|
||||
+ operator uint64_t() const { return m_identifier; }
|
||||
+ uint64_t toUInt64() const { return m_identifier; }
|
||||
+ explicit operator bool() const { return m_identifier; }
|
||||
+
|
||||
+ String loggingString() const
|
||||
+ {
|
||||
+ return String::number(m_identifier);
|
||||
+ }
|
||||
+
|
||||
+ struct MarkableTraits {
|
||||
+ static bool isEmptyValue(PageIdentifier identifier)
|
||||
+ {
|
||||
+ return !identifier.m_identifier;
|
||||
+ }
|
||||
+
|
||||
+ static constexpr PageIdentifier emptyValue()
|
||||
+ {
|
||||
+ return PageIdentifier();
|
||||
+ }
|
||||
+ };
|
||||
+
|
||||
+private:
|
||||
+ friend PageIdentifier makePageIdentifier(uint64_t);
|
||||
+ friend struct HashTraits<PageIdentifier>;
|
||||
+ friend struct PageIdentifierHash;
|
||||
+
|
||||
+ static uint64_t hashTableDeletedValue() { return std::numeric_limits<uint64_t>::max(); }
|
||||
+ static bool isValidIdentifier(uint64_t identifier) { return identifier && identifier != hashTableDeletedValue(); }
|
||||
+
|
||||
+ explicit constexpr PageIdentifier(uint64_t identifier)
|
||||
+ : m_identifier(identifier)
|
||||
+ {
|
||||
+ }
|
||||
+
|
||||
+ uint64_t m_identifier { 0 };
|
||||
+ inline static bool m_generationProtected { false };
|
||||
+};
|
||||
+
|
||||
+inline PageIdentifier makePageIdentifier(uint64_t identifier)
|
||||
+{
|
||||
+ return PageIdentifier { identifier };
|
||||
+}
|
||||
+
|
||||
+struct PageIdentifierHash {
|
||||
+ static unsigned hash(const PageIdentifier& identifier) { return WTF::intHash(identifier.m_identifier); }
|
||||
+ static bool equal(const PageIdentifier& a, const PageIdentifier& b) { return a == b; }
|
||||
+ static constexpr bool safeToCompareToEmptyOrDeleted = true;
|
||||
+};
|
||||
+
|
||||
+inline TextStream& operator<<(TextStream& ts, const PageIdentifier& identifier)
|
||||
+{
|
||||
+ ts << identifier.toUInt64();
|
||||
+ return ts;
|
||||
+}
|
||||
+
|
||||
+inline uint64_t PageIdentifierBase::generateIdentifierInternal()
|
||||
+{
|
||||
+ static uint64_t current;
|
||||
+ return ++current;
|
||||
}
|
||||
+
|
||||
+inline uint64_t PageIdentifierBase::generateThreadSafeIdentifierInternal()
|
||||
+{
|
||||
+ static LazyNeverDestroyed<std::atomic<uint64_t>> current;
|
||||
+ static std::once_flag initializeCurrentIdentifier;
|
||||
+ std::call_once(initializeCurrentIdentifier, [] {
|
||||
+ current.construct(0);
|
||||
+ });
|
||||
+ return ++current.get();
|
||||
+}
|
||||
+
|
||||
+} // namespace WebCore
|
||||
+
|
||||
+namespace WTF {
|
||||
+
|
||||
+template<> struct HashTraits<WebCore::PageIdentifier> : SimpleClassHashTraits<WebCore::PageIdentifier> { };
|
||||
+
|
||||
+template<> struct DefaultHash<WebCore::PageIdentifier> {
|
||||
+ typedef WebCore::PageIdentifierHash Hash;
|
||||
+};
|
||||
+
|
||||
+} // namespace WTF
|
||||
diff --git a/Source/WebKit/NetworkProcess/cache/NetworkCache.h b/Source/WebKit/NetworkProcess/cache/NetworkCache.h
|
||||
index 04d7d6af73bc..d7bfee11b030 100644
|
||||
--- a/Source/WebKit/NetworkProcess/cache/NetworkCache.h
|
||||
+++ b/Source/WebKit/NetworkProcess/cache/NetworkCache.h
|
||||
@@ -225,7 +225,7 @@ struct GlobalFrameIDHash {
|
||||
template<> struct HashTraits<WebKit::NetworkCache::GlobalFrameID> : GenericHashTraits<WebKit::NetworkCache::GlobalFrameID> {
|
||||
static WebKit::NetworkCache::GlobalFrameID emptyValue() { return { }; }
|
||||
|
||||
- static void constructDeletedValue(WebKit::NetworkCache::GlobalFrameID& slot) { slot.webPageID = makeObjectIdentifier<WebCore::PageIdentifierType>(std::numeric_limits<uint64_t>::max()); }
|
||||
+ static void constructDeletedValue(WebKit::NetworkCache::GlobalFrameID& slot) { slot.webPageID = WebCore::makePageIdentifier(std::numeric_limits<uint64_t>::max()); }
|
||||
|
||||
static bool isDeletedValue(const WebKit::NetworkCache::GlobalFrameID& slot) { return slot.webPageID.toUInt64() == std::numeric_limits<uint64_t>::max(); }
|
||||
};
|
||||
diff --git a/Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp b/Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp
|
||||
index b34d13b865c5..26083eda5486 100644
|
||||
--- a/Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp
|
||||
+++ b/Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp
|
||||
@@ -388,7 +388,7 @@ static const struct wl_webkitgtk_interface webkitgtkInterface = {
|
||||
return;
|
||||
|
||||
auto* compositor = static_cast<WaylandCompositor*>(wl_resource_get_user_data(resource));
|
||||
- compositor->bindSurfaceToWebPage(surface, makeObjectIdentifier<PageIdentifierType>(pageID));
|
||||
+ compositor->bindSurfaceToWebPage(surface, WebCore::makePageIdentifier(pageID));
|
||||
}
|
||||
};
|
||||
|
||||
diff --git a/Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp b/Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp
|
||||
index 5f3cca93e3ac..b52c36838dcd 100644
|
||||
--- a/Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp
|
||||
+++ b/Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp
|
||||
@@ -98,7 +98,7 @@ void NetworkProcessConnection::didReceiveMessage(IPC::Connection& connection, IP
|
||||
return;
|
||||
}
|
||||
if (decoder.messageReceiverName() == Messages::WebPage::messageReceiverName()) {
|
||||
- if (auto* webPage = WebProcess::singleton().webPage(makeObjectIdentifier<PageIdentifierType>(decoder.destinationID())))
|
||||
+ if (auto* webPage = WebProcess::singleton().webPage(WebCore::makePageIdentifier(decoder.destinationID())))
|
||||
webPage->didReceiveWebPageMessage(connection, decoder);
|
||||
return;
|
||||
}
|
||||
@@ -152,7 +152,7 @@ void NetworkProcessConnection::didReceiveMessage(IPC::Connection& connection, IP
|
||||
|
||||
#if ENABLE(APPLE_PAY_REMOTE_UI)
|
||||
if (decoder.messageReceiverName() == Messages::WebPaymentCoordinator::messageReceiverName()) {
|
||||
- if (auto webPage = WebProcess::singleton().webPage(makeObjectIdentifier<PageIdentifierType>(decoder.destinationID())))
|
||||
+ if (auto webPage = WebProcess::singleton().webPage(WebCore::makePageIdentifier(decoder.destinationID())))
|
||||
webPage->paymentCoordinator()->didReceiveMessage(connection, decoder);
|
||||
return;
|
||||
}
|
||||
@@ -174,7 +174,7 @@ void NetworkProcessConnection::didReceiveSyncMessage(IPC::Connection& connection
|
||||
|
||||
#if ENABLE(APPLE_PAY_REMOTE_UI)
|
||||
if (decoder.messageReceiverName() == Messages::WebPaymentCoordinator::messageReceiverName()) {
|
||||
- if (auto webPage = WebProcess::singleton().webPage(makeObjectIdentifier<PageIdentifierType>(decoder.destinationID())))
|
||||
+ if (auto webPage = WebProcess::singleton().webPage(WebCore::makePageIdentifier(decoder.destinationID())))
|
||||
webPage->paymentCoordinator()->didReceiveSyncMessage(connection, decoder, replyEncoder);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,385 @@
|
|||
diff -urpN webkitgtk-2.28.0.orig/CMakeLists.txt webkitgtk-2.28.0.cmake/CMakeLists.txt
|
||||
--- webkitgtk-2.28.0.orig/CMakeLists.txt 2020-02-04 04:23:40.000000000 -0600
|
||||
+++ webkitgtk-2.28.0.cmake/CMakeLists.txt 2020-03-19 15:44:50.038776382 -0500
|
||||
@@ -2,13 +2,13 @@
|
||||
# Determine CMake version and build type.
|
||||
# -----------------------------------------------------------------------------
|
||||
#
|
||||
-# NOTE: cmake_minimum_required() and project() *MUST* be the two first commands
|
||||
+# NOTE: cmake_minimum_required() and project() *MUST* be the two fist commands
|
||||
# used, see https://cmake.org/cmake/help/v3.3/command/project.html -- the
|
||||
# latter in particular handles loading a bunch of shared CMake definitions
|
||||
# and loading the cross-compilation settings from CMAKE_TOOLCHAIN_FILE.
|
||||
#
|
||||
|
||||
-cmake_minimum_required(VERSION 3.10)
|
||||
+cmake_minimum_required(VERSION 3.3)
|
||||
|
||||
project(WebKit)
|
||||
|
||||
diff -urpN webkitgtk-2.28.0.orig/Source/cmake/FindICU.cmake webkitgtk-2.28.0.cmake/Source/cmake/FindICU.cmake
|
||||
--- webkitgtk-2.28.0.orig/Source/cmake/FindICU.cmake 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ webkitgtk-2.28.0.cmake/Source/cmake/FindICU.cmake 2020-03-19 15:44:50.042776404 -0500
|
||||
@@ -0,0 +1,110 @@
|
||||
+# Finds the International Components for Unicode (ICU) Library
|
||||
+#
|
||||
+# ICU_FOUND - True if ICU found.
|
||||
+# ICU_I18N_FOUND - True if ICU's internationalization library found.
|
||||
+# ICU_INCLUDE_DIRS - Directory to include to get ICU headers
|
||||
+# Note: always include ICU headers as, e.g.,
|
||||
+# unicode/utypes.h
|
||||
+# ICU_LIBRARIES - Libraries to link against for the common ICU
|
||||
+# ICU_I18N_LIBRARIES - Libraries to link against for ICU internationaliation
|
||||
+# (note: in addition to ICU_LIBRARIES)
|
||||
+
|
||||
+find_package(PkgConfig)
|
||||
+pkg_check_modules(PC_ICU icu-uc)
|
||||
+
|
||||
+# Look for the header file.
|
||||
+find_path(
|
||||
+ ICU_INCLUDE_DIR
|
||||
+ NAMES unicode/utypes.h
|
||||
+ HINTS ${PC_ICU_INCLUDE_DIRS}
|
||||
+ ${PC_ICU_INCLUDEDIR}
|
||||
+ ${WEBKIT_LIBRARIES_INCLUDE_DIR}
|
||||
+ DOC "Include directory for the ICU library")
|
||||
+mark_as_advanced(ICU_INCLUDE_DIR)
|
||||
+
|
||||
+# Look for the library.
|
||||
+find_library(
|
||||
+ ICU_LIBRARY
|
||||
+ NAMES libicuuc cygicuuc cygicuuc32 icuuc
|
||||
+ HINTS ${PC_ICU_LIBRARY_DIRS}
|
||||
+ ${PC_ICU_LIBDIR}
|
||||
+ ${WEBKIT_LIBRARIES_LINK_DIR}
|
||||
+ DOC "Libraries to link against for the common parts of ICU")
|
||||
+mark_as_advanced(ICU_LIBRARY)
|
||||
+
|
||||
+# Copy the results to the output variables.
|
||||
+if (ICU_INCLUDE_DIR AND ICU_LIBRARY)
|
||||
+ set(ICU_FOUND 1)
|
||||
+ set(ICU_LIBRARIES ${ICU_LIBRARY})
|
||||
+ set(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR})
|
||||
+
|
||||
+ set(ICU_VERSION 0)
|
||||
+ set(ICU_MAJOR_VERSION 0)
|
||||
+ set(ICU_MINOR_VERSION 0)
|
||||
+ file(READ "${ICU_INCLUDE_DIR}/unicode/uversion.h" _ICU_VERSION_CONENTS)
|
||||
+ string(REGEX REPLACE ".*#define U_ICU_VERSION_MAJOR_NUM ([0-9]+).*" "\\1" ICU_MAJOR_VERSION "${_ICU_VERSION_CONENTS}")
|
||||
+ string(REGEX REPLACE ".*#define U_ICU_VERSION_MINOR_NUM ([0-9]+).*" "\\1" ICU_MINOR_VERSION "${_ICU_VERSION_CONENTS}")
|
||||
+
|
||||
+ set(ICU_VERSION "${ICU_MAJOR_VERSION}.${ICU_MINOR_VERSION}")
|
||||
+
|
||||
+ # Look for the ICU internationalization libraries
|
||||
+ pkg_check_modules(PC_ICU_I18N icu-i18n)
|
||||
+ find_library(
|
||||
+ ICU_I18N_LIBRARY
|
||||
+ NAMES icui18n libicui18n libicuin cygicuin cygicuin32 icuin
|
||||
+ HINTS ${PC_ICU_I18N_LIBRARY_DIRS}
|
||||
+ ${PC_ICU_I18N_LIBDIR}
|
||||
+ ${WEBKIT_LIBRARIES_LINK_DIR}
|
||||
+ DOC "Libraries to link against for ICU internationalization")
|
||||
+ mark_as_advanced(ICU_I18N_LIBRARY)
|
||||
+ if (ICU_I18N_LIBRARY)
|
||||
+ set(ICU_I18N_FOUND 1)
|
||||
+ set(ICU_I18N_LIBRARIES ${ICU_I18N_LIBRARY})
|
||||
+ else ()
|
||||
+ set(ICU_I18N_FOUND 0)
|
||||
+ set(ICU_I18N_LIBRARIES)
|
||||
+ endif ()
|
||||
+
|
||||
+ # Look for the ICU data libraries
|
||||
+ find_library(
|
||||
+ ICU_DATA_LIBRARY
|
||||
+ NAMES icudata libicudata cygicudata cygicudata32
|
||||
+ HINTS ${PC_ICU_I18N_LIBRARY_DIRS}
|
||||
+ ${PC_ICU_I18N_LIBDIR}
|
||||
+ ${WEBKIT_LIBRARIES_LINK_DIR}
|
||||
+ DOC "Libraries to link against for ICU data")
|
||||
+ mark_as_advanced(ICU_DATA_LIBRARY)
|
||||
+ if (ICU_DATA_LIBRARY)
|
||||
+ set(ICU_DATA_FOUND 1)
|
||||
+ set(ICU_DATA_LIBRARIES ${ICU_DATA_LIBRARY})
|
||||
+ else ()
|
||||
+ set(ICU_DATA_FOUND 0)
|
||||
+ set(ICU_DATA_LIBRARIES)
|
||||
+ endif ()
|
||||
+else ()
|
||||
+ set(ICU_FOUND 0)
|
||||
+ set(ICU_I18N_FOUND 0)
|
||||
+ set(ICU_DATA_FOUND 0)
|
||||
+ set(ICU_LIBRARIES)
|
||||
+ set(ICU_I18N_LIBRARIES)
|
||||
+ set(ICU_DATA_LIBRARIES)
|
||||
+ set(ICU_INCLUDE_DIRS)
|
||||
+ set(ICU_VERSION)
|
||||
+ set(ICU_MAJOR_VERSION)
|
||||
+ set(ICU_MINOR_VERSION)
|
||||
+endif ()
|
||||
+
|
||||
+if (ICU_FOUND)
|
||||
+ if (NOT ICU_FIND_QUIETLY)
|
||||
+ message(STATUS "Found ICU header files in ${ICU_INCLUDE_DIRS}")
|
||||
+ message(STATUS "Found ICU libraries: ${ICU_LIBRARIES}")
|
||||
+ message(STATUS "Found ICU internationaliation libraries: ${ICU_I18N_LIBRARIES}")
|
||||
+ message(STATUS "Found ICU data libraries: ${ICU_DATA_LIBRARIES}")
|
||||
+ endif ()
|
||||
+else ()
|
||||
+ if (ICU_FIND_REQUIRED)
|
||||
+ message(FATAL_ERROR "Could not find ICU")
|
||||
+ else ()
|
||||
+ message(STATUS "Optional package ICU was not found")
|
||||
+ endif ()
|
||||
+endif ()
|
||||
diff -urpN webkitgtk-2.28.0.orig/Source/cmake/OptionsCommon.cmake webkitgtk-2.28.0.cmake/Source/cmake/OptionsCommon.cmake
|
||||
--- webkitgtk-2.28.0.orig/Source/cmake/OptionsCommon.cmake 2020-02-04 04:24:08.000000000 -0600
|
||||
+++ webkitgtk-2.28.0.cmake/Source/cmake/OptionsCommon.cmake 2020-03-19 15:44:50.042776404 -0500
|
||||
@@ -1,7 +1,3 @@
|
||||
-set(CMAKE_CXX_STANDARD 17)
|
||||
-set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
-set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
-
|
||||
add_definitions(-DBUILDING_WITH_CMAKE=1)
|
||||
add_definitions(-DHAVE_CONFIG_H=1)
|
||||
|
||||
diff -urpN webkitgtk-2.28.0.orig/Source/cmake/OptionsGTK.cmake webkitgtk-2.28.0.cmake/Source/cmake/OptionsGTK.cmake
|
||||
--- webkitgtk-2.28.0.orig/Source/cmake/OptionsGTK.cmake 2020-03-10 03:31:09.000000000 -0500
|
||||
+++ webkitgtk-2.28.0.cmake/Source/cmake/OptionsGTK.cmake 2020-03-23 14:27:09.176026963 -0500
|
||||
@@ -25,7 +25,7 @@ find_package(GLIB 2.44.0 REQUIRED COMPON
|
||||
find_package(GTK3 3.22.0 REQUIRED)
|
||||
find_package(GDK3 3.22.0 REQUIRED)
|
||||
find_package(HarfBuzz 0.9.18 REQUIRED COMPONENTS ICU)
|
||||
-find_package(ICU REQUIRED COMPONENTS data i18n uc)
|
||||
+find_package(ICU REQUIRED)
|
||||
find_package(JPEG REQUIRED)
|
||||
find_package(LibSoup 2.54.0 REQUIRED)
|
||||
find_package(LibXml2 2.8.0 REQUIRED)
|
||||
diff -urpN webkitgtk-2.28.0.orig/Source/cmake/OptionsJSCOnly.cmake webkitgtk-2.28.0.cmake/Source/cmake/OptionsJSCOnly.cmake
|
||||
--- webkitgtk-2.28.0.orig/Source/cmake/OptionsJSCOnly.cmake 2020-02-04 04:24:08.000000000 -0600
|
||||
+++ webkitgtk-2.28.0.cmake/Source/cmake/OptionsJSCOnly.cmake 2020-03-19 15:44:50.046776424 -0500
|
||||
@@ -96,8 +96,9 @@ else ()
|
||||
endif ()
|
||||
|
||||
if (NOT APPLE)
|
||||
- find_package(ICU REQUIRED COMPONENTS data i18n uc)
|
||||
+ find_package(ICU REQUIRED)
|
||||
else ()
|
||||
add_definitions(-DU_DISABLE_RENAMING=1 -DU_SHOW_CPLUSPLUS_API=0)
|
||||
- include(target/icu)
|
||||
+ set(ICU_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ICU/Headers)
|
||||
+ set(ICU_LIBRARIES libicucore.dylib)
|
||||
endif ()
|
||||
diff -urpN webkitgtk-2.28.0.orig/Source/cmake/OptionsWin.cmake webkitgtk-2.28.0.cmake/Source/cmake/OptionsWin.cmake
|
||||
--- webkitgtk-2.28.0.orig/Source/cmake/OptionsWin.cmake 2020-02-04 04:24:08.000000000 -0600
|
||||
+++ webkitgtk-2.28.0.cmake/Source/cmake/OptionsWin.cmake 2020-03-19 15:44:50.046776424 -0500
|
||||
@@ -164,6 +164,8 @@ set(WTF_LIBRARY_TYPE SHARED)
|
||||
set(PAL_LIBRARY_TYPE STATIC)
|
||||
set(WebKitLegacy_LIBRARY_TYPE SHARED)
|
||||
|
||||
+find_package(ICU REQUIRED)
|
||||
+
|
||||
# If <winsock2.h> is not included before <windows.h> redefinition errors occur
|
||||
# unless _WINSOCKAPI_ is defined before <windows.h> is included
|
||||
add_definitions(-D_WINSOCKAPI_=)
|
||||
diff -urpN webkitgtk-2.28.0.orig/Source/cmake/WebKitCompilerFlags.cmake webkitgtk-2.28.0.cmake/Source/cmake/WebKitCompilerFlags.cmake
|
||||
--- webkitgtk-2.28.0.orig/Source/cmake/WebKitCompilerFlags.cmake 2020-02-25 07:02:33.000000000 -0600
|
||||
+++ webkitgtk-2.28.0.cmake/Source/cmake/WebKitCompilerFlags.cmake 2020-03-19 15:44:50.046776424 -0500
|
||||
@@ -104,6 +104,13 @@ if (COMPILER_IS_GCC_OR_CLANG)
|
||||
WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS(-fno-exceptions)
|
||||
WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-fno-rtti)
|
||||
|
||||
+ check_cxx_compiler_flag("-std=c++17" CXX_COMPILER_SUPPORTS_CXX17)
|
||||
+ if (CXX_COMPILER_SUPPORTS_CXX17)
|
||||
+ WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-std=c++17)
|
||||
+ else ()
|
||||
+ message(FATAL_ERROR "Compiler with C++17 support is required")
|
||||
+ endif ()
|
||||
+
|
||||
if (WIN32)
|
||||
WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS(-mno-ms-bitfields)
|
||||
WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-unknown-pragmas)
|
||||
diff -urpN webkitgtk-2.28.0.orig/Source/JavaScriptCore/CMakeLists.txt webkitgtk-2.28.0.cmake/Source/JavaScriptCore/CMakeLists.txt
|
||||
--- webkitgtk-2.28.0.orig/Source/JavaScriptCore/CMakeLists.txt 2020-02-04 04:23:58.000000000 -0600
|
||||
+++ webkitgtk-2.28.0.cmake/Source/JavaScriptCore/CMakeLists.txt 2020-03-19 15:44:50.050776446 -0500
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 3.10)
|
||||
+cmake_minimum_required(VERSION 2.8.12)
|
||||
include(WebKitCommon)
|
||||
include(target/TargetWTF)
|
||||
set_property(DIRECTORY . PROPERTY FOLDER "JavaScriptCore")
|
||||
@@ -54,6 +54,10 @@ if (USE_CAPSTONE)
|
||||
list(APPEND JavaScriptCore_PRIVATE_INCLUDE_DIRECTORIES "${THIRDPARTY_DIR}/capstone/Source/include")
|
||||
endif ()
|
||||
|
||||
+set(JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES
|
||||
+ "${ICU_INCLUDE_DIRS}"
|
||||
+)
|
||||
+
|
||||
set(JavaScriptCore_OBJECT_LUT_SOURCES
|
||||
runtime/ArrayConstructor.cpp
|
||||
runtime/AsyncFromSyncIteratorPrototype.cpp
|
||||
@@ -222,11 +226,7 @@ add_custom_command(
|
||||
VERBATIM)
|
||||
|
||||
|
||||
-if (WTF_OS_MAC_OS_X)
|
||||
execute_process(COMMAND bash -c "date +'%s'" OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
-else ()
|
||||
- string(TIMESTAMP BUILD_TIME "%s")
|
||||
-endif ()
|
||||
|
||||
list(APPEND JavaScriptCore_HEADERS
|
||||
${JavaScriptCore_DERIVED_SOURCES_DIR}/BytecodeStructs.h
|
||||
diff -urpN webkitgtk-2.28.0.orig/Source/ThirdParty/ANGLE/include/CMakeLists.txt webkitgtk-2.28.0.cmake/Source/ThirdParty/ANGLE/include/CMakeLists.txt
|
||||
--- webkitgtk-2.28.0.orig/Source/ThirdParty/ANGLE/include/CMakeLists.txt 2020-02-04 04:24:05.000000000 -0600
|
||||
+++ webkitgtk-2.28.0.cmake/Source/ThirdParty/ANGLE/include/CMakeLists.txt 2020-03-20 16:05:39.703431614 -0500
|
||||
@@ -1,19 +1,39 @@
|
||||
string(REGEX REPLACE "(^|;)include/" "\\1" includes "${libangle_includes}")
|
||||
|
||||
-set(egl_headers ${includes})
|
||||
-list(FILTER egl_headers INCLUDE REGEX "EGL/.*")
|
||||
+set(egl_headers
|
||||
+ EGL/egl.h
|
||||
+ EGL/eglext.h
|
||||
+ EGL/eglext_angle.h
|
||||
+ EGL/eglplatform.h
|
||||
+)
|
||||
+
|
||||
+set(gles_headers
|
||||
+ GLES/egl.h
|
||||
+ GLES/gl.h
|
||||
+ GLES/glext.h
|
||||
+ GLES/glext_explicit_context_autogen.inc
|
||||
+ GLES/glext_angle.h
|
||||
+ GLES/glplatform.h
|
||||
+)
|
||||
+
|
||||
+set(gles2_headers
|
||||
+ GLES2/gl2.h
|
||||
+ GLES2/gl2ext.h
|
||||
+ GLES2/gl2ext_explicit_context_autogen.inc
|
||||
+ GLES2/gl2ext_angle.h
|
||||
+ GLES2/gl2platform.h
|
||||
+)
|
||||
+
|
||||
+set(gles3_headers
|
||||
+ GLES3/gl3.h
|
||||
+ GLES3/gl3ext_explicit_context_autogen.inc
|
||||
+ GLES3/gl31.h
|
||||
+ GLES3/gl31ext_explicit_context_autogen.inc
|
||||
+ GLES3/gl32.h
|
||||
+ GLES3/gl3platform.h
|
||||
+)
|
||||
|
||||
-set(gles_headers ${includes})
|
||||
-list(FILTER gles_headers INCLUDE REGEX "GLES/.*")
|
||||
-
|
||||
-set(gles2_headers ${includes})
|
||||
-list(FILTER gles2_headers INCLUDE REGEX "GLES2/.*")
|
||||
-
|
||||
-set(gles3_headers ${includes})
|
||||
-list(FILTER gles3_headers INCLUDE REGEX "GLES3/.*")
|
||||
-
|
||||
-set(khr_headers ${includes})
|
||||
-list(FILTER khr_headers INCLUDE REGEX "KHR/.*")
|
||||
+set(khr_headers KHR/khrplatform.h)
|
||||
|
||||
set(glslang_headers
|
||||
GLSLANG/ShaderLang.h
|
||||
diff -urpN webkitgtk-2.28.0.orig/Source/WebCore/CMakeLists.txt webkitgtk-2.28.0.cmake/Source/WebCore/CMakeLists.txt
|
||||
--- webkitgtk-2.28.0.orig/Source/WebCore/CMakeLists.txt 2020-02-04 04:24:07.000000000 -0600
|
||||
+++ webkitgtk-2.28.0.cmake/Source/WebCore/CMakeLists.txt 2020-03-20 15:38:13.886631507 -0500
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 3.10)
|
||||
+cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
include(WebKitCommon)
|
||||
include(target/TargetWTF)
|
||||
@@ -173,6 +173,7 @@ set(WebCore_PRIVATE_INCLUDE_DIRECTORIES
|
||||
)
|
||||
|
||||
set(WebCore_SYSTEM_INCLUDE_DIRECTORIES
|
||||
+ ${ICU_INCLUDE_DIRS}
|
||||
${LIBXML2_INCLUDE_DIR}
|
||||
${LIBXSLT_INCLUDE_DIR}
|
||||
${ZLIB_INCLUDE_DIRS}
|
||||
@@ -1220,7 +1221,8 @@ set(WebCore_PLUG_INS_RESOURCES
|
||||
)
|
||||
|
||||
set(WebCore_LIBRARIES
|
||||
- SQLite::SQLite3
|
||||
+ ${ICU_LIBRARIES}
|
||||
+ ${SQLite3_LIBRARIES}
|
||||
${LIBXML2_LIBRARIES}
|
||||
${LIBXSLT_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
diff -urpN webkitgtk-2.28.0.orig/Source/WebCore/PAL/pal/CMakeLists.txt webkitgtk-2.28.0.cmake/Source/WebCore/PAL/pal/CMakeLists.txt
|
||||
--- webkitgtk-2.28.0.orig/Source/WebCore/PAL/pal/CMakeLists.txt 2020-02-04 04:24:07.000000000 -0600
|
||||
+++ webkitgtk-2.28.0.cmake/Source/WebCore/PAL/pal/CMakeLists.txt 2020-03-19 15:44:50.054776467 -0500
|
||||
@@ -38,6 +38,10 @@ set(PAL_PRIVATE_INCLUDE_DIRECTORIES
|
||||
"${PAL_DIR}/pal/text"
|
||||
)
|
||||
|
||||
+set(PAL_SYSTEM_INCLUDE_DIRECTORIES
|
||||
+ ${ICU_INCLUDE_DIRS}
|
||||
+)
|
||||
+
|
||||
set(PAL_LIBRARIES
|
||||
WebKit::JavaScriptCore
|
||||
)
|
||||
diff -urpN webkitgtk-2.28.0.orig/Source/WebCore/platform/FreeType.cmake webkitgtk-2.28.0.cmake/Source/WebCore/platform/FreeType.cmake
|
||||
--- webkitgtk-2.28.0.orig/Source/WebCore/platform/FreeType.cmake 2020-02-04 04:24:07.000000000 -0600
|
||||
+++ webkitgtk-2.28.0.cmake/Source/WebCore/platform/FreeType.cmake 2020-03-20 15:52:06.347082668 -0500
|
||||
@@ -34,8 +34,7 @@ list(APPEND WebCore_SYSTEM_INCLUDE_DIREC
|
||||
)
|
||||
|
||||
list(APPEND WebCore_LIBRARIES
|
||||
- HarfBuzz::HarfBuzz
|
||||
- HarfBuzz::ICU
|
||||
${FONTCONFIG_LIBRARIES}
|
||||
${FREETYPE_LIBRARIES}
|
||||
+ ${HarfBuzz_LIBRARIES}
|
||||
)
|
||||
diff -urpN webkitgtk-2.28.0.orig/Source/WebKit/CMakeLists.txt webkitgtk-2.28.0.cmake/Source/WebKit/CMakeLists.txt
|
||||
--- webkitgtk-2.28.0.orig/Source/WebKit/CMakeLists.txt 2020-02-04 04:24:08.000000000 -0600
|
||||
+++ webkitgtk-2.28.0.cmake/Source/WebKit/CMakeLists.txt 2020-03-19 15:44:50.054776467 -0500
|
||||
@@ -109,6 +109,10 @@ set(WebKit_INCLUDE_DIRECTORIES
|
||||
|
||||
set(PROTOCOL_GENERATOR_SCRIPTS_DIR "${JAVASCRIPTCORE_DIR}/inspector/scripts")
|
||||
|
||||
+set(WebKit_SYSTEM_INCLUDE_DIRECTORIES
|
||||
+ ${ICU_INCLUDE_DIRS}
|
||||
+)
|
||||
+
|
||||
list(APPEND WebKit_UNIFIED_SOURCE_LIST_FILES
|
||||
"Sources.txt"
|
||||
)
|
||||
diff -urpN webkitgtk-2.28.0.orig/Source/WTF/CMakeLists.txt webkitgtk-2.28.0.cmake/Source/WTF/CMakeLists.txt
|
||||
--- webkitgtk-2.28.0.orig/Source/WTF/CMakeLists.txt 2020-02-04 04:24:07.000000000 -0600
|
||||
+++ webkitgtk-2.28.0.cmake/Source/WTF/CMakeLists.txt 2020-03-19 15:44:50.054776467 -0500
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 3.10)
|
||||
+cmake_minimum_required(VERSION 2.8.12)
|
||||
include(WebKitCommon)
|
||||
set_property(DIRECTORY . PROPERTY FOLDER "WTF")
|
||||
|
||||
diff -urpN webkitgtk-2.28.0.orig/Source/WTF/wtf/CMakeLists.txt webkitgtk-2.28.0.cmake/Source/WTF/wtf/CMakeLists.txt
|
||||
--- webkitgtk-2.28.0.orig/Source/WTF/wtf/CMakeLists.txt 2020-02-04 04:24:07.000000000 -0600
|
||||
+++ webkitgtk-2.28.0.cmake/Source/WTF/wtf/CMakeLists.txt 2020-03-19 15:44:50.054776467 -0500
|
||||
@@ -517,10 +517,13 @@ if (NOT USE_SYSTEM_MALLOC)
|
||||
list(APPEND WTF_LIBRARIES WebKit::bmalloc)
|
||||
endif ()
|
||||
|
||||
+set(WTF_SYSTEM_INCLUDE_DIRECTORIES
|
||||
+ ${ICU_INCLUDE_DIRS}
|
||||
+)
|
||||
list(APPEND WTF_LIBRARIES
|
||||
- ICU::data
|
||||
- ICU::i18n
|
||||
- ICU::uc
|
||||
+ ${ICU_DATA_LIBRARIES}
|
||||
+ ${ICU_I18N_LIBRARIES}
|
||||
+ ${ICU_LIBRARIES}
|
||||
)
|
||||
|
||||
set(WTF_INTERFACE_LIBRARIES WTF)
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,111 @@
|
|||
From aacbb7501a1c9b16a73211a8a67ff5b028e92988 Mon Sep 17 00:00:00 2001
|
||||
From: "mcatanzaro@igalia.com"
|
||||
<mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
|
||||
Date: Tue, 14 Nov 2017 00:42:20 +0000
|
||||
Subject: [PATCH] [GTK] Require woff2 1.0.2 and drop direct brotli dependency
|
||||
https://bugs.webkit.org/show_bug.cgi?id=179630
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Reviewed by Frédéric Wang.
|
||||
|
||||
.:
|
||||
|
||||
* Source/cmake/FindBrotliDec.cmake: Removed.
|
||||
* Source/cmake/OptionsGTK.cmake:
|
||||
|
||||
Tools:
|
||||
|
||||
* gtk/jhbuild.modules:
|
||||
|
||||
|
||||
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@224793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
|
||||
---
|
||||
ChangeLog | 10 ++++++++
|
||||
Source/cmake/FindBrotliDec.cmake | 53 ----------------------------------------
|
||||
Source/cmake/OptionsGTK.cmake | 6 +----
|
||||
Tools/ChangeLog | 9 +++++++
|
||||
Tools/gtk/jhbuild.modules | 2 +-
|
||||
5 files changed, 21 insertions(+), 59 deletions(-)
|
||||
delete mode 100644 Source/cmake/FindBrotliDec.cmake
|
||||
|
||||
diff --git a/Source/cmake/FindBrotliDec.cmake b/Source/cmake/FindBrotliDec.cmake
|
||||
deleted file mode 100644
|
||||
index 3a8cf90357f..00000000000
|
||||
--- a/Source/cmake/FindBrotliDec.cmake
|
||||
+++ /dev/null
|
||||
@@ -1,53 +0,0 @@
|
||||
-# - Try to find BrotliDec.
|
||||
-# Once done, this will define
|
||||
-#
|
||||
-# BROTLIDEC_FOUND - system has BrotliDec.
|
||||
-# BROTLIDEC_INCLUDE_DIRS - the BrotliDec include directories
|
||||
-# BROTLIDEC_LIBRARIES - link these to use BrotliDec.
|
||||
-#
|
||||
-# Copyright (C) 2017 Igalia S.L.
|
||||
-#
|
||||
-# Redistribution and use in source and binary forms, with or without
|
||||
-# modification, are permitted provided that the following conditions
|
||||
-# are met:
|
||||
-# 1. Redistributions of source code must retain the above copyright
|
||||
-# notice, this list of conditions and the following disclaimer.
|
||||
-# 2. Redistributions in binary form must reproduce the above copyright
|
||||
-# notice, this list of conditions and the following disclaimer in the
|
||||
-# documentation and/or other materials provided with the distribution.
|
||||
-#
|
||||
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
|
||||
-# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
|
||||
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
-
|
||||
-find_package(PkgConfig)
|
||||
-pkg_check_modules(PC_BROTLIDEC libbrotlidec)
|
||||
-
|
||||
-find_path(BROTLIDEC_INCLUDE_DIRS
|
||||
- NAMES brotli/decode.h
|
||||
- HINTS ${PC_BROTLIDEC_INCLUDEDIR}
|
||||
-)
|
||||
-
|
||||
-find_library(BROTLIDEC_LIBRARIES
|
||||
- NAMES brotlidec
|
||||
- HINTS ${PC_BROTLIDEC_LIBDIR}
|
||||
-)
|
||||
-
|
||||
-include(FindPackageHandleStandardArgs)
|
||||
-find_package_handle_standard_args(BrotliDec
|
||||
- REQUIRED_VARS BROTLIDEC_INCLUDE_DIRS BROTLIDEC_LIBRARIES
|
||||
- FOUND_VAR BROTLIDEC_FOUND
|
||||
- VERSION_VAR PC_BROTLIDEC_VERSION)
|
||||
-
|
||||
-mark_as_advanced(
|
||||
- BROTLIDEC_INCLUDE_DIRS
|
||||
- BROTLIDEC_LIBRARIES
|
||||
-)
|
||||
diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
|
||||
index ba7e134c7cc..39c3a9be47e 100644
|
||||
--- a/Source/cmake/OptionsGTK.cmake
|
||||
+++ b/Source/cmake/OptionsGTK.cmake
|
||||
@@ -365,11 +365,7 @@ if (USE_UPOWER)
|
||||
endif ()
|
||||
|
||||
if (USE_WOFF2)
|
||||
- find_package(BrotliDec 1.0.1)
|
||||
- if (NOT BROTLIDEC_FOUND)
|
||||
- message(FATAL_ERROR "libbrotlidec is needed for USE_WOFF2.")
|
||||
- endif ()
|
||||
- find_package(WOFF2Dec 1.0.1)
|
||||
+ find_package(WOFF2Dec 1.0.2)
|
||||
if (NOT WOFF2DEC_FOUND)
|
||||
message(FATAL_ERROR "libwoff2dec is needed for USE_WOFF2.")
|
||||
endif ()
|
||||
--
|
||||
2.16.2
|
||||
|
|
@ -0,0 +1,597 @@
|
|||
## NOTE: Lots of files in various subdirectories have the same name (such as
|
||||
## "LICENSE") so this short macro allows us to distinguish them by using their
|
||||
## directory names (from the source tree) as prefixes for the files.
|
||||
%global add_to_license_files() \
|
||||
mkdir -p _license_files ; \
|
||||
cp -p %1 _license_files/$(echo '%1' | sed -e 's!/!.!g')
|
||||
|
||||
# Bundle ICU 57 - see https://bugzilla.redhat.com/show_bug.cgi?id=1414413
|
||||
%define bundle_icu 1
|
||||
%if 0%{?bundle_icu}
|
||||
# Filter out provides/requires for private libraries
|
||||
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}libicu.*
|
||||
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}libicu.*
|
||||
%global __provides_exclude_from ^%{_libdir}/webkit2gtk-4\\.0/.*\\.so$
|
||||
%endif
|
||||
|
||||
# Increase the DIE limit so our debuginfo packages could be size optimized.
|
||||
# Fedora bug - https://bugzilla.redhat.com/show_bug.cgi?id=1456261
|
||||
%global _dwz_max_die_limit 250000000
|
||||
# The _dwz_max_die_limit is being overridden by the arch specific ones from the
|
||||
# redhat-rpm-config so we need to set the arch specific ones as well - now it
|
||||
# is only needed for x86_64.
|
||||
%global _dwz_max_die_limit_x86_64 250000000
|
||||
|
||||
# As we are using the DTS we have to build this package as:
|
||||
# rhpkg build --target rhel-7.7-devtoolset-7-candidate
|
||||
|
||||
Name: webkitgtk4
|
||||
Version: 2.28.2
|
||||
Release: 2%{?dist}
|
||||
Summary: GTK+ Web content engine library
|
||||
|
||||
License: LGPLv2
|
||||
URL: https://www.webkitgtk.org
|
||||
Source0: https://webkitgtk.org/releases/webkitgtk-%{version}.tar.xz
|
||||
%if 0%{?bundle_icu}
|
||||
Source1: https://download.icu-project.org/files/icu4c/57.1/icu4c-57_1-src.tgz
|
||||
%endif
|
||||
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=209360
|
||||
Patch0: webkit-aarch64_page_size.patch
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=193749
|
||||
Patch1: evolution-shared-secondary-process.patch
|
||||
# Revert woff2 and brotli removal to bundle them again, as they are not
|
||||
# included in RHEL 7
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=179630
|
||||
Patch2: webkit-woff2_1.0.2.patch
|
||||
# https://trac.webkit.org/changeset/224329
|
||||
Patch3: webkit-library_typos.patch
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=177862
|
||||
Patch4: webkit-remove_woff2.patch
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=177804
|
||||
Patch5: webkit-remove_brotli.patch
|
||||
# We don't have new enough version of libgcrypt to support WebCrypto, lower
|
||||
# the version in the check so configure can pass and also disable WebCrypto
|
||||
# through cmake argument.
|
||||
Patch6: webkit-lower_libgcrypt_version.patch
|
||||
# We don't have new enough version of libwebp (that has demux) to support the
|
||||
# animated WebP images - revert the change that introduced it.
|
||||
Patch7: webkit-no_webp_demux.patch
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=210685
|
||||
Patch8: webkit-fix-ppc64le-s390x.patch
|
||||
# Upstream requires CMake 3.10, but we have only 3.6 in devtoolset.
|
||||
Patch9: webkit-old-cmake.patch
|
||||
# Fix build on 32-bit s390. I'm not upstreaming this since we don't support this
|
||||
# architecture in RHEL 8.
|
||||
Patch10: webkit-jscoptions-fix-s390.patch
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=212590
|
||||
Patch11: webkit-objectidentifier-undefined.patch
|
||||
|
||||
%if 0%{?bundle_icu}
|
||||
Patch50: icu-8198.revert.icu5431.patch
|
||||
Patch51: icu-8800.freeserif.crash.patch
|
||||
Patch52: icu-7601.Indic-ccmp.patch
|
||||
Patch53: icu-gennorm2-man.patch
|
||||
Patch54: icu-icuinfo-man.patch
|
||||
Patch55: icu-armv7hl-disable-tests.patch
|
||||
Patch56: icu-rhbz1360340-icu-changeset-39109.patch
|
||||
Patch57: icu-diff-icu_trunk_source_common_locid.cpp-from-39282-to-39384.patch
|
||||
Patch58: icu-dont_use_clang_even_if_installed.patch
|
||||
# CVE-2017-7867 CVE-2017-7868
|
||||
Patch59: icu-rhbz1444101-icu-changeset-39671.patch
|
||||
%endif
|
||||
|
||||
BuildRequires: at-spi2-core-devel
|
||||
BuildRequires: bison
|
||||
BuildRequires: cairo-devel
|
||||
BuildRequires: enchant-devel
|
||||
BuildRequires: flex
|
||||
BuildRequires: fontconfig-devel
|
||||
BuildRequires: freetype-devel
|
||||
BuildRequires: gettext
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: gobject-introspection-devel
|
||||
BuildRequires: gperf
|
||||
BuildRequires: gstreamer1-devel
|
||||
BuildRequires: gstreamer1-plugins-base-devel
|
||||
BuildRequires: gstreamer1-plugins-bad-free-devel
|
||||
BuildRequires: gtk3-devel
|
||||
BuildRequires: gtk-doc >= 1.25
|
||||
BuildRequires: harfbuzz-devel
|
||||
%if ! 0%{?bundle_icu}
|
||||
BuildRequires: libicu-devel
|
||||
%endif
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: libnotify-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: libsecret-devel
|
||||
BuildRequires: libsoup-devel >= 2.56
|
||||
BuildRequires: libwebp-devel
|
||||
BuildRequires: libxslt-devel
|
||||
BuildRequires: libXt-devel
|
||||
BuildRequires: libwayland-client-devel
|
||||
BuildRequires: libwayland-egl-devel
|
||||
BuildRequires: libwayland-server-devel
|
||||
BuildRequires: mesa-libEGL-devel
|
||||
BuildRequires: mesa-libGL-devel
|
||||
BuildRequires: mesa-libGLES-devel
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: perl-Switch
|
||||
BuildRequires: perl-JSON-PP
|
||||
BuildRequires: ruby
|
||||
BuildRequires: rubygem-json
|
||||
BuildRequires: rubygems
|
||||
BuildRequires: sqlite-devel
|
||||
BuildRequires: hyphen-devel
|
||||
BuildRequires: gnutls-devel
|
||||
%if 0%{?rhel} == 7
|
||||
BuildRequires: devtoolset-7-gcc
|
||||
BuildRequires: devtoolset-7-gcc-c++
|
||||
BuildRequires: devtoolset-7-build
|
||||
BuildRequires: devtoolset-7-libatomic-devel
|
||||
BuildRequires: llvm-toolset-7-cmake
|
||||
%else
|
||||
BuildRequires: libatomic
|
||||
BuildRequires: cmake
|
||||
%endif
|
||||
|
||||
Requires: geoclue2
|
||||
|
||||
%if 0%{?bundle_icu}
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: python
|
||||
%endif
|
||||
|
||||
# Obsolete libwebkit2gtk from the webkitgtk3 package
|
||||
Obsoletes: libwebkit2gtk < 2.5.0
|
||||
Provides: libwebkit2gtk = %{version}-%{release}
|
||||
|
||||
# GTK+ 2 plugins support was removed in 2.25.3
|
||||
Obsoletes: webkitgtk4-plugin-process-gtk2 < %{version}-%{release}
|
||||
Provides: webkitgtk4-plugin-process-gtk2 = %{version}-%{release}
|
||||
|
||||
# We're supposed to specify versions here, but these libraries don't do
|
||||
# normal releases. Accordingly, they're not suitable to be system libs.
|
||||
# Provides: bundled(angle)
|
||||
# Provides: bundled(brotli)
|
||||
# Provides: bundled(xdgmime)
|
||||
# Provides: bundled(woff2)
|
||||
|
||||
# Require the jsc subpackage
|
||||
Requires: %{name}-jsc%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description
|
||||
WebKitGTK+ is the port of the portable web rendering engine WebKit to the
|
||||
GTK+ platform.
|
||||
|
||||
This package contains WebKitGTK+ for GTK+ 3.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-jsc%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-jsc-devel%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
The %{name}-devel package contains libraries, build data, and header
|
||||
files for developing applications that use %{name}.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation files for %{name}
|
||||
BuildArch: noarch
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description doc
|
||||
This package contains developer documentation for %{name}.
|
||||
|
||||
%package jsc
|
||||
Summary: JavaScript engine from %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description jsc
|
||||
This package contains JavaScript engine from %{name}.
|
||||
|
||||
%package jsc-devel
|
||||
Summary: Development files for JavaScript engine from %{name}
|
||||
Requires: %{name}-jsc%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description jsc-devel
|
||||
The %{name}-jsc-devel package contains libraries, build data, and header
|
||||
files for developing applications that use JavaScript engine from %{name}.
|
||||
|
||||
%prep
|
||||
%if 0%{?bundle_icu}
|
||||
%setup -q -T -n icu -b 1
|
||||
%patch50 -p2 -R -b .icu8198.revert.icu5431.patch
|
||||
%patch51 -p1 -b .icu8800.freeserif.crash.patch
|
||||
%patch52 -p1 -b .icu7601.Indic-ccmp.patch
|
||||
%patch53 -p1 -b .gennorm2-man.patch
|
||||
%patch54 -p1 -b .icuinfo-man.patch
|
||||
%ifarch armv7hl
|
||||
%patch55 -p1 -b .armv7hl-disable-tests.patch
|
||||
%endif
|
||||
%patch56 -p1 -b .rhbz1360340-icu-changeset-39109.patch
|
||||
%patch57 -p1 -b .diff-icu_trunk_source_common_locid.cpp-from-39282-to-39384.patch
|
||||
%patch58 -p1 -b .dont_use_clang_even_if_installed
|
||||
%patch59 -p1 -b .rhbz1444101-icu-changeset-39671.patch
|
||||
|
||||
%setup -q -T -n webkitgtk-%{version} -b 0
|
||||
%patch0 -p1 -b .aarch64_page_size
|
||||
%patch1 -p1 -b .evolution_shared_secondary_process
|
||||
%patch2 -R -p1 -b .woff2_1.0.2
|
||||
%patch3 -R -p1 -b .library_typos
|
||||
%patch4 -p1 -b .remove_woff2
|
||||
%patch5 -p1 -b .remove_brotli
|
||||
%patch6 -p1 -b .lower_libgcrypt_version
|
||||
%patch7 -p1 -b .no_webp_demux
|
||||
%patch8 -p1 -b .fix_ppc64le_s390x
|
||||
%patch9 -p1 -b .old_cmake
|
||||
%ifarch s390
|
||||
%patch10 -p1 -b .jscoptions_fix_s390
|
||||
%endif
|
||||
%patch11 -p1 -b .objectidentifier_undefined
|
||||
%else
|
||||
%autosetup -p1 -n webkitgtk-%{version}
|
||||
%endif
|
||||
|
||||
# Remove bundled libraries
|
||||
rm -rf Source/ThirdParty/gtest/
|
||||
rm -rf Source/ThirdParty/qunit/
|
||||
|
||||
%build
|
||||
%ifarch s390 aarch64
|
||||
# Use linker flags to reduce memory consumption - on other arches the ld.gold is
|
||||
# used and also it doesn't have the --reduce-memory-overheads option
|
||||
%global optflags %{optflags} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads
|
||||
%endif
|
||||
|
||||
# Decrease debuginfo even on ix86 because of:
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=140176
|
||||
%ifarch s390 s390x %{arm} %{ix86} ppc %{power64} %{mips}
|
||||
# Decrease debuginfo verbosity to reduce memory consumption even more
|
||||
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
||||
%endif
|
||||
|
||||
%ifarch ppc
|
||||
# Use linker flag -relax to get WebKit build under ppc(32) with JIT disabled
|
||||
%global optflags %{optflags} -Wl,-relax
|
||||
%endif
|
||||
|
||||
%if 0%{?bundle_icu}
|
||||
pushd ../icu/source
|
||||
autoconf
|
||||
CFLAGS='%optflags -fno-strict-aliasing'
|
||||
CXXFLAGS='%optflags -fno-strict-aliasing'
|
||||
%{!?endian: %global endian %(%{__python} -c "import sys;print (0 if sys.byteorder=='big' else 1)")}
|
||||
# " this line just fixes syntax highlighting for vim that is confused by the above and continues literal
|
||||
# Endian: BE=0 LE=1
|
||||
%if ! 0%{?endian}
|
||||
CPPFLAGS='-DU_IS_BIG_ENDIAN=1'
|
||||
%endif
|
||||
|
||||
#rhbz856594 do not use --disable-renaming or cope with the mess
|
||||
OPTIONS='--with-data-packaging=library --disable-samples'
|
||||
%configure $OPTIONS
|
||||
|
||||
#rhbz#225896
|
||||
sed -i 's|-nodefaultlibs -nostdlib||' config/mh-linux
|
||||
#rhbz#681941
|
||||
sed -i 's|^LIBS =.*|LIBS = -L../lib -licuuc -lpthread -lm|' i18n/Makefile
|
||||
sed -i 's|^LIBS =.*|LIBS = -nostdlib -L../lib -licuuc -licui18n -lc -lgcc|' io/Makefile
|
||||
sed -i 's|^LIBS =.*|LIBS = -nostdlib -L../lib -licuuc -lc|' layout/Makefile
|
||||
sed -i 's|^LIBS =.*|LIBS = -nostdlib -L../lib -licuuc -licule -lc|' layoutex/Makefile
|
||||
sed -i 's|^LIBS =.*|LIBS = -nostdlib -L../../lib -licutu -licuuc -lc|' tools/ctestfw/Makefile
|
||||
# As of ICU 52.1 the -nostdlib in tools/toolutil/Makefile results in undefined reference to `__dso_handle'
|
||||
sed -i 's|^LIBS =.*|LIBS = -L../../lib -licui18n -licuuc -lpthread -lc|' tools/toolutil/Makefile
|
||||
#rhbz#813484
|
||||
sed -i 's| \$(docfilesdir)/installdox||' Makefile
|
||||
# There is no source/doc/html/search/ directory
|
||||
sed -i '/^\s\+\$(INSTALL_DATA) \$(docsrchfiles) \$(DESTDIR)\$(docdir)\/\$(docsubsrchdir)\s*$/d' Makefile
|
||||
# rhbz#856594 The configure --disable-renaming and possibly other options
|
||||
# result in icu/source/uconfig.h.prepend being created, include that content in
|
||||
# icu/source/common/unicode/uconfig.h to propagate to consumer packages.
|
||||
test -f uconfig.h.prepend && sed -e '/^#define __UCONFIG_H__/ r uconfig.h.prepend' -i common/unicode/uconfig.h
|
||||
|
||||
# more verbosity for build.log
|
||||
sed -i -r 's|(PKGDATA_OPTS = )|\1-v |' data/Makefile
|
||||
|
||||
make %{?_smp_mflags} VERBOSE=1
|
||||
cd ..
|
||||
BUNDLED_ICU_PATH="`pwd`/icu_installed"
|
||||
make %{?_smp_mflags} -C source install DESTDIR=$BUNDLED_ICU_PATH
|
||||
popd
|
||||
%endif
|
||||
|
||||
# Enable DTS
|
||||
%if 0%{?rhel} == 7
|
||||
source /opt/rh/devtoolset-7/enable
|
||||
source /opt/rh/llvm-toolset-7/enable
|
||||
%define __cmake /opt/rh/llvm-toolset-7/root/usr/bin/cmake
|
||||
%endif
|
||||
|
||||
# Disable ld.gold on s390 as it does not have it.
|
||||
# Also for aarch64 as the support is in upstream, but not packaged in Fedora.
|
||||
# Disable WebCrypto as we have an old libgcrypt in RHEL 7
|
||||
mkdir -p %{_target_platform}
|
||||
pushd %{_target_platform}
|
||||
%cmake \
|
||||
-DPORT=GTK \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
%if 0%{bundle_icu}
|
||||
-DICU_DATA_LIBRARY=$BUNDLED_ICU_PATH/%{_libdir}/libicudata.so \
|
||||
-DICU_I18N_LIBRARY=$BUNDLED_ICU_PATH/%{_libdir}/libicui18n.so \
|
||||
-DICU_INCLUDE_DIR=$BUNDLED_ICU_PATH/%{_includedir} \
|
||||
-DICU_LIBRARY=$BUNDLED_ICU_PATH/%{_libdir}/libicuuc.so \
|
||||
-DCMAKE_INSTALL_RPATH=%{_libdir}/webkit2gtk-4.0 \
|
||||
%endif
|
||||
-DENABLE_GTKDOC=ON \
|
||||
-DENABLE_MINIBROWSER=ON \
|
||||
-DENABLE_WEB_CRYPTO=OFF \
|
||||
-DENABLE_MEDIA_SOURCE=OFF \
|
||||
-DENABLE_BUBBLEWRAP_SANDBOX=OFF \
|
||||
-DUSE_OPENJPEG=OFF \
|
||||
-DUSE_WPE_RENDERER=OFF \
|
||||
%ifarch s390 aarch64
|
||||
-DUSE_LD_GOLD=OFF \
|
||||
%endif
|
||||
%ifarch s390 s390x ppc %{power64} aarch64 %{mips}
|
||||
-DENABLE_JIT=OFF \
|
||||
-DUSE_SYSTEM_MALLOC=ON \
|
||||
%endif
|
||||
..
|
||||
popd
|
||||
|
||||
# Remove the static amount of jobs once
|
||||
# Use -j2 to reduce maximum memory usage (relative to default -j24).
|
||||
make -j2 -C %{_target_platform}
|
||||
|
||||
%install
|
||||
%if 0%{?bundle_icu}
|
||||
pushd ../icu/icu_installed/%{_libdir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_libdir}/webkit2gtk-4.0/
|
||||
cp -a libicudata.so.* $RPM_BUILD_ROOT%{_libdir}/webkit2gtk-4.0/
|
||||
cp -a libicui18n.so.* $RPM_BUILD_ROOT%{_libdir}/webkit2gtk-4.0/
|
||||
cp -a libicuuc.so.* $RPM_BUILD_ROOT%{_libdir}/webkit2gtk-4.0/
|
||||
popd
|
||||
# We don't want debuginfo generated for the bundled icu libraries.
|
||||
# Turn off execute bit so they aren't included in the debuginfo.list.
|
||||
# We'll turn the execute bit on again in %%files.
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1486771
|
||||
chmod 644 $RPM_BUILD_ROOT%{_libdir}/webkit2gtk-4.0/libicudata.so.57.1
|
||||
chmod 644 $RPM_BUILD_ROOT%{_libdir}/webkit2gtk-4.0/libicui18n.so.57.1
|
||||
chmod 644 $RPM_BUILD_ROOT%{_libdir}/webkit2gtk-4.0/libicuuc.so.57.1
|
||||
%endif
|
||||
|
||||
%make_install %{?_smp_mflags} -C %{_target_platform}
|
||||
|
||||
%find_lang WebKit2GTK-4.0
|
||||
|
||||
# Finally, copy over and rename various files for %%license inclusion
|
||||
%add_to_license_files Source/JavaScriptCore/COPYING.LIB
|
||||
%add_to_license_files Source/ThirdParty/ANGLE/LICENSE
|
||||
%add_to_license_files Source/ThirdParty/ANGLE/src/common/third_party/smhasher/LICENSE
|
||||
%add_to_license_files Source/ThirdParty/ANGLE/src/third_party/compiler/LICENSE
|
||||
%add_to_license_files Source/ThirdParty/ANGLE/src/third_party/libXNVCtrl/LICENSE
|
||||
%add_to_license_files Source/ThirdParty/brotli/LICENSE
|
||||
%add_to_license_files Source/ThirdParty/woff2/LICENSE
|
||||
%add_to_license_files Source/WebCore/LICENSE-APPLE
|
||||
%add_to_license_files Source/WebCore/LICENSE-LGPL-2
|
||||
%add_to_license_files Source/WebCore/LICENSE-LGPL-2.1
|
||||
%add_to_license_files Source/WebInspectorUI/UserInterface/External/CodeMirror/LICENSE
|
||||
%add_to_license_files Source/WebInspectorUI/UserInterface/External/Esprima/LICENSE
|
||||
%add_to_license_files Source/WebInspectorUI/UserInterface/External/three.js/LICENSE
|
||||
%add_to_license_files Source/WTF/icu/LICENSE
|
||||
%add_to_license_files Source/WTF/wtf/dtoa/COPYING
|
||||
%add_to_license_files Source/WTF/wtf/dtoa/LICENSE
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
%post jsc -p /sbin/ldconfig
|
||||
%postun jsc -p /sbin/ldconfig
|
||||
|
||||
%files -f WebKit2GTK-4.0.lang
|
||||
%license _license_files/*ThirdParty*
|
||||
%license _license_files/*WebCore*
|
||||
%license _license_files/*WebInspectorUI*
|
||||
%license _license_files/*WTF*
|
||||
%{_libdir}/libwebkit2gtk-4.0.so.*
|
||||
%dir %{_libdir}/girepository-1.0
|
||||
%{_libdir}/girepository-1.0/WebKit2-4.0.typelib
|
||||
%{_libdir}/girepository-1.0/WebKit2WebExtension-4.0.typelib
|
||||
%{_libdir}/webkit2gtk-4.0/
|
||||
# Turn on executable bit again for bundled icu libraries.
|
||||
# Was disabled in %%install to prevent debuginfo stripping.
|
||||
%attr(0755,root,root) %{_libdir}/webkit2gtk-4.0/libicudata.so.57.1
|
||||
%attr(0755,root,root) %{_libdir}/webkit2gtk-4.0/libicui18n.so.57.1
|
||||
%attr(0755,root,root) %{_libdir}/webkit2gtk-4.0/libicuuc.so.57.1
|
||||
%{_libexecdir}/webkit2gtk-4.0/
|
||||
%{_bindir}/WebKitWebDriver
|
||||
|
||||
%files devel
|
||||
%{_libexecdir}/webkit2gtk-4.0/MiniBrowser
|
||||
%{_includedir}/webkitgtk-4.0/
|
||||
%exclude %{_includedir}/webkitgtk-4.0/JavaScriptCore
|
||||
%{_libdir}/libwebkit2gtk-4.0.so
|
||||
%{_libdir}/pkgconfig/webkit2gtk-4.0.pc
|
||||
%{_libdir}/pkgconfig/webkit2gtk-web-extension-4.0.pc
|
||||
%{_datadir}/gir-1.0/WebKit2-4.0.gir
|
||||
%{_datadir}/gir-1.0/WebKit2WebExtension-4.0.gir
|
||||
|
||||
%files jsc
|
||||
%license _license_files/*JavaScriptCore*
|
||||
%{_libdir}/libjavascriptcoregtk-4.0.so.*
|
||||
%dir %{_libdir}/girepository-1.0
|
||||
%{_libdir}/girepository-1.0/JavaScriptCore-4.0.typelib
|
||||
|
||||
%files jsc-devel
|
||||
%{_libexecdir}/webkit2gtk-4.0/jsc
|
||||
%dir %{_includedir}/webkitgtk-4.0
|
||||
%{_includedir}/webkitgtk-4.0/JavaScriptCore/
|
||||
%{_libdir}/libjavascriptcoregtk-4.0.so
|
||||
%{_libdir}/pkgconfig/javascriptcoregtk-4.0.pc
|
||||
%dir %{_datadir}/gir-1.0
|
||||
%{_datadir}/gir-1.0/JavaScriptCore-4.0.gir
|
||||
|
||||
%files doc
|
||||
%dir %{_datadir}/gtk-doc
|
||||
%dir %{_datadir}/gtk-doc/html
|
||||
%{_datadir}/gtk-doc/html/jsc-glib-4.0/
|
||||
%{_datadir}/gtk-doc/html/webkit2gtk-4.0/
|
||||
%{_datadir}/gtk-doc/html/webkitdomgtk-4.0/
|
||||
|
||||
%changelog
|
||||
* Sat Jun 20 2020 Michael Catanzaro <mcatanzaro@redhat.com> - 2.28.2-2
|
||||
- Resolves: rhbz#1817144 Rebuild to support ppc and s390
|
||||
|
||||
* Thu May 21 2020 Michael Catanzaro <mcatanzaro@redhat.com> - 2.28.2-1
|
||||
- Resolves: rhbz#1817144 Rebase to 2.28.2
|
||||
|
||||
* Thu Apr 04 2019 Eike Rathke <erack@redhat.com> - 2.22.7-2
|
||||
- Related: rhbz#1669482 covscan fixes
|
||||
|
||||
* Mon Mar 25 2019 Eike Rathke <erack@redhat.com> - 2.22.7-1
|
||||
- Related: rhbz#1669482 Update to 2.22.7
|
||||
|
||||
* Tue Feb 12 2019 Eike Rathke <erack@redhat.com> - 2.22.6-1
|
||||
- Resolves: rhbz#1669482 Rebase to 2.22.6
|
||||
|
||||
* Tue Aug 14 2018 Tomas Popela <tpopela@redhat.com> - 2.20.5-1
|
||||
- Update to 2.20.5 - technically it was not necessary as the only difference
|
||||
between 2.20.4 and .5 was the revert of one change, that we already reverted
|
||||
while building 2.20.4. But it's better to stay with upstream.
|
||||
- Update the labels patch with the version that was pushed upstream.
|
||||
- Resolves: rhbz#1576544
|
||||
|
||||
* Thu Aug 09 2018 Tomas Popela <tpopela@redhat.com> - 2.20.4-2
|
||||
- webkitgtk4: Crash on Google login page when a11y is active
|
||||
- Resolves: rhbz#1503624
|
||||
- Revert patch causing rendering glitches
|
||||
|
||||
* Mon Aug 06 2018 Tomas Popela <tpopela@redhat.com> - 2.20.4-1
|
||||
- Update to 2.20.4
|
||||
- Resolves: rhbz#1576544
|
||||
- WebKitWebProcess crashes when a11y is active
|
||||
- Resolves: rhbz#1591638
|
||||
|
||||
* Wed Jun 27 2018 Tomas Popela <tpopela@redhat.com> - 2.20.3-5
|
||||
- Add GStreamer coverity fixes
|
||||
- Resolves: rhbz#1576544
|
||||
|
||||
* Tue Jun 26 2018 Tomas Popela <tpopela@redhat.com> - 2.20.3-4
|
||||
- More rpmdiff and covscan fixes
|
||||
- Resolves: rhbz#1576544
|
||||
|
||||
* Wed Jun 13 2018 Tomas Popela <tpopela@redhat.com> - 2.20.3-3
|
||||
- Unbundle cmake
|
||||
- Add covscan fixes
|
||||
- Resolves: rhbz#1576544
|
||||
|
||||
* Tue Jun 12 2018 Tomas Popela <tpopela@redhat.com> - 2.20.3-2
|
||||
- Fix the rpmdiff warning
|
||||
- Resolves: rhbz#1576544
|
||||
|
||||
* Mon Jun 11 2018 Tomas Popela <tpopela@redhat.com> - 2.20.3-1
|
||||
- Update to 2.20.3
|
||||
- Resolves: rhbz#1576544
|
||||
|
||||
* Fri Jun 08 2018 Tomas Popela <tpopela@redhat.com> - 2.20.2-1
|
||||
- Update to 2.20.2
|
||||
- Resolves: rhbz#1576544
|
||||
|
||||
* Wed Nov 08 2017 Tomas Popela <tpopela@redhat.com> - 2.16.6-6
|
||||
- Don't strip debug info from bundled icu libraries, otherwise there
|
||||
will be conflicts between webkitgtk4-debuginfo and icu-debuginfo packages
|
||||
- Resolves: rhbz#1486771
|
||||
|
||||
* Mon Oct 09 2017 Tomas Popela <tpopela@redhat.com> - 2.16.6-5
|
||||
- Update the bundled brotli and woff2 to the latest releases due to
|
||||
woff2's license incompatibility with WebKitGTK+ project
|
||||
- Resolves: rhbz#1499745
|
||||
- Drop unused patches
|
||||
|
||||
* Fri Sep 29 2017 Tomas Popela <tpopela@redhat.com> - 2.16.6-4
|
||||
- Build wayland support
|
||||
- Backport fixes proposed by upstream to 2.16 branch
|
||||
- Remove accidentally committed workaround for rhbz#1486771
|
||||
- Resolves: rhbz#1496800
|
||||
|
||||
* Tue Sep 05 2017 Tomas Popela <tpopela@redhat.com> - 2.16.6-3
|
||||
- Coverity scan fixes
|
||||
- Resolves: rhbz#1476707
|
||||
|
||||
* Fri Aug 25 2017 Tomas Popela <tpopela@redhat.com> - 2.16.6-2
|
||||
- Backport security fixes for bundled icu
|
||||
- Backport geoclue2 id fixes
|
||||
- Resolves: rhbz#1476707
|
||||
|
||||
* Thu Aug 17 2017 Tomas Popela <tpopela@redhat.com> - 2.16.6-1
|
||||
- Update to 2.16.6
|
||||
- Resolves: rhbz#1476707
|
||||
|
||||
* Fri Jun 16 2017 Tomas Popela <tpopela@redhat.com> - 2.14.7-2
|
||||
- Fix a CLoop patch that was not correctly backported from upstream, causing
|
||||
crashes on big endian machines
|
||||
- Resolves: rhbz#1442160
|
||||
|
||||
* Thu Jun 01 2017 Tomas Popela <tpopela@redhat.com> - 2.14.7-1
|
||||
- Update to 2.14.7
|
||||
- Backport more of a11y fixes from upstream
|
||||
- Fix JSC crashes on big endian arches
|
||||
- Resolves: rhbz#1442160
|
||||
|
||||
* Wed May 10 2017 Milan Crha <mcrha@redhat.com> - 2.14.6-6
|
||||
- Add upstream patch to fix login to Google account
|
||||
- Resolves: rhbz#1448192
|
||||
|
||||
* Wed Apr 26 2017 Tomas Popela <tpopela@redhat.com> - 2.14.6-5
|
||||
- Don't require icu libraries that are bundled
|
||||
- Resolves: rhbz#1414413
|
||||
|
||||
* Tue Apr 25 2017 Tomas Popela <tpopela@redhat.com> - 2.14.6-4
|
||||
- Use the right function for removing from provides
|
||||
- Resolves: rhbz#1383614
|
||||
|
||||
* Mon Apr 24 2017 Tomas Popela <tpopela@redhat.com> - 2.14.6-3
|
||||
- Bundle only needed icu libraries
|
||||
- Don't list bundled icu libraries in provides
|
||||
- Resolves: rhbz#1383614
|
||||
|
||||
* Mon Apr 24 2017 Tomas Popela <tpopela@redhat.com> - 2.14.6-2
|
||||
- Bundle icu57
|
||||
- Resolves: rhbz#1414413
|
||||
|
||||
* Mon Apr 10 2017 Tomas Popela <tpopela@redhat.com> - 2.14.6-1
|
||||
- Update to 2.14.6
|
||||
- Resolves: rhbz#1440681
|
||||
- Don't crash is no render is available in AX render object
|
||||
- Resolves: rhbz#1437672
|
||||
|
||||
* Tue Mar 21 2017 Tomas Popela <tpopela@redhat.com> - 2.14.5-5
|
||||
- Add more Coverity scan fixes
|
||||
- Remove icu from sources
|
||||
- Resolves: rhbz#1383614
|
||||
|
||||
* Mon Mar 13 2017 Tomas Popela <tpopela@redhat.com> - 2.14.5-4
|
||||
- Add some Coverity scan fixes
|
||||
- Resolves: rhbz#1383614
|
||||
|
||||
* Tue Feb 28 2017 Tomas Popela <tpopela@redhat.com> - 2.14.5-3
|
||||
- Add explicit requires of webkitgtk4-jsc for -devel and -plugin-process-gtk2
|
||||
subpackages (found by rpmdiff).
|
||||
- Resolves: rhbz#1383614
|
||||
|
||||
* Mon Feb 20 2017 Tomas Popela <tpopela@redhat.com> - 2.14.5-2
|
||||
- Remove bundled ICU and require libicu57
|
||||
- Resolves: rhbz#1383614
|
||||
|
||||
* Thu Feb 16 2017 Kalev Lember <klember@redhat.com> - 2.14.5-1
|
||||
- Update to 2.14.5
|
||||
- Resolves: rhbz#1383614
|
||||
|
||||
* Fri Feb 10 2017 Tomas Popela <tpopela@redhat.com> - 2.14.4-1
|
||||
- Initial RHEL packaging
|
||||
- Temporary bundling icu57 until rhbz#1414413 is resolved
|
||||
- Resolves: rhbz#1383614
|
Loading…
Reference in New Issue