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

Side by Side Diff: Source/web/WebNode.cpp

Issue 1345193004: Add WebNode::isCommentNode(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | public/web/WebNode.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 bool WebNode::isLink() const 184 bool WebNode::isLink() const
185 { 185 {
186 return m_private->isLink(); 186 return m_private->isLink();
187 } 187 }
188 188
189 bool WebNode::isTextNode() const 189 bool WebNode::isTextNode() const
190 { 190 {
191 return m_private->isTextNode(); 191 return m_private->isTextNode();
192 } 192 }
193 193
194 bool WebNode::isCommentNode() const
195 {
196 return m_private->nodeType() == Node::COMMENT_NODE;
197 }
198
194 bool WebNode::isFocusable() const 199 bool WebNode::isFocusable() const
195 { 200 {
196 if (!m_private->isElementNode()) 201 if (!m_private->isElementNode())
197 return false; 202 return false;
198 m_private->document().updateLayoutIgnorePendingStylesheets(); 203 m_private->document().updateLayoutIgnorePendingStylesheets();
199 return toElement(m_private.get())->isFocusable(); 204 return toElement(m_private.get())->isFocusable();
200 } 205 }
201 206
202 bool WebNode::isContentEditable() const 207 bool WebNode::isContentEditable() const
203 { 208 {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 m_private = node; 318 m_private = node;
314 return *this; 319 return *this;
315 } 320 }
316 321
317 WebNode::operator PassRefPtrWillBeRawPtr<Node>() const 322 WebNode::operator PassRefPtrWillBeRawPtr<Node>() const
318 { 323 {
319 return m_private.get(); 324 return m_private.get();
320 } 325 }
321 326
322 } // namespace blink 327 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | public/web/WebNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698