Changeset 147020 in webkit
- Timestamp:
- Mar 27, 2013 4:57:50 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r147019 r147020 1 2013-03-27 Pierre Rossi <pierre.rossi@gmail.com> 2 3 [Qt] Add WOFF support when using zlib 4 https://bugs.webkit.org/show_bug.cgi?id=112805 5 6 Reviewed by Allan Sandfeld Jensen. 7 8 * platform/qt-5.0-wk2/TestExpectations: keep skipped for WK2 due to a WTR bug. 9 * platform/qt/TestExpectations: unskip font-face-woff.html 10 1 11 2013-03-27 Robert Hogan <robert@webkit.org> 2 12 -
trunk/LayoutTests/platform/qt-5.0-wk2/TestExpectations
r146194 r147020 147 147 webkit.org/b/108646 compositing/layer-creation/fixed-position-no-content.html [ Skip ] 148 148 149 # [Qt][WK2] WTR doesn't dump pixels in a way that's consistent with other ports 150 webkit.org/b/113320 fast/css/font-face-woff.html [ Skip ] 149 151 ######################################## 150 152 -
trunk/LayoutTests/platform/qt/TestExpectations
r147001 r147020 227 227 userscripts 228 228 plugins/plugin-document-load-prevented-userscript.html 229 230 # ------ Doesn't support WOFF yet.231 fast/css/font-face-woff.html232 229 233 230 # Need to implement getFormValue(). -
trunk/Source/WebCore/ChangeLog
r147019 r147020 1 2013-03-27 Pierre Rossi <pierre.rossi@gmail.com> 2 3 [Qt] Add WOFF support when using zlib 4 https://bugs.webkit.org/show_bug.cgi?id=112805 5 6 Reviewed by Allan Sandfeld Jensen. 7 8 Covered by existing test: 9 fast/css/font-face-woff.html 10 11 * Target.pri: Conditional inclusion of WOFFFileFormat 12 * platform/graphics/qt/FontCustomPlatformDataQt.cpp: 13 (WebCore::createFontCustomPlatformData): Try to unpack WOFF data, otherwise spit out a warning and bail. 14 (WebCore::FontCustomPlatformData::supportsFormat): accept WOFF webfonts if USE(ZLIB). 15 1 16 2013-03-27 Robert Hogan <robert@webkit.org> 2 17 -
trunk/Source/WebCore/Target.pri
r146908 r147020 4230 4230 } 4231 4231 4232 use?(ZLIB) { 4233 HEADERS += platform/graphics/WOFFFileFormat.h 4234 SOURCES += platform/graphics/WOFFFileFormat.cpp 4235 } 4236 4232 4237 !have?(sqlite3):exists($${SQLITE3SRCDIR}/sqlite3.c) { 4233 4238 # Build sqlite3 into WebCore from source -
trunk/Source/WebCore/platform/graphics/qt/FontCustomPlatformDataQt.cpp
r136520 r147020 25 25 #include "FontPlatformData.h" 26 26 #include "SharedBuffer.h" 27 #if USE(ZLIB) 28 #include "WOFFFileFormat.h" 29 #endif 27 30 #include <QStringList> 28 31 … … 40 43 ASSERT_ARG(buffer, buffer); 41 44 45 #if USE(ZLIB) 46 RefPtr<SharedBuffer> sfntBuffer; 47 if (isWOFF(buffer)) { 48 Vector<char> sfnt; 49 if (!convertWOFFToSfnt(buffer, sfnt)) 50 return 0; 51 52 sfntBuffer = SharedBuffer::adoptVector(sfnt); 53 buffer = sfntBuffer.get(); 54 } 55 #endif // USE(ZLIB) 56 42 57 const QByteArray fontData(buffer->data(), buffer->size()); 58 #if !USE(ZLIB) 59 if (fontData.startsWith("wOFF")) { 60 qWarning("WOFF support requires QtWebKit to be built with zlib support."); 61 return 0; 62 } 63 #endif // !USE(ZLIB) 43 64 // Pixel size doesn't matter at this point, it is set in FontCustomPlatformData::fontPlatformData. 44 65 QRawFont rawFont(fontData, /*pixelSize = */0, QFont::PreferDefaultHinting); … … 53 74 bool FontCustomPlatformData::supportsFormat(const String& format) 54 75 { 55 return equalIgnoringCase(format, "truetype") || equalIgnoringCase(format, "opentype"); 76 return equalIgnoringCase(format, "truetype") || equalIgnoringCase(format, "opentype") 77 #if USE(ZLIB) 78 || equalIgnoringCase(format, "woff") 79 #endif 80 ; 56 81 } 57 82
Note: See TracChangeset
for help on using the changeset viewer.