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

Side by Side Diff: webkit/api/src/WebNode.cpp

Issue 267003: LTTF: Print the element path in TestWebViewDelegate::decidePolicyForNavigation()... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/api/public/WebFrameClient.h ('k') | webkit/glue/empty_webframeclient.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 }; 42 };
43 43
44 void WebNode::reset() 44 void WebNode::reset()
45 { 45 {
46 assign(0); 46 assign(0);
47 } 47 }
48 48
49 void WebNode::assign(const WebNode& other) 49 void WebNode::assign(const WebNode& other)
50 { 50 {
51 WebNodePrivate* p = const_cast<WebNodePrivate*>(other.m_private); 51 WebNodePrivate* p = const_cast<WebNodePrivate*>(other.m_private);
52 p->ref(); 52 if (p)
53 p->ref();
53 assign(p); 54 assign(p);
54 } 55 }
55 56
56 WebNode WebNode::parentNode() const 57 WebNode WebNode::parentNode() const
57 { 58 {
58 return PassRefPtr<Node>(const_cast<Node*>(m_private->parentNode())); 59 return PassRefPtr<Node>(const_cast<Node*>(m_private->parentNode()));
59 } 60 }
60 61
61 WebString WebNode::nodeName() const 62 WebString WebNode::nodeName() const
62 { 63 {
(...skipping 18 matching lines...) Expand all
81 82
82 void WebNode::assign(WebNodePrivate* p) 83 void WebNode::assign(WebNodePrivate* p)
83 { 84 {
84 // p is already ref'd for us by the caller 85 // p is already ref'd for us by the caller
85 if (m_private) 86 if (m_private)
86 m_private->deref(); 87 m_private->deref();
87 m_private = p; 88 m_private = p;
88 } 89 }
89 90
90 } // namespace WebKit 91 } // namespace WebKit
OLDNEW
« no previous file with comments | « webkit/api/public/WebFrameClient.h ('k') | webkit/glue/empty_webframeclient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698