Allow mmap encoded data replacement for WOFF fonts.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Jan 2014 01:59:20 +0000 (01:59 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Jan 2014 01:59:20 +0000 (01:59 +0000)
commit71f7e8bb259c60dad675b33977bda7f73f3d1a20
tree3b23a626616db2dd21d8716a207ce7f3ec3affc3
parent7ea19dbbc21080d7de14341588e47d74a9258612
Allow mmap encoded data replacement for WOFF fonts.
<https://webkit.org/b/127737>

We always have to convert WOFF fonts to SFNT format. This happens
in a separate buffer from the CachedFont's internal resource buffer.
Because of this, there's no need to protect the original buffer from
mmap replacement.

With this change, WOFF web fonts are no longer duplicated between
the network and web processes.

Reviewed by Brady Eidson.

* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::CachedFont):
(WebCore::CachedFont::ensureCustomFontData):
(WebCore::CachedFont::mayTryReplaceEncodedData):
* loader/cache/CachedFont.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/loader/cache/CachedFont.cpp
Source/WebCore/loader/cache/CachedFont.h