summaryrefslogtreecommitdiff
path: root/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.mm
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.mm')
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.mm11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.mm b/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.mm
index a3296bfc0..5b86f746d 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.mm
+++ b/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.mm
@@ -30,6 +30,7 @@
#import "WKDOMNode.h"
#import "WKDOMInternals.h"
+#import <WebCore/Document.h>
@implementation WKDOMNode
@@ -102,6 +103,16 @@
return WebKit::toWKDOMNode(_impl->nextSibling());
}
+- (NSArray *)textRects
+{
+ _impl->document()->updateLayoutIgnorePendingStylesheets();
+ if (!_impl->renderer())
+ return nil;
+ Vector<WebCore::IntRect> rects;
+ _impl->textRects(rects);
+ return WebKit::toNSArray(rects);
+}
+
@end
#endif // defined(__LP64__) && defined(__clang__)