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

Side by Side 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, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 bool WebNode::lessThan(const WebNode& n) const 129 bool WebNode::lessThan(const WebNode& n) const
130 { 130 {
131 return m_private.get() < n.m_private.get(); 131 return m_private.get() < n.m_private.get();
132 } 132 }
133 133
134 WebNode WebNode::parentNode() const 134 WebNode WebNode::parentNode() const
135 { 135 {
136 return WebNode(const_cast<ContainerNode*>(m_private->parentNode())); 136 return WebNode(const_cast<ContainerNode*>(m_private->parentNode()));
137 } 137 }
138 138
139 WebString WebNode::nodeName() const
140 {
141 return m_private->nodeName();
142 }
143
139 WebString WebNode::nodeValue() const 144 WebString WebNode::nodeValue() const
140 { 145 {
141 return m_private->nodeValue(); 146 return m_private->nodeValue();
142 } 147 }
143 148
144 WebDocument WebNode::document() const 149 WebDocument WebNode::document() const
145 { 150 {
146 return WebDocument(&m_private->document()); 151 return WebDocument(&m_private->document());
147 } 152 }
148 153
(...skipping 15 matching lines...) Expand all
164 WebNode WebNode::nextSibling() const 169 WebNode WebNode::nextSibling() const
165 { 170 {
166 return WebNode(m_private->nextSibling()); 171 return WebNode(m_private->nextSibling());
167 } 172 }
168 173
169 bool WebNode::hasChildNodes() const 174 bool WebNode::hasChildNodes() const
170 { 175 {
171 return m_private->hasChildren(); 176 return m_private->hasChildren();
172 } 177 }
173 178
174 WebNodeList WebNode::childNodes() 179 WebNodeList WebNode::childNodes() const
175 { 180 {
176 return WebNodeList(m_private->childNodes()); 181 return WebNodeList(m_private->childNodes());
177 } 182 }
178 183
179 bool WebNode::isLink() const 184 bool WebNode::isLink() const
180 { 185 {
181 return m_private->isLink(); 186 return m_private->isLink();
182 } 187 }
183 188
184 bool WebNode::isTextNode() const 189 bool WebNode::isTextNode() const
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 { 322 {
318 m_private = node; 323 m_private = node;
319 return *this; 324 return *this;
320 } 325 }
321 326
322 WebNode::operator PassRefPtrWillBeRawPtr<Node>() const 327 WebNode::operator PassRefPtrWillBeRawPtr<Node>() const
323 { 328 {
324 return m_private.get(); 329 return m_private.get();
325 } 330 }
326 331
332
333 ExportedBoundingBox WebNode::boundingBox() const {
334 ExportedBoundingBox exportedBoundingBox;
335 auto boundingBox = m_private->boundingBox();
336 exportedBoundingBox.minX = boundingBox.x();
337 exportedBoundingBox.minY = boundingBox.y();
338 exportedBoundingBox.maxX = boundingBox.maxX();
339 exportedBoundingBox.maxY = boundingBox.maxY();
340 return exportedBoundingBox;
341 }
342
327 } // namespace blink 343 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698