Skip to content
  • rjw's avatar
    Made justified text work correctly in khtml for rendering · 83750876
    rjw authored
            and selection.  Optimized selection point calculation by
            only doing characters measurements once.
    
            * khtml/rendering/font.cpp:
            (Font::floatCharacterWidths):
            * khtml/rendering/font.h:
            * khtml/rendering/render_text.cpp:
            (TextSlave::checkSelectionPoint):
            (RenderText::position):
            * kwq/KWQFontMetrics.mm:
            (QFontMetrics::width):
            (QFontMetrics::floatWidth):
            (QFontMetrics::floatCharacterWidths):
            * kwq/KWQPainter.mm:
            (QPainter::drawText):
            * kwq/WebCoreTextRenderer.h:
            * kwq/qt/qfontmetrics.h:
    
            Adding padding and widths buffer to our canonical measurement
            method.  The padding argument is used to 'pad' measurements in
            that same way that drawing is padded.  The widths parameter
            allows a caller to pass a buffer to get all the individual
            character widths for the run of characters in the string.
    
            * Misc.subproj/WebStringTruncator.m:
            (+[WebStringTruncator rightTruncateString:toWidth:withFont:]):
            (+[WebStringTruncator centerTruncateString:toWidth:withFont:]):
            * WebCoreSupport.subproj/WebTextRenderer.h:
            * WebCoreSupport.subproj/WebTextRenderer.m:
            (-[WebTextRenderer widthForCharacters:length:]):
            (-[WebTextRenderer drawGlyphs:numGlyphs:fromGlyphPosition:toGlyphPosition:atPoint:withPadding:withTextColor:backgroundColor:]):
            (-[WebTextRenderer floatWidthForCharacters:stringLength:characterPosition:]):
            (-[WebTextRenderer floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    83750876