summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/HitTestResult.cpp
diff options
context:
space:
mode:
authorFeng Qian <fqian@google.com>2009-06-17 12:12:20 -0700
committerFeng Qian <fqian@google.com>2009-06-17 12:12:20 -0700
commit5f1ab04193ad0130ca8204aadaceae083aca9881 (patch)
tree5a92cd389e2cfe7fb67197ce14b38469462379f8 /WebCore/rendering/HitTestResult.cpp
parent194315e5a908cc8ed67d597010544803eef1ac59 (diff)
downloadexternal_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.zip
external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.gz
external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.bz2
Get WebKit r44544.
Diffstat (limited to 'WebCore/rendering/HitTestResult.cpp')
-rw-r--r--WebCore/rendering/HitTestResult.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/WebCore/rendering/HitTestResult.cpp b/WebCore/rendering/HitTestResult.cpp
index 8126fc7..f2ed7db 100644
--- a/WebCore/rendering/HitTestResult.cpp
+++ b/WebCore/rendering/HitTestResult.cpp
@@ -159,6 +159,20 @@ String HitTestResult::spellingToolTip() const
return marker->description;
}
+String HitTestResult::replacedString() const
+{
+ // Return the replaced string associated with this point, if any. This marker is created when a string is autocorrected,
+ // and is used for generating a contextual menu item that allows it to easily be changed back if desired.
+ if (!m_innerNonSharedNode)
+ return String();
+
+ DocumentMarker* marker = m_innerNonSharedNode->document()->markerContainingPoint(m_point, DocumentMarker::Replacement);
+ if (!marker)
+ return String();
+
+ return marker->description;
+}
+
String HitTestResult::title() const
{
// Find the title in the nearest enclosing DOM node.