summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/content/content_detector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/android/content/content_detector.cpp')
-rw-r--r--Source/WebKit/android/content/content_detector.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/WebKit/android/content/content_detector.cpp b/Source/WebKit/android/content/content_detector.cpp
index b29a457..e423207 100644
--- a/Source/WebKit/android/content/content_detector.cpp
+++ b/Source/WebKit/android/content/content_detector.cpp
@@ -39,11 +39,18 @@
#include "public/android/WebDOMTextContentWalker.h"
#include "public/android/WebHitTestInfo.h"
+#include "Document.h"
+#include "Node.h"
+#include "Page.h"
+#include "Settings.h"
+
using WebKit::WebDOMTextContentWalker;
using WebKit::WebRange;
ContentDetector::Result ContentDetector::FindTappedContent(
const WebKit::WebHitTestInfo& hit_test) {
+ if (!IsEnabled(hit_test))
+ return Result();
WebKit::WebRange range = FindContentRange(hit_test);
if (range.isNull())
return Result();
@@ -84,3 +91,9 @@ WebRange ContentDetector::FindContentRange(
return WebRange();
}
+
+WebCore::Settings* ContentDetector::GetSettings(const WebKit::WebHitTestInfo& hit_test) {
+ if (!hit_test.node() || !hit_test.node()->document())
+ return 0;
+ return hit_test.node()->document()->page()->settings();
+}