summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebCore/platform/graphics/android/PatternAndroid.cpp2
-rw-r--r--WebKit/android/plugins/android_npapi.h8
2 files changed, 9 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/android/PatternAndroid.cpp b/WebCore/platform/graphics/android/PatternAndroid.cpp
index ff2b522..a787113 100644
--- a/WebCore/platform/graphics/android/PatternAndroid.cpp
+++ b/WebCore/platform/graphics/android/PatternAndroid.cpp
@@ -43,6 +43,8 @@ static SkShader::TileMode toTileMode(bool doRepeat) {
SkShader* Pattern::createPlatformPattern(const TransformationMatrix& ) const
{
SkBitmapRef* ref = tileImage()->nativeImageForCurrentFrame();
+ if (!ref)
+ return 0;
SkShader* s = SkShader::CreateBitmapShader(ref->bitmap(),
toTileMode(m_repeatX),
toTileMode(m_repeatY));
diff --git a/WebKit/android/plugins/android_npapi.h b/WebKit/android/plugins/android_npapi.h
index 1c7655b..37c8ed3 100644
--- a/WebKit/android/plugins/android_npapi.h
+++ b/WebKit/android/plugins/android_npapi.h
@@ -429,6 +429,10 @@ struct ANPTypefaceInterfaceV0 : ANPInterface {
requested name and style. Pass null as the name to return
the default font for the requested style. Will never return null
+ The 5 generic font names "serif", "sans-serif", "monospace", "cursive",
+ "fantasy" are recognized, and will be mapped to their logical font
+ automatically by this call.
+
@param name May be NULL. The name of the font family.
@param style The style (normal, bold, italic) of the typeface.
@return reference to the closest-matching typeface. Caller must call
@@ -497,7 +501,9 @@ struct ANPTypefaceInterfaceV0 : ANPInterface {
int32_t (*getFontPath)(const ANPTypeface*, char path[], int32_t length,
int32_t* index);
- /** Return the path name for the font directory, or NULL if not supported
+ /** Return a UTF8 encoded path name for the font directory, or NULL if not
+ supported. If returned, this string address will be valid for the life
+ of the plugin instance. It will always end with a '/' character.
*/
const char* (*getFontDirectoryPath)();
};