WebCore:
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Oct 2006 23:03:24 +0000 (23:03 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Oct 2006 23:03:24 +0000 (23:03 +0000)
commite1948876165d409e5df012303f5ea5256ca0834f
tree54410a78dac889c40d818f23bc280d9f3a447658
parenta1c0988eac36a35f18cdb1e0ccb7c281750b8325
WebCore:

        Reviewed by Beth and Adam

        Support for displaying tooltips for bad grammar. Currently this always displays the same tooltip;
        next I'll make it use a string that's relevant for a specific grammar error.

        * WebCore.exp:
        export symbol for spellingToolTip function

        * rendering/HitTestResult.h:
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::spellingToolTip):
        new function, returns the string to be used in a tool tip that describes the questionable grammar

        * rendering/InlineTextBox.h:
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
        now takes a style and font, needed to compute the rect representing the range containing
        questionable grammar. Computes the rect and associates it with the marker.
        (WebCore::InlineTextBox::paintDocumentMarkers):
        Pass in the style and font now needed by paintSpellingOrGrammarMarker

WebKit:

        Reviewed by Beth and Adam

        Display a tooltip when hovering over marked bad grammar.

        * Misc/WebElementDictionary.m:
        (+[WebElementDictionary initializeLookupTable]):
        support spelling tool tip
        (-[WebElementDictionary _spellingToolTip]):
        new method, calls through to HitTestResult

        * WebView/WebHTMLView.m:
        (-[WebHTMLView _updateMouseoverWithEvent:]):
        Check for a spelling tool tip; if found, prefer it over the other possible tool tips.
        Check for empty strings instead of just nil strings being, since values from
        WebElementDictionary are empty strings.

        * WebView/WebViewPrivate.h:
        declare new string constant WebElementSpellingToolTipKey
        * WebView/WebView.mm:
        define new string constant WebElementSpellingToolTipKey

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/WebCore.exp
WebCore/rendering/HitTestResult.cpp
WebCore/rendering/HitTestResult.h
WebCore/rendering/InlineTextBox.cpp
WebCore/rendering/InlineTextBox.h
WebKit/ChangeLog
WebKit/Misc/WebElementDictionary.m
WebKit/WebView/WebHTMLView.m
WebKit/WebView/WebView.mm
WebKit/WebView/WebViewPrivate.h