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

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

Issue 1865813002: Remove RawPtr from Source/web/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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
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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 if (m_private->isContainerNode()) 232 if (m_private->isContainerNode())
233 return WebElementCollection(toContainerNode(m_private.get())->getElement sByTagNameNS(HTMLNames::xhtmlNamespaceURI, tag)); 233 return WebElementCollection(toContainerNode(m_private.get())->getElement sByTagNameNS(HTMLNames::xhtmlNamespaceURI, tag));
234 return WebElementCollection(); 234 return WebElementCollection();
235 } 235 }
236 236
237 WebElement WebNode::querySelector(const WebString& selector, WebExceptionCode& e c) const 237 WebElement WebNode::querySelector(const WebString& selector, WebExceptionCode& e c) const
238 { 238 {
239 if (!m_private->isContainerNode()) 239 if (!m_private->isContainerNode())
240 return WebElement(); 240 return WebElement();
241 TrackExceptionState exceptionState; 241 TrackExceptionState exceptionState;
242 WebElement element = toContainerNode(m_private.get())->querySelector(selecto r, exceptionState); 242 WebElement element = toContainerNode(m_private.get())->querySelector(selecto r, exceptionState).get();
243 ec = exceptionState.code(); 243 ec = exceptionState.code();
244 return element; 244 return element;
245 } 245 }
246 246
247 WebElement WebNode::querySelector(const WebString& selector) const 247 WebElement WebNode::querySelector(const WebString& selector) const
248 { 248 {
249 WebExceptionCode ec = 0; 249 WebExceptionCode ec = 0;
250 WebElement element = querySelector(selector, ec); 250 WebElement element = querySelector(selector, ec);
251 DCHECK(!ec); 251 DCHECK(!ec);
252 return element; 252 return element;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 WebAXObject WebNode::accessibilityObject() 299 WebAXObject WebNode::accessibilityObject()
300 { 300 {
301 WebDocument webDocument = document(); 301 WebDocument webDocument = document();
302 const Document* doc = document().constUnwrap<Document>(); 302 const Document* doc = document().constUnwrap<Document>();
303 AXObjectCacheImpl* cache = toAXObjectCacheImpl(doc->existingAXObjectCache()) ; 303 AXObjectCacheImpl* cache = toAXObjectCacheImpl(doc->existingAXObjectCache()) ;
304 Node* node = unwrap<Node>(); 304 Node* node = unwrap<Node>();
305 return cache ? WebAXObject(cache->get(node)) : WebAXObject(); 305 return cache ? WebAXObject(cache->get(node)) : WebAXObject();
306 } 306 }
307 307
308 WebNode::WebNode(const RawPtr<Node>& node) 308 WebNode::WebNode(Node* node)
309 : m_private(node) 309 : m_private(node)
310 { 310 {
311 } 311 }
312 312
313 WebNode& WebNode::operator=(const RawPtr<Node>& node) 313 WebNode& WebNode::operator=(Node* node)
314 { 314 {
315 m_private = node; 315 m_private = node;
316 return *this; 316 return *this;
317 } 317 }
318 318
319 WebNode::operator RawPtr<Node>() const 319 WebNode::operator Node*() const
320 { 320 {
321 return m_private.get(); 321 return m_private.get();
322 } 322 }
323 323
324 } // namespace blink 324 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebMetaElement.cpp ('k') | third_party/WebKit/Source/web/WebOptionElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698