Title: [88691] trunk/Source/WebCore
Revision
88691
Author
msab...@apple.com
Date
2011-06-13 14:08:34 -0700 (Mon, 13 Jun 2011)

Log Message

2011-06-13  Michael Saboff  <msab...@apple.com>

        Reviewed by Oliver Hunt.

        Additional FontCache::FontCachePurgePreventer instances needed
        https://bugs.webkit.org/show_bug.cgi?id=62498

        Added some needed and speculative FontCachePurgePreventer objects.
        Built and ran Safari with debug version of webkit that purges all
        purgeable fonts in FontCache::purgeInactiveFontDataIfNeeded in order
        to find system fallback fonts access via code paths that aren't
        protected with FontCachePurgePreventer objects.  Also examined
        platform specific code that calls either Font::drawText() or
        Canvas::drawText().  For those methods that may be called from currently
        unprotected paths, added FontCachePurgePreventer objects.

        No new functionality so no new tests.

        * inspector/DOMNodeHighlighter.cpp:
        * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
        (PlatformCALayerWinInternal::displayCallback):
        * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
        (WebCore::CCHeadsUpDisplay::drawHudContents):
        * platform/mac/DragImageMac.mm:
        (WebCore::widthWithFont):
        (WebCore::drawAtPoint):
        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::updateOptionsWidth):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (88690 => 88691)


--- trunk/Source/WebCore/ChangeLog	2011-06-13 20:59:26 UTC (rev 88690)
+++ trunk/Source/WebCore/ChangeLog	2011-06-13 21:08:34 UTC (rev 88691)
@@ -1,3 +1,32 @@
+2011-06-13  Michael Saboff  <msab...@apple.com>
+
+        Reviewed by Oliver Hunt.
+
+        Additional FontCache::FontCachePurgePreventer instances needed
+        https://bugs.webkit.org/show_bug.cgi?id=62498
+
+        Added some needed and speculative FontCachePurgePreventer objects.
+        Built and ran Safari with debug version of webkit that purges all
+        purgeable fonts in FontCache::purgeInactiveFontDataIfNeeded in order
+        to find system fallback fonts access via code paths that aren't
+        protected with FontCachePurgePreventer objects.  Also examined
+        platform specific code that calls either Font::drawText() or
+        Canvas::drawText().  For those methods that may be called from currently
+        unprotected paths, added FontCachePurgePreventer objects.
+
+        No new functionality so no new tests.
+
+        * inspector/DOMNodeHighlighter.cpp:
+        * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
+        (PlatformCALayerWinInternal::displayCallback):
+        * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
+        (WebCore::CCHeadsUpDisplay::drawHudContents):
+        * platform/mac/DragImageMac.mm:
+        (WebCore::widthWithFont):
+        (WebCore::drawAtPoint):
+        * rendering/RenderMenuList.cpp:
+        (WebCore::RenderMenuList::updateOptionsWidth):
+
 2011-06-13  Ryosuke Niwa  <rn...@webkit.org>
 
         Reviewed by Dan Bernstein.

Modified: trunk/Source/WebCore/inspector/DOMNodeHighlighter.cpp (88690 => 88691)


--- trunk/Source/WebCore/inspector/DOMNodeHighlighter.cpp	2011-06-13 20:59:26 UTC (rev 88690)
+++ trunk/Source/WebCore/inspector/DOMNodeHighlighter.cpp	2011-06-13 21:08:34 UTC (rev 88691)
@@ -32,6 +32,7 @@
 #if ENABLE(INSPECTOR)
 
 #include "Element.h"
+#include "FontCache.h"
 #include "Frame.h"
 #include "FrameView.h"
 #include "GraphicsContext.h"
@@ -139,6 +140,7 @@
     static const Color tooltipBackgroundColor(255, 255, 194, 255);
     static const Color tooltipBorderColor(Color::black);
     static const Color tooltipFontColor(Color::black);
+    FontCachePurgePreventer fontCachePurgePreventer;
 
     Element* element = static_cast<Element*>(node);
     bool isXHTML = element->document()->isXHTMLDocument();

Modified: trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp (88690 => 88691)


--- trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp	2011-06-13 20:59:26 UTC (rev 88690)
+++ trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp	2011-06-13 21:08:34 UTC (rev 88691)
@@ -30,6 +30,7 @@
 #include "PlatformCALayerWinInternal.h"
 
 #include "Font.h"
+#include "FontCache.h"
 #include "PlatformCALayer.h"
 #include "TextRun.h"
 #include <QuartzCore/CACFLayer.h>
@@ -93,6 +94,8 @@
 #endif
 
     if (owner()->owner()->platformCALayerShowRepaintCounter()) {
+        FontCachePurgePreventer fontCachePurgePreventer;
+
         String text = String::number(owner()->owner()->platformCALayerIncrementRepaintCount());
 
         CGContextSaveGState(context);

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp (88690 => 88691)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp	2011-06-13 20:59:26 UTC (rev 88690)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp	2011-06-13 21:08:34 UTC (rev 88691)
@@ -29,6 +29,7 @@
 
 #include "Extensions3DChromium.h"
 #include "Font.h"
+#include "FontCache.h"
 #include "FontDescription.h"
 #include "GraphicsContext3D.h"
 #include "LayerChromium.h"
@@ -145,6 +146,8 @@
 
 void CCHeadsUpDisplay::drawHudContents(GraphicsContext* ctx, const IntSize& hudSize)
 {
+    FontCachePurgePreventer fontCachePurgePreventer;
+
     if (m_showPlatformLayerTree) {
         ctx->setFillColor(Color(0, 0, 0, 192), ColorSpaceDeviceRGB);
         ctx->fillRect(FloatRect(0, 0, hudSize.width(), hudSize.height()));

Modified: trunk/Source/WebCore/platform/mac/DragImageMac.mm (88690 => 88691)


--- trunk/Source/WebCore/platform/mac/DragImageMac.mm	2011-06-13 20:59:26 UTC (rev 88690)
+++ trunk/Source/WebCore/platform/mac/DragImageMac.mm	2011-06-13 21:08:34 UTC (rev 88691)
@@ -29,6 +29,7 @@
 #if ENABLE(DRAG_SUPPORT)
 #import "CachedImage.h"
 #import "Font.h"
+#import "FontCache.h"
 #import "FontDescription.h"
 #import "FontSelector.h"
 #import "GraphicsContext.h"
@@ -156,6 +157,8 @@
     [string getCharacters:buffer.data()];
     
     if (canUseFastRenderer(buffer.data(), length)) {
+        FontCachePurgePreventer fontCachePurgePreventer;
+
         Font webCoreFont(FontPlatformData(font, [font pointSize]), ![[NSGraphicsContext currentContext] isDrawingToScreen]);
         TextRun run(buffer.data(), length);
         return webCoreFont.width(run);
@@ -179,6 +182,8 @@
     [string getCharacters:buffer.data()];
     
     if (canUseFastRenderer(buffer.data(), length)) {
+        FontCachePurgePreventer fontCachePurgePreventer;
+
         // The following is a half-assed attempt to match AppKit's rounding rules for drawAtPoint.
         // It's probably incorrect for high DPI.
         // If you change this, be sure to test all the text drawn this way in Safari, including

Modified: trunk/Source/WebCore/rendering/RenderMenuList.cpp (88690 => 88691)


--- trunk/Source/WebCore/rendering/RenderMenuList.cpp	2011-06-13 20:59:26 UTC (rev 88690)
+++ trunk/Source/WebCore/rendering/RenderMenuList.cpp	2011-06-13 21:08:34 UTC (rev 88691)
@@ -29,6 +29,7 @@
 #include "CSSFontSelector.h"
 #include "CSSStyleSelector.h"
 #include "Chrome.h"
+#include "FontCache.h"
 #include "Frame.h"
 #include "FrameView.h"
 #include "HTMLNames.h"
@@ -143,6 +144,8 @@
     float maxOptionWidth = 0;
     const Vector<Element*>& listItems = toSelectElement(static_cast<Element*>(node()))->listItems();
     int size = listItems.size();    
+    FontCachePurgePreventer fontCachePurgePreventer;
+
     for (int i = 0; i < size; ++i) {
         Element* element = listItems[i];
         OptionElement* optionElement = toOptionElement(element);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to