Title: [89425] trunk/Source/WebCore
- Revision
- 89425
- Author
- msab...@apple.com
- Date
- 2011-06-22 06:34:59 -0700 (Wed, 22 Jun 2011)
Log Message
2011-06-21 Michael Saboff <msab...@apple.com>
Reviewed by Adam Roben.
REGRESSION (r88260): Assertion failure in FontCache::getCachedFontData when typing in Safari's address field
https://bugs.webkit.org/show_bug.cgi?id=63078
Added FontCachePurgePreventer in WebCore::WebCoreTextFloatWidth to handle
assertion failure when typing in address field on windows. Investigated
other possible code paths that need purge prevention. Added
FontCachePurgeProtection to WebCore::createDragImageForLink and
WebCore::doDrawTextAtPoint.
No change to functionality, therefore no new tests.
* platform/win/DragImageWin.cpp:
(WebCore::createDragImageForLink):
* platform/win/WebCoreTextRenderer.cpp:
(WebCore::doDrawTextAtPoint):
(WebCore::WebCoreTextFloatWidth):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (89424 => 89425)
--- trunk/Source/WebCore/ChangeLog 2011-06-22 12:31:49 UTC (rev 89424)
+++ trunk/Source/WebCore/ChangeLog 2011-06-22 13:34:59 UTC (rev 89425)
@@ -1,3 +1,24 @@
+2011-06-21 Michael Saboff <msab...@apple.com>
+
+ Reviewed by Adam Roben.
+
+ REGRESSION (r88260): Assertion failure in FontCache::getCachedFontData when typing in Safari's address field
+ https://bugs.webkit.org/show_bug.cgi?id=63078
+
+ Added FontCachePurgePreventer in WebCore::WebCoreTextFloatWidth to handle
+ assertion failure when typing in address field on windows. Investigated
+ other possible code paths that need purge prevention. Added
+ FontCachePurgeProtection to WebCore::createDragImageForLink and
+ WebCore::doDrawTextAtPoint.
+
+ No change to functionality, therefore no new tests.
+
+ * platform/win/DragImageWin.cpp:
+ (WebCore::createDragImageForLink):
+ * platform/win/WebCoreTextRenderer.cpp:
+ (WebCore::doDrawTextAtPoint):
+ (WebCore::WebCoreTextFloatWidth):
+
2011-06-22 Darin Adler <da...@apple.com>
Reviewed by Sam Weinig.
Modified: trunk/Source/WebCore/platform/win/DragImageWin.cpp (89424 => 89425)
--- trunk/Source/WebCore/platform/win/DragImageWin.cpp 2011-06-22 12:31:49 UTC (rev 89424)
+++ trunk/Source/WebCore/platform/win/DragImageWin.cpp 2011-06-22 13:34:59 UTC (rev 89425)
@@ -28,6 +28,7 @@
#include "CachedImage.h"
#include "Font.h"
+#include "FontCache.h"
#include "FontDescription.h"
#include "FontSelector.h"
#include "Frame.h"
@@ -130,6 +131,7 @@
const Font* labelFont;
const Font* urlFont;
+ FontCachePurgePreventer fontCachePurgePreventer;
if (frame->settings() && frame->settings()->fontRenderingMode() == AlternateRenderingMode) {
static const Font alternateRenderingModeLabelFont = dragLabelFont(DragLinkLabelFontsize, true, AlternateRenderingMode);
Modified: trunk/Source/WebCore/platform/win/WebCoreTextRenderer.cpp (89424 => 89425)
--- trunk/Source/WebCore/platform/win/WebCoreTextRenderer.cpp 2011-06-22 12:31:49 UTC (rev 89424)
+++ trunk/Source/WebCore/platform/win/WebCoreTextRenderer.cpp 2011-06-22 13:34:59 UTC (rev 89425)
@@ -26,6 +26,7 @@
#include "WebCoreTextRenderer.h"
#include "Font.h"
+#include "FontCache.h"
#include "FontDescription.h"
#include "GraphicsContext.h"
#include "StringTruncator.h"
@@ -48,6 +49,8 @@
static void doDrawTextAtPoint(GraphicsContext& context, const String& text, const IntPoint& point, const Font& font, const Color& color, int underlinedIndex)
{
+ FontCachePurgePreventer fontCachePurgePreventer;
+
TextRun run(text.characters(), text.length());
context.setFillColor(color, ColorSpaceDeviceRGB);
@@ -101,6 +104,8 @@
float WebCoreTextFloatWidth(const String& text, const Font& font)
{
+ FontCachePurgePreventer fontCachePurgePreventer;
+
return StringTruncator::width(text, font);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes