Changeset 222960 in webkit


Ignore:
Timestamp:
Oct 5, 2017 11:32:57 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Update Source/ThirdParty/woff2 to 22c256bc457777744ba14b7325a6e8e0e7dec91c
https://bugs.webkit.org/show_bug.cgi?id=177994

Patch by Frederic Wang <fwang@igalia.com> on 2017-10-05
Reviewed by Michael Catanzaro.

Source/ThirdParty:

  • 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.

Source/WebCore:

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):

Location:
trunk/Source
Files:
2 added
34 edited
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/ThirdParty/ChangeLog

    r222907 r222960  
     12017-10-05  Frederic Wang  <fwang@igalia.com>
     2
     3        Update Source/ThirdParty/woff2 to 22c256bc457777744ba14b7325a6e8e0e7dec91c
     4        https://bugs.webkit.org/show_bug.cgi?id=177994
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        * woff2/CMakeLists.txt: Also consider the directory for public headers.
     9        * woff2/README.webkit:
     10        * woff2/include/woff2/decode.h: Renamed from Source/ThirdParty/woff2/src/woff2_dec.h.
     11        * woff2/include/woff2/encode.h: Renamed from Source/ThirdParty/woff2/src/woff2_enc.h.
     12        (woff2::WOFF2Params::WOFF2Params):
     13        * woff2/include/woff2/output.h: Renamed from Source/ThirdParty/woff2/src/woff2_out.h.
     14        (woff2::WOFF2Out::~WOFF2Out):
     15        (woff2::WOFF2StringOut::MaxSize):
     16        * woff2/src/buffer.h:
     17        * woff2/src/convert_woff2ttf_*.cc:
     18        * woff2/src/file.h:
     19        * woff2/src/font.cc:
     20        * woff2/src/font.h:
     21        * woff2/src/glyph.cc:
     22        * woff2/src/glyph.h:
     23        * woff2/src/normalize.cc:
     24        * woff2/src/normalize.h:
     25        * woff2/src/port.h:
     26        * woff2/src/round.h:
     27        * woff2/src/store_bytes.h:
     28        * woff2/src/table_tags.cc:
     29        * woff2/src/table_tags.h:
     30        * woff2/src/transform.cc:
     31        * woff2/src/transform.h:
     32        * woff2/src/variable_length.cc:
     33        * woff2/src/variable_length.h:
     34        * woff2/src/woff2_common.cc:
     35        * woff2/src/woff2_common.h:
     36        * woff2/src/woff2_compress.cc:
     37        * woff2/src/woff2_dec.cc:
     38        * woff2/src/woff2_decompress.cc:
     39        * woff2/src/woff2_enc.cc:
     40        * woff2/src/woff2_info.cc:
     41        * woff2/src/woff2_out.cc:
     42        * woff2/update.sh: Also consider directory for public headers.
     43
    1442017-10-03  Frederic Wang  <fwang@igalia.com>
    245
  • trunk/Source/ThirdParty/woff2/CMakeLists.txt

    r222907 r222960  
    22
    33set(WOFF2_INCLUDE_DIRECTORIES
     4  "${WOFF2_DIR}/include"
    45  "${WOFF2_DIR}/src"
    56)
  • trunk/Source/ThirdParty/woff2/README.webkit

    r222903 r222960  
    1212from within the modules/woff2 directory.
    1313
    14 Current version: [commit aa283a500aeb655834d77f3cf9cf1b093b0b4389].
     14Current version: [commit 22c256bc457777744ba14b7325a6e8e0e7dec91c].
  • trunk/Source/ThirdParty/woff2/include/woff2/decode.h

    r222959 r222960  
    1 // Copyright 2014 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Library for converting WOFF2 format font files to their TTF versions.
     1/* Copyright 2014 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Library for converting WOFF2 format font files to their TTF versions. */
    168
    179#ifndef WOFF2_WOFF2_DEC_H_
     
    2012#include <stddef.h>
    2113#include <inttypes.h>
    22 #include "./woff2_out.h"
     14#include <woff2/output.h>
    2315
    2416namespace woff2 {
  • trunk/Source/ThirdParty/woff2/include/woff2/encode.h

    r222959 r222960  
    1 // Copyright 2014 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Library for converting WOFF2 format font files to their TTF versions.
     1/* Copyright 2014 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Library for converting WOFF2 format font files to their TTF versions. */
    168
    179#ifndef WOFF2_WOFF2_ENC_H_
     
    2214#include <string>
    2315
    24 using std::string;
    25 
    26 
    2716namespace woff2 {
    2817
     
    3120                  allow_transforms(true) {}
    3221
    33   string extended_metadata;
     22  std::string extended_metadata;
    3423  int brotli_quality;
    3524  bool allow_transforms;
     
    3928size_t MaxWOFF2CompressedSize(const uint8_t* data, size_t length);
    4029size_t MaxWOFF2CompressedSize(const uint8_t* data, size_t length,
    41                               const string& extended_metadata);
     30                              const std::string& extended_metadata);
    4231
    4332// Compresses the font into the target buffer. *result_length should be at least
  • trunk/Source/ThirdParty/woff2/include/woff2/output.h

    r222959 r222960  
    1 // Copyright 2016 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Output buffer for WOFF2 decompression.
     1/* Copyright 2016 Google Inc. All Rights Reserved.
    162
    17 // Copyright 2016 Google Inc. All Rights Reserved.
    18 //
    19 // Licensed under the Apache License, Version 2.0 (the "License");
    20 // you may not use this file except in compliance with the License.
    21 // You may obtain a copy of the License at
    22 //
    23 // http://www.apache.org/licenses/LICENSE-2.0
    24 //
    25 // Unless required by applicable law or agreed to in writing, software
    26 // distributed under the License is distributed on an "AS IS" BASIS,
    27 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    28 // See the License for the specific language governing permissions and
    29 // limitations under the License.
    30 //
    31 // Output buffer for WOFF2 decompression.
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Output buffer for WOFF2 decompression. */
    328
    339#ifndef WOFF2_WOFF2_OUT_H_
     
    3814#include <memory>
    3915#include <string>
    40 #include "./port.h"
    4116
    4217namespace woff2 {
     
    4419// Suggested max size for output.
    4520const size_t kDefaultMaxSize = 30 * 1024 * 1024;
    46 
    47 using std::string;
    48 
    4921
    5022/**
     
    8052  // buf->size() will grow to at most max_size
    8153  // buf may be sized (e.g. using EstimateWOFF2FinalSize) or empty.
    82   explicit WOFF2StringOut(string* buf);
     54  explicit WOFF2StringOut(std::string* buf);
    8355
    8456  bool Write(const void *buf, size_t n) override;
     
    8860  void SetMaxSize(size_t max_size);
    8961 private:
    90   string* buf_;
     62  std::string* buf_;
    9163  size_t max_size_;
    9264  size_t offset_;
  • trunk/Source/ThirdParty/woff2/src/buffer.h

    r222903 r222960  
    1 // Copyright 2013 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // The parts of ots.h & opentype-sanitiser.h that we need, taken from the
    16 // https://code.google.com/p/ots/ project.
     1/* Copyright 2013 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* The parts of ots.h & opentype-sanitiser.h that we need, taken from the
     8   https://code.google.com/p/ots/ project. */
    179
    1810#ifndef WOFF2_BUFFER_H_
  • trunk/Source/ThirdParty/woff2/src/convert_woff2ttf_fuzzer.cc

    r222903 r222960  
    22#include <stdint.h>
    33
    4 #include "woff2_dec.h"
     4#include <woff2/decode.h>
    55
    66// Entry point for LibFuzzer.
  • trunk/Source/ThirdParty/woff2/src/convert_woff2ttf_fuzzer_new_entry.cc

    r222903 r222960  
    11#include <string>
    2 #include "woff2_dec.h"
     2#include <woff2/decode.h>
    33
    44extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t data_size) {
  • trunk/Source/ThirdParty/woff2/src/file.h

    r206511 r222960  
    1 // Copyright 2013 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // File IO helpers.
     1/* Copyright 2013 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* File IO helpers. */
    168
    179#ifndef WOFF2_FILE_H_
  • trunk/Source/ThirdParty/woff2/src/font.cc

    r222903 r222960  
    1 // Copyright 2013 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Font management utilities
     1/* Copyright 2013 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Font management utilities */
    168
    179#include "./font.h"
  • trunk/Source/ThirdParty/woff2/src/font.h

    r206511 r222960  
    1 // Copyright 2013 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Data model for a font file in sfnt format, reading and writing functions and
    16 // accessors for the glyph data.
     1/* Copyright 2013 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Data model for a font file in sfnt format, reading and writing functions and
     8   accessors for the glyph data. */
    179
    1810#ifndef WOFF2_FONT_H_
  • trunk/Source/ThirdParty/woff2/src/glyph.cc

    r222903 r222960  
    1 // Copyright 2013 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Glyph manipulation
     1/* Copyright 2013 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Glyph manipulation */
    168
    179#include "./glyph.h"
  • trunk/Source/ThirdParty/woff2/src/glyph.h

    r197933 r222960  
    1 // Copyright 2013 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Data model and I/O for glyph data within sfnt format files for the purpose of
    16 // performing the preprocessing step of the WOFF 2.0 conversion.
     1/* Copyright 2013 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Data model and I/O for glyph data within sfnt format files for the purpose of
     8   performing the preprocessing step of the WOFF 2.0 conversion. */
    179
    1810#ifndef WOFF2_GLYPH_H_
  • trunk/Source/ThirdParty/woff2/src/normalize.cc

    r222903 r222960  
    1 // Copyright 2013 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Glyph normalization
     1/* Copyright 2013 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Glyph normalization */
    168
    179#include "./normalize.h"
  • trunk/Source/ThirdParty/woff2/src/normalize.h

    r197933 r222960  
    1 // Copyright 2013 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Functions for normalizing fonts. Since the WOFF 2.0 decoder creates font
    16 // files in normalized form, the WOFF 2.0 conversion is guaranteed to be
    17 // lossless (in a bitwise sense) only for normalized font files.
     1/* Copyright 2013 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Functions for normalizing fonts. Since the WOFF 2.0 decoder creates font
     8   files in normalized form, the WOFF 2.0 conversion is guaranteed to be
     9   lossless (in a bitwise sense) only for normalized font files. */
    1810
    1911#ifndef WOFF2_NORMALIZE_H_
  • trunk/Source/ThirdParty/woff2/src/port.h

    r222903 r222960  
    1 // Copyright 2013 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Helper function for bit twiddling and macros for branch prediction.
     1/* Copyright 2013 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Helper function for bit twiddling and macros for branch prediction. */
    168
    179#ifndef WOFF2_PORT_H_
  • trunk/Source/ThirdParty/woff2/src/round.h

    r197933 r222960  
    1 // Copyright 2013 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Helper for rounding
     1/* Copyright 2013 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Helper for rounding */
    168
    179#ifndef WOFF2_ROUND_H_
  • trunk/Source/ThirdParty/woff2/src/store_bytes.h

    r222903 r222960  
    1 // Copyright 2013 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Helper functions for storing integer values into byte streams.
    16 // No bounds checking is performed, that is the responsibility of the caller.
     1/* Copyright 2013 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Helper functions for storing integer values into byte streams.
     8   No bounds checking is performed, that is the responsibility of the caller. */
    179
    1810#ifndef WOFF2_STORE_BYTES_H_
  • trunk/Source/ThirdParty/woff2/src/table_tags.cc

    r197933 r222960  
    1 // Copyright 2014 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Font table tags
     1/* Copyright 2014 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Font table tags */
    168
    179#include "./table_tags.h"
  • trunk/Source/ThirdParty/woff2/src/table_tags.h

    r197933 r222960  
    1 // Copyright 2014 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Font table tags
     1/* Copyright 2014 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Font table tags */
    168
    179#ifndef WOFF2_TABLE_TAGS_H_
  • trunk/Source/ThirdParty/woff2/src/transform.cc

    r206511 r222960  
    1 // Copyright 2013 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Library for preprocessing fonts as part of the WOFF 2.0 conversion.
     1/* Copyright 2013 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Library for preprocessing fonts as part of the WOFF 2.0 conversion. */
    168
    179#include "./transform.h"
  • trunk/Source/ThirdParty/woff2/src/transform.h

    r197933 r222960  
    1 // Copyright 2013 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Library for preprocessing fonts as part of the WOFF 2.0 conversion.
     1/* Copyright 2014 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Library for preprocessing fonts as part of the WOFF 2.0 conversion. */
    168
    179#ifndef WOFF2_TRANSFORM_H_
  • trunk/Source/ThirdParty/woff2/src/variable_length.cc

    r222903 r222960  
    1 // Copyright 2015 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Helper functions for woff2 variable length types: 255UInt16 and UIntBase128
     1/* Copyright 2015 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Helper functions for woff2 variable length types: 255UInt16 and UIntBase128 */
    168
    179#include "./variable_length.h"
  • trunk/Source/ThirdParty/woff2/src/variable_length.h

    r197933 r222960  
    1 // Copyright 2015 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Helper functions for woff2 variable length types: 255UInt16 and UIntBase128
     1/* Copyright 2015 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Helper functions for woff2 variable length types: 255UInt16 and UIntBase128 */
    168
    179#ifndef WOFF2_VARIABLE_LENGTH_H_
  • trunk/Source/ThirdParty/woff2/src/woff2_common.cc

    r222903 r222960  
    1 // Copyright 2013 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Helpers common across multiple parts of woff2
     1/* Copyright 2013 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Helpers common across multiple parts of woff2 */
    168
    179#include <algorithm>
  • trunk/Source/ThirdParty/woff2/src/woff2_common.h

    r197933 r222960  
    1 // Copyright 2014 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Common definition for WOFF2 encoding/decoding
     1/* Copyright 2014 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Common definition for WOFF2 encoding/decoding */
    168
    179#ifndef WOFF2_WOFF2_COMMON_H_
  • trunk/Source/ThirdParty/woff2/src/woff2_compress.cc

    r206511 r222960  
    1 // Copyright 2013 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // A commandline tool for compressing ttf format files to woff2.
     1/* Copyright 2013 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* A commandline tool for compressing ttf format files to woff2. */
    168
    179#include <string>
    1810
    1911#include "file.h"
    20 #include "./woff2_enc.h"
     12#include <woff2/encode.h>
    2113
    2214
  • trunk/Source/ThirdParty/woff2/src/woff2_dec.cc

    r222903 r222960  
    1 // Copyright 2014 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Library for converting WOFF2 format font files to their TTF versions.
    16 
    17 #include "./woff2_dec.h"
     1/* Copyright 2014 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Library for converting WOFF2 format font files to their TTF versions. */
     8
     9#include <woff2/decode.h>
    1810
    1911#include <stdlib.h>
     
    2820#include <utility>
    2921
    30 #include "./brotli/decode.h"
     22#include <brotli/decode.h>
    3123#include "./buffer.h"
    3224#include "./port.h"
  • trunk/Source/ThirdParty/woff2/src/woff2_decompress.cc

    r222903 r222960  
    1 // Copyright 2013 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // A very simple commandline tool for decompressing woff2 format files to true
    16 // type font files.
     1/* Copyright 2013 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* A very simple commandline tool for decompressing woff2 format files to true
     8   type font files. */
    179
    1810#include <string>
    1911
    2012#include "./file.h"
    21 #include "./woff2_dec.h"
     13#include <woff2/decode.h>
    2214
    2315
  • trunk/Source/ThirdParty/woff2/src/woff2_enc.cc

    r222903 r222960  
    1 // Copyright 2014 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Library for converting TTF format font files to their WOFF2 versions.
    16 
    17 #include "./woff2_enc.h"
     1/* Copyright 2014 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Library for converting TTF format font files to their WOFF2 versions. */
     8
     9#include <woff2/encode.h>
    1810
    1911#include <stdlib.h>
     
    2416#include <vector>
    2517
    26 #include "./brotli/encode.h"
     18#include <brotli/encode.h>
    2719#include "./buffer.h"
    2820#include "./font.h"
     
    437429        if (index_by_tag_offset.find(tag_offset) == index_by_tag_offset.end()) {
    438430#ifdef FONT_COMPRESSION_BIN
    439           fprintf(stderr, "Missing table index for offset 0x%08x\n",
     431fprintf(stderr, "Missing table index for offset 0x%08x\n",
    440432                  table_offset);
    441433#endif
  • trunk/Source/ThirdParty/woff2/src/woff2_info.cc

    r222903 r222960  
    1 // Copyright 2014 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // A commandline tool for dumping info about a woff2 file.
     1/* Copyright 2014 Google Inc. All Rights Reserved.
     2
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* A commandline tool for dumping info about a woff2 file. */
    168
    179#include <string>
  • trunk/Source/ThirdParty/woff2/src/woff2_out.cc

    r206511 r222960  
    1 // Copyright 2014 Google Inc. All Rights Reserved.
    2 //
    3 // Licensed under the Apache License, Version 2.0 (the "License");
    4 // you may not use this file except in compliance with the License.
    5 // You may obtain a copy of the License at
    6 //
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 //
    9 // Unless required by applicable law or agreed to in writing, software
    10 // distributed under the License is distributed on an "AS IS" BASIS,
    11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12 // See the License for the specific language governing permissions and
    13 // limitations under the License.
    14 //
    15 // Output buffer for WOFF2 decompression.
     1/* Copyright 2014 Google Inc. All Rights Reserved.
    162
    17 #include "./woff2_out.h"
     3   Distributed under MIT license.
     4   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     5*/
     6
     7/* Output buffer for WOFF2 decompression. */
     8
     9#include <woff2/output.h>
     10
     11using std::string;
    1812
    1913namespace woff2 {
  • trunk/Source/ThirdParty/woff2/update.sh

    r197933 r222960  
    1111perl -p -i -e "s/\[commit [0-9a-f]{40}\]/[${COMMIT}]/" README.webkit;
    1212
    13 rm -rf src
     13rm -rf src include
    1414mv ${MY_TEMP_DIR}/woff2/src src
     15mv ${MY_TEMP_DIR}/woff2/include include
    1516rm -rf ${MY_TEMP_DIR}
    1617
  • trunk/Source/WebCore/CMakeLists.txt

    r222955 r222960  
    36543654
    36553655if (USE_WOFF2)
    3656   list(APPEND WebCore_INCLUDE_DIRECTORIES "${THIRDPARTY_DIR}/woff2/src")
     3656  list(APPEND WebCore_INCLUDE_DIRECTORIES "${THIRDPARTY_DIR}/woff2/include")
    36573657  list(APPEND WebCore_LIBRARIES woff2)
    36583658endif ()
  • trunk/Source/WebCore/ChangeLog

    r222957 r222960  
     12017-10-05  Frederic Wang  <fwang@igalia.com>
     2
     3        Update Source/ThirdParty/woff2 to 22c256bc457777744ba14b7325a6e8e0e7dec91c
     4        https://bugs.webkit.org/show_bug.cgi?id=177994
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        No new tests, already covered by existing tests.
     9
     10        * CMakeLists.txt: Include the directory for public headers instead.
     11        * platform/graphics/WOFFFileFormat.cpp: Use the public header
     12        woff2/decode.h and do not use the "wOF2" constant from private headers.
     13        (WebCore::isWOFF):
     14        (WebCore::convertWOFFToSfnt):
     15
    1162017-10-05  Commit Queue  <commit-queue@webkit.org>
    217
  • trunk/Source/WebCore/platform/graphics/WOFFFileFormat.cpp

    r219702 r222960  
    3232
    3333#if USE(WOFF2)
    34 #include "woff2_common.h"
    35 #include "woff2_dec.h"
     34#include <woff2/decode.h>
     35static const uint32_t kWoff2Signature = 0x774f4632; // "wOF2"
    3636#endif
    3737
     
    8585
    8686#if USE(WOFF2)
    87     return signature == woffSignature || signature == woff2::kWoff2Signature;
     87    return signature == woffSignature || signature == kWoff2Signature;
    8888#else
    8989    return signature == woffSignature;
     
    141141
    142142#if USE(WOFF2)
    143     if (signature == woff2::kWoff2Signature) {
     143    if (signature == kWoff2Signature) {
    144144        const uint8_t* woffData = reinterpret_cast_ptr<const uint8_t*>(woff.data());
    145145        const size_t woffSize = woff.size();
Note: See TracChangeset for help on using the changeset viewer.