Changeset 88691 in webkit


Ignore:
Timestamp:
Jun 13, 2011 2:08:34 PM (13 years ago)
Author:
msaboff@apple.com
Message:

2011-06-13 Michael Saboff <msaboff@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):
Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r88685 r88691  
     12011-06-13  Michael Saboff  <msaboff@apple.com>
     2
     3        Reviewed by Oliver Hunt.
     4
     5        Additional FontCache::FontCachePurgePreventer instances needed
     6        https://bugs.webkit.org/show_bug.cgi?id=62498
     7
     8        Added some needed and speculative FontCachePurgePreventer objects.
     9        Built and ran Safari with debug version of webkit that purges all
     10        purgeable fonts in FontCache::purgeInactiveFontDataIfNeeded in order
     11        to find system fallback fonts access via code paths that aren't
     12        protected with FontCachePurgePreventer objects.  Also examined
     13        platform specific code that calls either Font::drawText() or
     14        Canvas::drawText().  For those methods that may be called from currently
     15        unprotected paths, added FontCachePurgePreventer objects.
     16
     17        No new functionality so no new tests.
     18
     19        * inspector/DOMNodeHighlighter.cpp:
     20        * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
     21        (PlatformCALayerWinInternal::displayCallback):
     22        * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
     23        (WebCore::CCHeadsUpDisplay::drawHudContents):
     24        * platform/mac/DragImageMac.mm:
     25        (WebCore::widthWithFont):
     26        (WebCore::drawAtPoint):
     27        * rendering/RenderMenuList.cpp:
     28        (WebCore::RenderMenuList::updateOptionsWidth):
     29
    1302011-06-13  Ryosuke Niwa  <rniwa@webkit.org>
    231
  • trunk/Source/WebCore/inspector/DOMNodeHighlighter.cpp

    r84481 r88691  
    3333
    3434#include "Element.h"
     35#include "FontCache.h"
    3536#include "Frame.h"
    3637#include "FrameView.h"
     
    140141    static const Color tooltipBorderColor(Color::black);
    141142    static const Color tooltipFontColor(Color::black);
     143    FontCachePurgePreventer fontCachePurgePreventer;
    142144
    143145    Element* element = static_cast<Element*>(node);
  • trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp

    r76170 r88691  
    3131
    3232#include "Font.h"
     33#include "FontCache.h"
    3334#include "PlatformCALayer.h"
    3435#include "TextRun.h"
     
    9495
    9596    if (owner()->owner()->platformCALayerShowRepaintCounter()) {
     97        FontCachePurgePreventer fontCachePurgePreventer;
     98
    9699        String text = String::number(owner()->owner()->platformCALayerIncrementRepaintCount());
    97100
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp

    r87960 r88691  
    3030#include "Extensions3DChromium.h"
    3131#include "Font.h"
     32#include "FontCache.h"
    3233#include "FontDescription.h"
    3334#include "GraphicsContext3D.h"
     
    146147void CCHeadsUpDisplay::drawHudContents(GraphicsContext* ctx, const IntSize& hudSize)
    147148{
     149    FontCachePurgePreventer fontCachePurgePreventer;
     150
    148151    if (m_showPlatformLayerTree) {
    149152        ctx->setFillColor(Color(0, 0, 0, 192), ColorSpaceDeviceRGB);
  • trunk/Source/WebCore/platform/mac/DragImageMac.mm

    r78846 r88691  
    3030#import "CachedImage.h"
    3131#import "Font.h"
     32#import "FontCache.h"
    3233#import "FontDescription.h"
    3334#import "FontSelector.h"
     
    157158   
    158159    if (canUseFastRenderer(buffer.data(), length)) {
     160        FontCachePurgePreventer fontCachePurgePreventer;
     161
    159162        Font webCoreFont(FontPlatformData(font, [font pointSize]), ![[NSGraphicsContext currentContext] isDrawingToScreen]);
    160163        TextRun run(buffer.data(), length);
     
    180183   
    181184    if (canUseFastRenderer(buffer.data(), length)) {
     185        FontCachePurgePreventer fontCachePurgePreventer;
     186
    182187        // The following is a half-assed attempt to match AppKit's rounding rules for drawAtPoint.
    183188        // It's probably incorrect for high DPI.
  • trunk/Source/WebCore/rendering/RenderMenuList.cpp

    r87443 r88691  
    3030#include "CSSStyleSelector.h"
    3131#include "Chrome.h"
     32#include "FontCache.h"
    3233#include "Frame.h"
    3334#include "FrameView.h"
     
    144145    const Vector<Element*>& listItems = toSelectElement(static_cast<Element*>(node()))->listItems();
    145146    int size = listItems.size();   
     147    FontCachePurgePreventer fontCachePurgePreventer;
     148
    146149    for (int i = 0; i < size; ++i) {
    147150        Element* element = listItems[i];
Note: See TracChangeset for help on using the changeset viewer.