WebCore:
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Feb 2007 05:03:02 +0000 (05:03 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Feb 2007 05:03:02 +0000 (05:03 +0000)
commit0cdabc80f097683bcb43a89ba6521e454e6cfe78
tree4ce6d6f494062276c0aa6406606273d8923d25b4
parent860ff8280f45a968c929dd738124e671ca0b17c3
WebCore:

        Reviewed by Darin and Anders.

        Fix <rdar://problem/4736215> Make WebCoreStringTruncator use WebCore types

        * WebCore.exp: Updated symbols.
        * WebCore.xcodeproj/project.pbxproj: Updated file names.
        * bridge/mac/WebCoreStringTruncator.h: Removed.
        * bridge/mac/WebCoreStringTruncator.mm: Removed.
        * platform/StringTruncator.cpp: Added. Moved from bridge/mac/WebCoreStringTruncator.mm.
        (WebCore::textBreakAtOrPreceding): Added.
        (WebCore::boundedTextBreakFollowing): Added.
        (WebCore::centerTruncateToBuffer):
        (WebCore::rightTruncateToBuffer):
        (WebCore::stringWidth): Now takes a const Font& instead of a Font*.
        (WebCore::truncateString):
        (WebCore::StringTruncator::centerTruncate):
        (WebCore::StringTruncator::rightTruncate):
        (WebCore::StringTruncator::width):
        * platform/StringTruncator.h: Added.
        * platform/TextBreakIterator.h: Added isTextBreak declaration.
        * platform/TextBreakIteratorICU.cpp:
        (WebCore::isTextBreak): Implemented.
        * platform/mac/FileChooserMac.mm:
        (WebCore::FileChooser::basenameForWidth): Updated for changes to WebCoreStringTruncator.
        * platform/qt/TextBreakIteratorQt.cpp:
        (WebCore::isTextBreak): Stubbed out.

WebKit:

        Reviewed by Darin and Anders.

        Update WebKit for WebCore fix for <rdar://problem/4736215> Make
        WebCoreStringTruncator use WebCore types.

        * Misc/WebStringTruncator.m:
        (defaultMenuFont): Moved from WebCoreStringTruncator.mm.
        (core): Added.
        (+[WebStringTruncator centerTruncateString:toWidth:]):
        (+[WebStringTruncator centerTruncateString:toWidth:withFont:]):
        (+[WebStringTruncator rightTruncateString:toWidth:withFont:]):
        (+[WebStringTruncator widthOfString:font:]):
        * WebKit.xcodeproj/project.pbxproj: Changed WebStringTruncator to ObjC++.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
WebCore/ChangeLog
WebCore/WebCore.exp
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bridge/mac/WebCoreStringTruncator.mm [deleted file]
WebCore/platform/StringTruncator.cpp [new file with mode: 0644]
WebCore/platform/StringTruncator.h [moved from WebCore/bridge/mac/WebCoreStringTruncator.h with 74% similarity]
WebCore/platform/TextBreakIterator.h
WebCore/platform/TextBreakIteratorICU.cpp
WebCore/platform/mac/FileChooserMac.mm
WebCore/platform/qt/TextBreakIteratorQt.cpp
WebKit/ChangeLog
WebKit/Misc/WebStringTruncator.m
WebKit/WebKit.xcodeproj/project.pbxproj