Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: third_party/WebKit/Source/web/WebNode.cpp

Issue 1430673002: Headless demo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebNode.cpp
diff --git a/third_party/WebKit/Source/web/WebNode.cpp b/third_party/WebKit/Source/web/WebNode.cpp
index ba4cbbfa669e75367c9bd0b2c5a061be8225601f..02a0cc47c92fb20f15bfe89852dce1218dfa8690 100644
--- a/third_party/WebKit/Source/web/WebNode.cpp
+++ b/third_party/WebKit/Source/web/WebNode.cpp
@@ -136,6 +136,11 @@ WebNode WebNode::parentNode() const
return WebNode(const_cast<ContainerNode*>(m_private->parentNode()));
}
+WebString WebNode::nodeName() const
+{
+ return m_private->nodeName();
+}
+
WebString WebNode::nodeValue() const
{
return m_private->nodeValue();
@@ -171,7 +176,7 @@ bool WebNode::hasChildNodes() const
return m_private->hasChildren();
}
-WebNodeList WebNode::childNodes()
+WebNodeList WebNode::childNodes() const
{
return WebNodeList(m_private->childNodes());
}
@@ -324,4 +329,15 @@ WebNode::operator PassRefPtrWillBeRawPtr<Node>() const
return m_private.get();
}
+
+ExportedBoundingBox WebNode::boundingBox() const {
+ ExportedBoundingBox exportedBoundingBox;
+ auto boundingBox = m_private->boundingBox();
+ exportedBoundingBox.minX = boundingBox.x();
+ exportedBoundingBox.minY = boundingBox.y();
+ exportedBoundingBox.maxX = boundingBox.maxX();
+ exportedBoundingBox.maxY = boundingBox.maxY();
+ return exportedBoundingBox;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698