• rjw's avatar
    WebCore: · b026936c
    rjw authored
            Fixed 3138743, 3138678, and 3138854.  Removed the RenderText
            widths cache, replaced it with a much simply monospace character
            cache.  Should be much faster for covered cases too!  Also fixed
            buffer overrun problem causing the crash in 3138854.
    
            Reviewed by darin.
    
            * khtml/rendering/font.cpp:
            (Font::isFixedPitch):
            * khtml/rendering/font.h:
            * khtml/rendering/render_text.cpp:
            (TextSlave::checkSelectionPoint):
            (RenderText::RenderText):
            (RenderText::setStyle):
            (RenderText::~RenderText):
            (RenderText::shouldUseMonospaceCache):
            (RenderText::cacheWidths):
            (RenderText::widthFromCache):
            (RenderText::trimmedMinMaxWidth):
            (RenderText::calcMinMaxWidth):
            (RenderText::setText):
            (RenderText::width):
            * khtml/rendering/render_text.h:
            * kwq/KWQFont.h:
            * kwq/KWQFont.mm:
            (QFont::isFixedPitch):
            * kwq/WebCoreTextRendererFactory.h:
            * kwq/WebCoreTextRendererFactory.m:
            (-[WebCoreTextRendererFactory isFontFixedPitch:]):
    
    WebKit:
            Support for fixes to 3138743, 3138678.  Added
            isFontFixedPitch used to determine if font is fixed
            pitch.  Makes use of appkit private _isFakeFixedPitch
            (detects courier and monoca).  Updated our fakey test
            to use the appkit's version.
    
            Reviewed by darin.
    
            * WebCoreSupport.subproj/WebTextRenderer.m:
            * WebCoreSupport.subproj/WebTextRendererFactory.m:
            (-[WebTextRendererFactory isFontFixedPitch:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b026936c
render_text.cpp 39.1 KB