[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
commit-queue at webkit.org
commit-queue at webkit.org
Fri Jan 21 15:00:47 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit c9e7da717a0ce0e55478bddd06813e161aec5f31
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jan 6 06:15:21 2011 +0000
2011-01-05 Xianzhu Wang <wangxianzhu at google.com>
Reviewed by David Levin.
Implement RemoteFontStream's skip behavior (in FontCustomPlatformData.cpp)
https://bugs.webkit.org/show_bug.cgi?id=51736
No new tests. This change has potential effect on @font-face CSS feature
on ports using Skia. Tested on Chromium that this change won't break
fast/css/font-face-remote.html. This change can make the test pass on
other ports using Skia.
* platform/graphics/skia/FontCustomPlatformData.cpp:
(WebCore::RemoteFontStream::read):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4049950..31413f4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2011-01-05 Xianzhu Wang <wangxianzhu at google.com>
+
+ Reviewed by David Levin.
+
+ Implement RemoteFontStream's skip behavior (in FontCustomPlatformData.cpp)
+ https://bugs.webkit.org/show_bug.cgi?id=51736
+
+ No new tests. This change has potential effect on @font-face CSS feature
+ on ports using Skia. Tested on Chromium that this change won't break
+ fast/css/font-face-remote.html. This change can make the test pass on
+ other ports using Skia.
+
+ * platform/graphics/skia/FontCustomPlatformData.cpp:
+ (WebCore::RemoteFontStream::read):
+
2011-01-05 Helder Correia <helder at sencha.com>
Reviewed by Simon Fraser.
diff --git a/WebCore/platform/graphics/skia/FontCustomPlatformData.cpp b/WebCore/platform/graphics/skia/FontCustomPlatformData.cpp
index 161fee9..e94c417 100644
--- a/WebCore/platform/graphics/skia/FontCustomPlatformData.cpp
+++ b/WebCore/platform/graphics/skia/FontCustomPlatformData.cpp
@@ -149,18 +149,15 @@ public:
// This is request for the length of the stream.
return m_buffer->size();
}
- if (!buffer) {
- // This is a request to skip bytes. This operation is not supported.
- return 0;
- }
- // This is a request to read bytes.
+ // This is a request to read bytes or skip bytes (when buffer is 0).
if (!m_buffer->data() || !m_buffer->size())
return 0;
size_t left = m_buffer->size() - m_offset;
- size_t toRead = (left > size) ? size : left;
- std::memcpy(buffer, m_buffer->data() + m_offset, toRead);
- m_offset += toRead;
- return toRead;
+ size_t bytesToConsume = std::min(left, size);
+ if (buffer)
+ std::memcpy(buffer, m_buffer->data() + m_offset, bytesToConsume);
+ m_offset += bytesToConsume;
+ return bytesToConsume;
}
private:
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list