Reviewed by Maciej
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Nov 2006 02:49:02 +0000 (02:49 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Nov 2006 02:49:02 +0000 (02:49 +0000)
commitca54ea532e6e593304cbdab6595135b68aaf4dfd
tree2ca92d9605f31c667dd661226cf096fbfc6c14e0
parent903f737126ce6a71d10d1e4272b5bc58dd3f45e4
    Reviewed by Maciej

        - fixed <rdar://problem/4804627> ToolTips do not appear for grammar suggestions

        The foundation of this was in my last checkin. This checkin is all about displaying
        the correct string in the toolTip.

        * dom/DocumentMarker.h:
        New description field in this struct.

        * bridge/mac/FrameMac.mm:
        (WebCore::FrameMac::advanceToNextMisspelling):
        When adding a grammar marker, supply the appropriate description. Also, added a comment
        about the remaining work to make grammar checking return sensible answers.
        (WebCore::FrameMac::markMisspellings):
        ditto (yes, still needs some refactoring to minimize duplicated code)

        * dom/Document.h:
        * dom/Document.cpp:
        (WebCore::Document::addMarker):
        Now takes an optional description string
        (WebCore::Document::markerContainingPoint):
        New function, returns a pointer to the (first) marker of the specified type whose rect
        contains the specified point, or 0 if none.

        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::spellingToolTip):
        Replaced hardwired string placeholder implementation with code that uses markerContainingPoint
        and gets the description from the marker.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17508 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/bridge/mac/FrameMac.mm
WebCore/dom/Document.cpp
WebCore/dom/Document.h
WebCore/dom/DocumentMarker.h
WebCore/rendering/HitTestResult.cpp