Title: [102255] trunk/Source/WebCore
- Revision
- 102255
- Author
- [email protected]
- Date
- 2011-12-07 11:21:45 -0800 (Wed, 07 Dec 2011)
Log Message
In FontCacheAndroid.cpp should keep the pointer valid returned from CString::data()
https://bugs.webkit.org/show_bug.cgi?id=73849
The changed code has been covered by many existing layout tests.
Reviewed by Adam Barth.
* platform/graphics/chromium/FontCacheAndroid.cpp:
(WebCore::FontCache::createFontPlatformData):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (102254 => 102255)
--- trunk/Source/WebCore/ChangeLog 2011-12-07 19:19:31 UTC (rev 102254)
+++ trunk/Source/WebCore/ChangeLog 2011-12-07 19:21:45 UTC (rev 102255)
@@ -1,3 +1,15 @@
+2011-12-07 Xianzhu Wang <[email protected]>
+
+ In FontCacheAndroid.cpp should keep the pointer valid returned from CString::data()
+ https://bugs.webkit.org/show_bug.cgi?id=73849
+
+ The changed code has been covered by many existing layout tests.
+
+ Reviewed by Adam Barth.
+
+ * platform/graphics/chromium/FontCacheAndroid.cpp:
+ (WebCore::FontCache::createFontPlatformData):
+
2011-12-07 Xiaomei Ji <[email protected]>
Turn on move caret by word visually for Windows platform.
Modified: trunk/Source/WebCore/platform/graphics/chromium/FontCacheAndroid.cpp (102254 => 102255)
--- trunk/Source/WebCore/platform/graphics/chromium/FontCacheAndroid.cpp 2011-12-07 19:19:31 UTC (rev 102254)
+++ trunk/Source/WebCore/platform/graphics/chromium/FontCacheAndroid.cpp 2011-12-07 19:21:45 UTC (rev 102255)
@@ -147,13 +147,16 @@
FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomicString& family)
{
const char* name = 0;
+ CString nameString; // Keeps name valid within scope of this function in case that name is from a family.
// If a fallback font is being created (e.g. "-webkit-monospace"), convert
// it in to the fallback name (e.g. "monospace").
if (!family.length() || family.startsWith("-webkit-"))
name = getFallbackFontName(fontDescription);
- else
- name = family.string().utf8().data();
+ else {
+ nameString = family.string().utf8();
+ name = nameString.data();
+ }
int style = SkTypeface::kNormal;
if (fontDescription.weight() >= FontWeightBold)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes