summaryrefslogtreecommitdiff
path: root/Source/WebKit2/Shared/WebRenderObject.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebKit2/Shared/WebRenderObject.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebKit2/Shared/WebRenderObject.h')
-rw-r--r--Source/WebKit2/Shared/WebRenderObject.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/Source/WebKit2/Shared/WebRenderObject.h b/Source/WebKit2/Shared/WebRenderObject.h
index deb208779..fc2558231 100644
--- a/Source/WebKit2/Shared/WebRenderObject.h
+++ b/Source/WebKit2/Shared/WebRenderObject.h
@@ -45,19 +45,24 @@ class WebPage;
class WebRenderObject : public API::ObjectImpl<API::Object::Type::RenderObject> {
public:
- static PassRefPtr<WebRenderObject> create(WebPage*);
- static PassRefPtr<WebRenderObject> create(WebCore::RenderObject* renderer)
+ static RefPtr<WebRenderObject> create(WebPage*);
+ static Ref<WebRenderObject> create(WebCore::RenderObject* renderer)
{
- return adoptRef(new WebRenderObject(renderer, false));
+ return adoptRef(*new WebRenderObject(renderer, false));
}
- static PassRefPtr<WebRenderObject> create(const String& name, const String& elementTagName, const String& elementID, PassRefPtr<API::Array> elementClassNames, WebCore::IntPoint absolutePosition, WebCore::IntRect frameRect, PassRefPtr<API::Array> children);
+ static PassRefPtr<WebRenderObject> create(const String& name, const String& elementTagName, const String& elementID, PassRefPtr<API::Array> elementClassNames, WebCore::IntPoint absolutePosition, WebCore::IntRect frameRect, const String& textSnippet, unsigned textLength, PassRefPtr<API::Array> children);
virtual ~WebRenderObject();
API::Array* children() const { return m_children.get(); }
const String& name() const { return m_name; }
+
+ // Only non-empty for RenderText objects.
+ const String& textSnippet() const { return m_textSnippet; }
+ unsigned textLength() const { return m_textLength; }
+
const String& elementTagName() const { return m_elementTagName; }
const String& elementID() const { return m_elementID; }
API::Array* elementClassNames() const { return m_elementClassNames.get(); }
@@ -66,16 +71,18 @@ public:
private:
WebRenderObject(WebCore::RenderObject*, bool shouldIncludeDescendants);
- WebRenderObject(const String& name, const String& elementTagName, const String& elementID, PassRefPtr<API::Array> elementClassNames, WebCore::IntPoint absolutePosition, WebCore::IntRect frameRect, PassRefPtr<API::Array> children);
+ WebRenderObject(const String& name, const String& elementTagName, const String& elementID, PassRefPtr<API::Array> elementClassNames, WebCore::IntPoint absolutePosition, WebCore::IntRect frameRect, const String& textSnippet, unsigned textLength, PassRefPtr<API::Array> children);
RefPtr<API::Array> m_children;
String m_name;
String m_elementTagName;
String m_elementID;
+ String m_textSnippet;
RefPtr<API::Array> m_elementClassNames;
WebCore::IntPoint m_absolutePosition;
WebCore::IntRect m_frameRect;
+ unsigned m_textLength;
};
} // namespace WebKit