Diff
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/ChangeLog (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/ChangeLog 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/ChangeLog 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,5 +1,48 @@
2017-10-05 Frederic Wang <[email protected]>
+ Update Source/ThirdParty/woff2 to 22c256bc457777744ba14b7325a6e8e0e7dec91c
+ https://bugs.webkit.org/show_bug.cgi?id=177994
+
+ Reviewed by Michael Catanzaro.
+
+ * woff2/CMakeLists.txt: Also consider the directory for public headers.
+ * woff2/README.webkit:
+ * woff2/include/woff2/decode.h: Renamed from Source/ThirdParty/woff2/src/woff2_dec.h.
+ * woff2/include/woff2/encode.h: Renamed from Source/ThirdParty/woff2/src/woff2_enc.h.
+ (woff2::WOFF2Params::WOFF2Params):
+ * woff2/include/woff2/output.h: Renamed from Source/ThirdParty/woff2/src/woff2_out.h.
+ (woff2::WOFF2Out::~WOFF2Out):
+ (woff2::WOFF2StringOut::MaxSize):
+ * woff2/src/buffer.h:
+ * woff2/src/convert_woff2ttf_*.cc:
+ * woff2/src/file.h:
+ * woff2/src/font.cc:
+ * woff2/src/font.h:
+ * woff2/src/glyph.cc:
+ * woff2/src/glyph.h:
+ * woff2/src/normalize.cc:
+ * woff2/src/normalize.h:
+ * woff2/src/port.h:
+ * woff2/src/round.h:
+ * woff2/src/store_bytes.h:
+ * woff2/src/table_tags.cc:
+ * woff2/src/table_tags.h:
+ * woff2/src/transform.cc:
+ * woff2/src/transform.h:
+ * woff2/src/variable_length.cc:
+ * woff2/src/variable_length.h:
+ * woff2/src/woff2_common.cc:
+ * woff2/src/woff2_common.h:
+ * woff2/src/woff2_compress.cc:
+ * woff2/src/woff2_dec.cc:
+ * woff2/src/woff2_decompress.cc:
+ * woff2/src/woff2_enc.cc:
+ * woff2/src/woff2_info.cc:
+ * woff2/src/woff2_out.cc:
+ * woff2/update.sh: Also consider directory for public headers.
+
+2017-10-05 Frederic Wang <[email protected]>
+
Upgrade Brotli to version 1.0.1 and WOFF2 to latest upstream
https://bugs.webkit.org/show_bug.cgi?id=177768
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/CMakeLists.txt (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/CMakeLists.txt 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/CMakeLists.txt 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,6 +1,7 @@
set(WOFF2_DIR "${THIRDPARTY_DIR}/woff2")
set(WOFF2_INCLUDE_DIRECTORIES
+ "${WOFF2_DIR}/include"
"${WOFF2_DIR}/src"
)
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/README.webkit (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/README.webkit 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/README.webkit 2017-10-17 11:35:50 UTC (rev 223517)
@@ -11,4 +11,4 @@
sh update.sh
from within the modules/woff2 directory.
-Current version: [commit aa283a500aeb655834d77f3cf9cf1b093b0b4389].
+Current version: [commit 22c256bc457777744ba14b7325a6e8e0e7dec91c].
Copied: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/include/woff2/decode.h (from rev 223516, releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_dec.h) (0 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/include/woff2/decode.h (rev 0)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/include/woff2/decode.h 2017-10-17 11:35:50 UTC (rev 223517)
@@ -0,0 +1,36 @@
+/* Copyright 2014 Google Inc. All Rights Reserved.
+
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Library for converting WOFF2 format font files to their TTF versions. */
+
+#ifndef WOFF2_WOFF2_DEC_H_
+#define WOFF2_WOFF2_DEC_H_
+
+#include <stddef.h>
+#include <inttypes.h>
+#include <woff2/output.h>
+
+namespace woff2 {
+
+// Compute the size of the final uncompressed font, or 0 on error.
+size_t ComputeWOFF2FinalSize(const uint8_t *data, size_t length);
+
+// Decompresses the font into the target buffer. The result_length should
+// be the same as determined by ComputeFinalSize(). Returns true on successful
+// decompression.
+// DEPRECATED; please prefer the version that takes a WOFF2Out*
+bool ConvertWOFF2ToTTF(uint8_t *result, size_t result_length,
+ const uint8_t *data, size_t length);
+
+// Decompresses the font into out. Returns true on success.
+// Works even if WOFF2Header totalSfntSize is wrong.
+// Please prefer this API.
+bool ConvertWOFF2ToTTF(const uint8_t *data, size_t length,
+ WOFF2Out* out);
+
+} // namespace woff2
+
+#endif // WOFF2_WOFF2_DEC_H_
Copied: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/include/woff2/encode.h (from rev 223516, releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_enc.h) (0 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/include/woff2/encode.h (rev 0)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/include/woff2/encode.h 2017-10-17 11:35:50 UTC (rev 223517)
@@ -0,0 +1,43 @@
+/* Copyright 2014 Google Inc. All Rights Reserved.
+
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Library for converting WOFF2 format font files to their TTF versions. */
+
+#ifndef WOFF2_WOFF2_ENC_H_
+#define WOFF2_WOFF2_ENC_H_
+
+#include <stddef.h>
+#include <inttypes.h>
+#include <string>
+
+namespace woff2 {
+
+struct WOFF2Params {
+ WOFF2Params() : extended_metadata(""), brotli_quality(11),
+ allow_transforms(true) {}
+
+ std::string extended_metadata;
+ int brotli_quality;
+ bool allow_transforms;
+};
+
+// Returns an upper bound on the size of the compressed file.
+size_t MaxWOFF2CompressedSize(const uint8_t* data, size_t length);
+size_t MaxWOFF2CompressedSize(const uint8_t* data, size_t length,
+ const std::string& extended_metadata);
+
+// Compresses the font into the target buffer. *result_length should be at least
+// the value returned by MaxWOFF2CompressedSize(), upon return, it is set to the
+// actual compressed size. Returns true on successful compression.
+bool ConvertTTFToWOFF2(const uint8_t *data, size_t length,
+ uint8_t *result, size_t *result_length);
+bool ConvertTTFToWOFF2(const uint8_t *data, size_t length,
+ uint8_t *result, size_t *result_length,
+ const WOFF2Params& params);
+
+} // namespace woff2
+
+#endif // WOFF2_WOFF2_ENC_H_
Copied: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/include/woff2/output.h (from rev 223516, releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_out.h) (0 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/include/woff2/output.h (rev 0)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/include/woff2/output.h 2017-10-17 11:35:50 UTC (rev 223517)
@@ -0,0 +1,86 @@
+/* Copyright 2016 Google Inc. All Rights Reserved.
+
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Output buffer for WOFF2 decompression. */
+
+#ifndef WOFF2_WOFF2_OUT_H_
+#define WOFF2_WOFF2_OUT_H_
+
+#include <algorithm>
+#include <cstring>
+#include <memory>
+#include <string>
+
+namespace woff2 {
+
+// Suggested max size for output.
+const size_t kDefaultMaxSize = 30 * 1024 * 1024;
+
+/**
+ * Output interface for the woff2 decoding.
+ *
+ * Writes to arbitrary offsets are supported to facilitate updating offset
+ * table and checksums after tables are ready. Reading the current size is
+ * supported so a 'loca' table can be built up while writing glyphs.
+ *
+ * By default limits size to kDefaultMaxSize.
+ */
+class WOFF2Out {
+ public:
+ virtual ~WOFF2Out(void) {}
+
+ // Append n bytes of data from buf.
+ // Return true if all written, false otherwise.
+ virtual bool Write(const void *buf, size_t n) = 0;
+
+ // Write n bytes of data from buf at offset.
+ // Return true if all written, false otherwise.
+ virtual bool Write(const void *buf, size_t offset, size_t n) = 0;
+
+ virtual size_t Size() = 0;
+};
+
+/**
+ * Expanding memory block for woff2 out. By default limited to kDefaultMaxSize.
+ */
+class WOFF2StringOut : public WOFF2Out {
+ public:
+ // Create a writer that writes its data to buf.
+ // buf->size() will grow to at most max_size
+ // buf may be sized (e.g. using EstimateWOFF2FinalSize) or empty.
+ explicit WOFF2StringOut(std::string* buf);
+
+ bool Write(const void *buf, size_t n) override;
+ bool Write(const void *buf, size_t offset, size_t n) override;
+ size_t Size() override { return offset_; }
+ size_t MaxSize() { return max_size_; }
+ void SetMaxSize(size_t max_size);
+ private:
+ std::string* buf_;
+ size_t max_size_;
+ size_t offset_;
+};
+
+/**
+ * Fixed memory block for woff2 out.
+ */
+class WOFF2MemoryOut : public WOFF2Out {
+ public:
+ // Create a writer that writes its data to buf.
+ WOFF2MemoryOut(uint8_t* buf, size_t buf_size);
+
+ bool Write(const void *buf, size_t n) override;
+ bool Write(const void *buf, size_t offset, size_t n) override;
+ size_t Size() override { return offset_; }
+ private:
+ uint8_t* buf_;
+ size_t buf_size_;
+ size_t offset_;
+};
+
+} // namespace woff2
+
+#endif // WOFF2_WOFF2_OUT_H_
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/buffer.h (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/buffer.h 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/buffer.h 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,20 +1,12 @@
-// Copyright 2013 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// The parts of ots.h & opentype-sanitiser.h that we need, taken from the
-// https://code.google.com/p/ots/ project.
+/* Copyright 2013 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* The parts of ots.h & opentype-sanitiser.h that we need, taken from the
+ https://code.google.com/p/ots/ project. */
+
#ifndef WOFF2_BUFFER_H_
#define WOFF2_BUFFER_H_
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/convert_woff2ttf_fuzzer.cc (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/convert_woff2ttf_fuzzer.cc 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/convert_woff2ttf_fuzzer.cc 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,7 +1,7 @@
#include <stddef.h>
#include <stdint.h>
-#include "woff2_dec.h"
+#include <woff2/decode.h>
// Entry point for LibFuzzer.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/convert_woff2ttf_fuzzer_new_entry.cc (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/convert_woff2ttf_fuzzer_new_entry.cc 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/convert_woff2ttf_fuzzer_new_entry.cc 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,5 +1,5 @@
#include <string>
-#include "woff2_dec.h"
+#include <woff2/decode.h>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t data_size) {
// Decode using newer entry pattern.
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/file.h (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/file.h 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/file.h 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,19 +1,11 @@
-// Copyright 2013 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// File IO helpers.
+/* Copyright 2013 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* File IO helpers. */
+
#ifndef WOFF2_FILE_H_
#define WOFF2_FILE_H_
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/font.cc (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/font.cc 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/font.cc 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,19 +1,11 @@
-// Copyright 2013 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Font management utilities
+/* Copyright 2013 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Font management utilities */
+
#include "./font.h"
#include <algorithm>
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/font.h (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/font.h 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/font.h 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,20 +1,12 @@
-// Copyright 2013 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Data model for a font file in sfnt format, reading and writing functions and
-// accessors for the glyph data.
+/* Copyright 2013 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Data model for a font file in sfnt format, reading and writing functions and
+ accessors for the glyph data. */
+
#ifndef WOFF2_FONT_H_
#define WOFF2_FONT_H_
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/glyph.cc (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/glyph.cc 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/glyph.cc 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,19 +1,11 @@
-// Copyright 2013 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Glyph manipulation
+/* Copyright 2013 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Glyph manipulation */
+
#include "./glyph.h"
#include <stdlib.h>
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/glyph.h (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/glyph.h 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/glyph.h 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,20 +1,12 @@
-// Copyright 2013 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Data model and I/O for glyph data within sfnt format files for the purpose of
-// performing the preprocessing step of the WOFF 2.0 conversion.
+/* Copyright 2013 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Data model and I/O for glyph data within sfnt format files for the purpose of
+ performing the preprocessing step of the WOFF 2.0 conversion. */
+
#ifndef WOFF2_GLYPH_H_
#define WOFF2_GLYPH_H_
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/normalize.cc (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/normalize.cc 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/normalize.cc 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,19 +1,11 @@
-// Copyright 2013 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Glyph normalization
+/* Copyright 2013 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Glyph normalization */
+
#include "./normalize.h"
#include <inttypes.h>
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/normalize.h (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/normalize.h 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/normalize.h 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,21 +1,13 @@
-// Copyright 2013 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Functions for normalizing fonts. Since the WOFF 2.0 decoder creates font
-// files in normalized form, the WOFF 2.0 conversion is guaranteed to be
-// lossless (in a bitwise sense) only for normalized font files.
+/* Copyright 2013 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Functions for normalizing fonts. Since the WOFF 2.0 decoder creates font
+ files in normalized form, the WOFF 2.0 conversion is guaranteed to be
+ lossless (in a bitwise sense) only for normalized font files. */
+
#ifndef WOFF2_NORMALIZE_H_
#define WOFF2_NORMALIZE_H_
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/port.h (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/port.h 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/port.h 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,19 +1,11 @@
-// Copyright 2013 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Helper function for bit twiddling and macros for branch prediction.
+/* Copyright 2013 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Helper function for bit twiddling and macros for branch prediction. */
+
#ifndef WOFF2_PORT_H_
#define WOFF2_PORT_H_
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/round.h (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/round.h 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/round.h 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,19 +1,11 @@
-// Copyright 2013 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Helper for rounding
+/* Copyright 2013 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Helper for rounding */
+
#ifndef WOFF2_ROUND_H_
#define WOFF2_ROUND_H_
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/store_bytes.h (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/store_bytes.h 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/store_bytes.h 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,20 +1,12 @@
-// Copyright 2013 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Helper functions for storing integer values into byte streams.
-// No bounds checking is performed, that is the responsibility of the caller.
+/* Copyright 2013 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Helper functions for storing integer values into byte streams.
+ No bounds checking is performed, that is the responsibility of the caller. */
+
#ifndef WOFF2_STORE_BYTES_H_
#define WOFF2_STORE_BYTES_H_
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/table_tags.cc (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/table_tags.cc 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/table_tags.cc 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,19 +1,11 @@
-// Copyright 2014 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Font table tags
+/* Copyright 2014 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Font table tags */
+
#include "./table_tags.h"
namespace woff2 {
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/table_tags.h (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/table_tags.h 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/table_tags.h 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,19 +1,11 @@
-// Copyright 2014 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Font table tags
+/* Copyright 2014 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Font table tags */
+
#ifndef WOFF2_TABLE_TAGS_H_
#define WOFF2_TABLE_TAGS_H_
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/transform.cc (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/transform.cc 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/transform.cc 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,19 +1,11 @@
-// Copyright 2013 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Library for preprocessing fonts as part of the WOFF 2.0 conversion.
+/* Copyright 2013 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Library for preprocessing fonts as part of the WOFF 2.0 conversion. */
+
#include "./transform.h"
#include <complex> // for std::abs
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/transform.h (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/transform.h 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/transform.h 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,19 +1,11 @@
-// Copyright 2013 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Library for preprocessing fonts as part of the WOFF 2.0 conversion.
+/* Copyright 2014 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Library for preprocessing fonts as part of the WOFF 2.0 conversion. */
+
#ifndef WOFF2_TRANSFORM_H_
#define WOFF2_TRANSFORM_H_
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/variable_length.cc (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/variable_length.cc 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/variable_length.cc 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,19 +1,11 @@
-// Copyright 2015 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Helper functions for woff2 variable length types: 255UInt16 and UIntBase128
+/* Copyright 2015 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Helper functions for woff2 variable length types: 255UInt16 and UIntBase128 */
+
#include "./variable_length.h"
namespace woff2 {
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/variable_length.h (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/variable_length.h 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/variable_length.h 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,19 +1,11 @@
-// Copyright 2015 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Helper functions for woff2 variable length types: 255UInt16 and UIntBase128
+/* Copyright 2015 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Helper functions for woff2 variable length types: 255UInt16 and UIntBase128 */
+
#ifndef WOFF2_VARIABLE_LENGTH_H_
#define WOFF2_VARIABLE_LENGTH_H_
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_common.cc (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_common.cc 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_common.cc 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,19 +1,11 @@
-// Copyright 2013 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Helpers common across multiple parts of woff2
+/* Copyright 2013 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Helpers common across multiple parts of woff2 */
+
#include <algorithm>
#include "./woff2_common.h"
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_common.h (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_common.h 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_common.h 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,19 +1,11 @@
-// Copyright 2014 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Common definition for WOFF2 encoding/decoding
+/* Copyright 2014 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Common definition for WOFF2 encoding/decoding */
+
#ifndef WOFF2_WOFF2_COMMON_H_
#define WOFF2_WOFF2_COMMON_H_
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_compress.cc (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_compress.cc 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_compress.cc 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,23 +1,15 @@
-// Copyright 2013 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// A commandline tool for compressing ttf format files to woff2.
+/* Copyright 2013 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* A commandline tool for compressing ttf format files to woff2. */
+
#include <string>
#include "file.h"
-#include "./woff2_enc.h"
+#include <woff2/encode.h>
int main(int argc, char **argv) {
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_dec.cc (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_dec.cc 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_dec.cc 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,21 +1,13 @@
-// Copyright 2014 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Library for converting WOFF2 format font files to their TTF versions.
+/* Copyright 2014 Google Inc. All Rights Reserved.
-#include "./woff2_dec.h"
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+/* Library for converting WOFF2 format font files to their TTF versions. */
+
+#include <woff2/decode.h>
+
#include <stdlib.h>
#include <algorithm>
#include <complex>
@@ -27,7 +19,7 @@
#include <memory>
#include <utility>
-#include "./brotli/decode.h"
+#include <brotli/decode.h>
#include "./buffer.h"
#include "./port.h"
#include "./round.h"
Deleted: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_dec.h (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_dec.h 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_dec.h 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,44 +0,0 @@
-// Copyright 2014 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Library for converting WOFF2 format font files to their TTF versions.
-
-#ifndef WOFF2_WOFF2_DEC_H_
-#define WOFF2_WOFF2_DEC_H_
-
-#include <stddef.h>
-#include <inttypes.h>
-#include "./woff2_out.h"
-
-namespace woff2 {
-
-// Compute the size of the final uncompressed font, or 0 on error.
-size_t ComputeWOFF2FinalSize(const uint8_t *data, size_t length);
-
-// Decompresses the font into the target buffer. The result_length should
-// be the same as determined by ComputeFinalSize(). Returns true on successful
-// decompression.
-// DEPRECATED; please prefer the version that takes a WOFF2Out*
-bool ConvertWOFF2ToTTF(uint8_t *result, size_t result_length,
- const uint8_t *data, size_t length);
-
-// Decompresses the font into out. Returns true on success.
-// Works even if WOFF2Header totalSfntSize is wrong.
-// Please prefer this API.
-bool ConvertWOFF2ToTTF(const uint8_t *data, size_t length,
- WOFF2Out* out);
-
-} // namespace woff2
-
-#endif // WOFF2_WOFF2_DEC_H_
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_decompress.cc (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_decompress.cc 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_decompress.cc 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,24 +1,16 @@
-// Copyright 2013 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// A very simple commandline tool for decompressing woff2 format files to true
-// type font files.
+/* Copyright 2013 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* A very simple commandline tool for decompressing woff2 format files to true
+ type font files. */
+
#include <string>
#include "./file.h"
-#include "./woff2_dec.h"
+#include <woff2/decode.h>
int main(int argc, char **argv) {
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_enc.cc (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_enc.cc 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_enc.cc 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,21 +1,13 @@
-// Copyright 2014 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Library for converting TTF format font files to their WOFF2 versions.
+/* Copyright 2014 Google Inc. All Rights Reserved.
-#include "./woff2_enc.h"
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+/* Library for converting TTF format font files to their WOFF2 versions. */
+
+#include <woff2/encode.h>
+
#include <stdlib.h>
#include <complex>
#include <cstring>
@@ -23,7 +15,7 @@
#include <string>
#include <vector>
-#include "./brotli/encode.h"
+#include <brotli/encode.h>
#include "./buffer.h"
#include "./font.h"
#include "./normalize.h"
@@ -436,7 +428,7 @@
std::pair<uint32_t, uint32_t> tag_offset(table.tag, table_offset);
if (index_by_tag_offset.find(tag_offset) == index_by_tag_offset.end()) {
#ifdef FONT_COMPRESSION_BIN
- fprintf(stderr, "Missing table index for offset 0x%08x\n",
+fprintf(stderr, "Missing table index for offset 0x%08x\n",
table_offset);
#endif
return FONT_COMPRESSION_FAILURE();
Deleted: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_enc.h (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_enc.h 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_enc.h 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,54 +0,0 @@
-// Copyright 2014 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Library for converting WOFF2 format font files to their TTF versions.
-
-#ifndef WOFF2_WOFF2_ENC_H_
-#define WOFF2_WOFF2_ENC_H_
-
-#include <stddef.h>
-#include <inttypes.h>
-#include <string>
-
-using std::string;
-
-
-namespace woff2 {
-
-struct WOFF2Params {
- WOFF2Params() : extended_metadata(""), brotli_quality(11),
- allow_transforms(true) {}
-
- string extended_metadata;
- int brotli_quality;
- bool allow_transforms;
-};
-
-// Returns an upper bound on the size of the compressed file.
-size_t MaxWOFF2CompressedSize(const uint8_t* data, size_t length);
-size_t MaxWOFF2CompressedSize(const uint8_t* data, size_t length,
- const string& extended_metadata);
-
-// Compresses the font into the target buffer. *result_length should be at least
-// the value returned by MaxWOFF2CompressedSize(), upon return, it is set to the
-// actual compressed size. Returns true on successful compression.
-bool ConvertTTFToWOFF2(const uint8_t *data, size_t length,
- uint8_t *result, size_t *result_length);
-bool ConvertTTFToWOFF2(const uint8_t *data, size_t length,
- uint8_t *result, size_t *result_length,
- const WOFF2Params& params);
-
-} // namespace woff2
-
-#endif // WOFF2_WOFF2_ENC_H_
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_info.cc (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_info.cc 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_info.cc 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,19 +1,11 @@
-// Copyright 2014 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// A commandline tool for dumping info about a woff2 file.
+/* Copyright 2014 Google Inc. All Rights Reserved.
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* A commandline tool for dumping info about a woff2 file. */
+
#include <string>
#include "file.h"
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_out.cc (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_out.cc 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_out.cc 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,21 +1,15 @@
-// Copyright 2014 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Output buffer for WOFF2 decompression.
+/* Copyright 2014 Google Inc. All Rights Reserved.
-#include "./woff2_out.h"
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+/* Output buffer for WOFF2 decompression. */
+
+#include <woff2/output.h>
+
+using std::string;
+
namespace woff2 {
WOFF2StringOut::WOFF2StringOut(string* buf)
Deleted: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_out.h (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_out.h 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/src/woff2_out.h 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,114 +0,0 @@
-// Copyright 2016 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Output buffer for WOFF2 decompression.
-
-// Copyright 2016 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Output buffer for WOFF2 decompression.
-
-#ifndef WOFF2_WOFF2_OUT_H_
-#define WOFF2_WOFF2_OUT_H_
-
-#include <algorithm>
-#include <cstring>
-#include <memory>
-#include <string>
-#include "./port.h"
-
-namespace woff2 {
-
-// Suggested max size for output.
-const size_t kDefaultMaxSize = 30 * 1024 * 1024;
-
-using std::string;
-
-
-/**
- * Output interface for the woff2 decoding.
- *
- * Writes to arbitrary offsets are supported to facilitate updating offset
- * table and checksums after tables are ready. Reading the current size is
- * supported so a 'loca' table can be built up while writing glyphs.
- *
- * By default limits size to kDefaultMaxSize.
- */
-class WOFF2Out {
- public:
- virtual ~WOFF2Out(void) {}
-
- // Append n bytes of data from buf.
- // Return true if all written, false otherwise.
- virtual bool Write(const void *buf, size_t n) = 0;
-
- // Write n bytes of data from buf at offset.
- // Return true if all written, false otherwise.
- virtual bool Write(const void *buf, size_t offset, size_t n) = 0;
-
- virtual size_t Size() = 0;
-};
-
-/**
- * Expanding memory block for woff2 out. By default limited to kDefaultMaxSize.
- */
-class WOFF2StringOut : public WOFF2Out {
- public:
- // Create a writer that writes its data to buf.
- // buf->size() will grow to at most max_size
- // buf may be sized (e.g. using EstimateWOFF2FinalSize) or empty.
- explicit WOFF2StringOut(string* buf);
-
- bool Write(const void *buf, size_t n) override;
- bool Write(const void *buf, size_t offset, size_t n) override;
- size_t Size() override { return offset_; }
- size_t MaxSize() { return max_size_; }
- void SetMaxSize(size_t max_size);
- private:
- string* buf_;
- size_t max_size_;
- size_t offset_;
-};
-
-/**
- * Fixed memory block for woff2 out.
- */
-class WOFF2MemoryOut : public WOFF2Out {
- public:
- // Create a writer that writes its data to buf.
- WOFF2MemoryOut(uint8_t* buf, size_t buf_size);
-
- bool Write(const void *buf, size_t n) override;
- bool Write(const void *buf, size_t offset, size_t n) override;
- size_t Size() override { return offset_; }
- private:
- uint8_t* buf_;
- size_t buf_size_;
- size_t offset_;
-};
-
-} // namespace woff2
-
-#endif // WOFF2_WOFF2_OUT_H_
Modified: releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/update.sh (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/update.sh 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/ThirdParty/woff2/update.sh 2017-10-17 11:35:50 UTC (rev 223517)
@@ -10,8 +10,9 @@
COMMIT=`(cd ${MY_TEMP_DIR}/woff2 && git log | head -n 1)`
perl -p -i -e "s/\[commit [0-9a-f]{40}\]/[${COMMIT}]/" README.webkit;
-rm -rf src
+rm -rf src include
mv ${MY_TEMP_DIR}/woff2/src src
+mv ${MY_TEMP_DIR}/woff2/include include
rm -rf ${MY_TEMP_DIR}
echo "###"
Modified: releases/WebKitGTK/webkit-2.18/Source/WebCore/CMakeLists.txt (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/WebCore/CMakeLists.txt 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/CMakeLists.txt 2017-10-17 11:35:50 UTC (rev 223517)
@@ -3563,7 +3563,7 @@
endif ()
if (USE_WOFF2)
- list(APPEND WebCore_INCLUDE_DIRECTORIES "${THIRDPARTY_DIR}/woff2/src")
+ list(APPEND WebCore_INCLUDE_DIRECTORIES "${THIRDPARTY_DIR}/woff2/include")
list(APPEND WebCore_LIBRARIES woff2)
endif ()
Modified: releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog 2017-10-17 11:35:50 UTC (rev 223517)
@@ -1,3 +1,18 @@
+2017-10-05 Frederic Wang <[email protected]>
+
+ Update Source/ThirdParty/woff2 to 22c256bc457777744ba14b7325a6e8e0e7dec91c
+ https://bugs.webkit.org/show_bug.cgi?id=177994
+
+ Reviewed by Michael Catanzaro.
+
+ No new tests, already covered by existing tests.
+
+ * CMakeLists.txt: Include the directory for public headers instead.
+ * platform/graphics/WOFFFileFormat.cpp: Use the public header
+ woff2/decode.h and do not use the "wOF2" constant from private headers.
+ (WebCore::isWOFF):
+ (WebCore::convertWOFFToSfnt):
+
2017-10-05 Miguel Gomez <[email protected]>
[GTK][WPE] GIFImageDecoder never clears decoded frames even when told to do so
Modified: releases/WebKitGTK/webkit-2.18/Source/WebCore/platform/graphics/WOFFFileFormat.cpp (223516 => 223517)
--- releases/WebKitGTK/webkit-2.18/Source/WebCore/platform/graphics/WOFFFileFormat.cpp 2017-10-17 10:44:45 UTC (rev 223516)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/platform/graphics/WOFFFileFormat.cpp 2017-10-17 11:35:50 UTC (rev 223517)
@@ -31,8 +31,8 @@
#include <wtf/ByteOrder.h>
#if USE(WOFF2)
-#include "woff2_common.h"
-#include "woff2_dec.h"
+#include <woff2/decode.h>
+static const uint32_t kWoff2Signature = 0x774f4632; // "wOF2"
#endif
namespace WebCore {
@@ -84,7 +84,7 @@
return false;
#if USE(WOFF2)
- return signature == woffSignature || signature == woff2::kWoff2Signature;
+ return signature == woffSignature || signature == kWoff2Signature;
#else
return signature == woffSignature;
#endif
@@ -140,7 +140,7 @@
}
#if USE(WOFF2)
- if (signature == woff2::kWoff2Signature) {
+ if (signature == kWoff2Signature) {
const uint8_t* woffData = reinterpret_cast_ptr<const uint8_t*>(woff.data());
const size_t woffSize = woff.size();
const size_t sfntSize = woff2::ComputeWOFF2FinalSize(woffData, woffSize);