[WPE] Enable WOFF2 support
authoraperez@igalia.com <aperez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Mar 2018 21:56:18 +0000 (21:56 +0000)
committeraperez@igalia.com <aperez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Mar 2018 21:56:18 +0000 (21:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=178158

Reviewed by Frédéric Wang.

.:

* Source/cmake/OptionsWPE.cmake: Add needed logic to detect the Brotli and WOFF2 libraries.

Tools:

* wpe/jhbuild.modules: Add "brotli" and "woff2" to the JHBuild moduleset.

LayoutTests:

* platform/wpe/TestExpectations: Unskip the fast/text/woff2.html and fast/text/woff2-totalsfntsize.html

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229866 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
LayoutTests/ChangeLog
LayoutTests/platform/wpe/TestExpectations
Source/cmake/OptionsWPE.cmake
Tools/ChangeLog
Tools/wpe/jhbuild.modules

index 4538ae0..6fa9870 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2018-03-22  Adrian Perez de Castro  <aperez@igalia.com>
+
+        [WPE] Enable WOFF2 support
+        https://bugs.webkit.org/show_bug.cgi?id=178158
+
+        Reviewed by Frédéric Wang.
+
+        * Source/cmake/OptionsWPE.cmake: Add needed logic to detect the Brotli and WOFF2 libraries.
+
 2018-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK][WPE] Initial implementation of JavaScriptCore glib bindings
index 939203e..5edd0fc 100644 (file)
@@ -1,3 +1,12 @@
+2018-03-22  Adrian Perez de Castro  <aperez@igalia.com>
+
+        [WPE] Enable WOFF2 support
+        https://bugs.webkit.org/show_bug.cgi?id=178158
+
+        Reviewed by Frédéric Wang.
+
+        * platform/wpe/TestExpectations: Unskip the fast/text/woff2.html and fast/text/woff2-totalsfntsize.html
+
 2018-03-21  Antoine Quint  <graouts@apple.com>
 
         [Web Animations] Make imported/mozilla/css-animations/test_event-dispatch.html pass reliably
index 0ab4010..80684bb 100644 (file)
@@ -444,6 +444,8 @@ Bug(WPE) fast/speechsynthesis [ Skip ]
 Bug(WPE) fast/sub-pixel [ Skip ]
 Bug(WPE) fast/table [ Skip ]
 Bug(WPE) fast/text [ Skip ]
+Bug(WPE) fast/text/woff2-totalsfntsize.html [ Pass ]
+Bug(WPE) fast/text/woff2.html [ Pass ]
 Bug(WPE) fast/text-autosizing [ Skip ]
 Bug(WPE) fast/visual-viewport [ Skip ]
 Bug(WPE) fast/writing-mode [ Skip ]
index 9745336..b785d98 100644 (file)
@@ -35,6 +35,11 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SMOOTH_SCROLLING PRIVATE OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TOUCH_EVENTS PRIVATE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL2 PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
 
+# Public options specific to the WPE port. Do not add any options here unless
+# there is a strong reason we should support changing the value of the option,
+# and the option is not relevant to any other WebKit ports.
+WEBKIT_OPTION_DEFINE(USE_WOFF2 "Whether to enable support for WOFF2 Web Fonts." PUBLIC ON)
+
 # Private options specific to the WPE port.
 WEBKIT_OPTION_DEFINE(USE_OPENVR "Whether to use OpenVR as WebVR backend." PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
 
@@ -73,6 +78,13 @@ find_package(WebP REQUIRED)
 find_package(WPEBackend REQUIRED)
 find_package(ZLIB REQUIRED)
 
+if (USE_WOFF2)
+    find_package(WOFF2Dec 1.0.2)
+    if (NOT WOFF2DEC_FOUND)
+        message(FATAL_ERROR "liwoff2dec is needed for USE_WOFF2.")
+    endif ()
+endif ()
+
 if (ENABLE_ACCELERATED_2D_CANVAS)
     find_package(CairoGL 1.10.2 REQUIRED COMPONENTS cairo-egl)
 endif ()
index f4b055d..ef9c25f 100644 (file)
@@ -1,3 +1,12 @@
+2018-03-22  Adrian Perez de Castro  <aperez@igalia.com>
+
+        [WPE] Enable WOFF2 support
+        https://bugs.webkit.org/show_bug.cgi?id=178158
+
+        Reviewed by Frédéric Wang.
+
+        * wpe/jhbuild.modules: Add "brotli" and "woff2" to the JHBuild moduleset.
+
 2018-03-22  Brendan McLoughlin  <brendan@bocoup.com>
 
         Do not export web-platform-test files generated by the wpt importer to assist the webkit test runner
index a4f0d20..0f8bfea 100644 (file)
@@ -7,6 +7,7 @@
 
   <metamodule id="webkitwpe-testing-dependencies">
     <dependencies>
+      <dep package="brotli"/>
       <dep package="glib"/>
       <dep package="libsoup"/>
       <dep package="cairo"/>
@@ -17,6 +18,7 @@
       <dep package="harfbuzz"/>
       <dep package="xkbcommon"/>
       <dep package="webkit-gstreamer-testing-dependencies"/>
+      <dep package="woff2"/>
       <dep package="wpe"/>
       <dep package="wpe-mesa"/>
       <dep package="libgpg-error"/>
   <repository type="tarball" name="gnupg.org"
       href="https://www.gnupg.org/ftp/gcrypt/"/>
 
+  <cmake id="brotli">
+    <branch repo="github.com" module="google/brotli.git" checkoutdir="brotli" tag="v1.0.1"/>
+  </cmake>
+
+  <cmake id="woff2">
+    <branch repo="github.com" module="google/woff2.git" checkoutdir="woff2" tag="v1.0.2"/>
+    <dependencies>
+      <dep package="brotli"/>
+    </dependencies>
+  </cmake>
+
   <autotools id="libffi" autogen-sh="configure">
     <branch module="libffi/libffi-3.0.10.tar.gz" version="3.0.10"
              repo="sourceware.org-mirror"