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