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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 WebElement element = querySelector(selector, ec); 251 WebElement element = querySelector(selector, ec);
252 ASSERT(!ec); 252 ASSERT(!ec);
253 return element; 253 return element;
254 } 254 }
255 255
256 void WebNode::querySelectorAll(const WebString& selector, WebVector<WebElement>& results, WebExceptionCode& ec) const 256 void WebNode::querySelectorAll(const WebString& selector, WebVector<WebElement>& results, WebExceptionCode& ec) const
257 { 257 {
258 if (!m_private->isContainerNode()) 258 if (!m_private->isContainerNode())
259 return; 259 return;
260 TrackExceptionState exceptionState; 260 TrackExceptionState exceptionState;
261 RefPtrWillBeRawPtr<StaticElementList> elements = toContainerNode(m_private.g et())->querySelectorAll(selector, exceptionState); 261 RawPtr<StaticElementList> elements = toContainerNode(m_private.get())->query SelectorAll(selector, exceptionState);
262 ec = exceptionState.code(); 262 ec = exceptionState.code();
263 if (exceptionState.hadException()) 263 if (exceptionState.hadException())
264 return; 264 return;
265 Vector<WebElement> temp; 265 Vector<WebElement> temp;
266 temp.reserveCapacity(elements->length()); 266 temp.reserveCapacity(elements->length());
267 for (unsigned i = 0; i < elements->length(); ++i) 267 for (unsigned i = 0; i < elements->length(); ++i)
268 temp.append(WebElement(elements->item(i))); 268 temp.append(WebElement(elements->item(i)));
269 results.assign(temp); 269 results.assign(temp);
270 } 270 }
271 271
(...skipping 27 matching lines...) Expand all
299 299
300 WebAXObject WebNode::accessibilityObject() 300 WebAXObject WebNode::accessibilityObject()
301 { 301 {
302 WebDocument webDocument = document(); 302 WebDocument webDocument = document();
303 const Document* doc = document().constUnwrap<Document>(); 303 const Document* doc = document().constUnwrap<Document>();
304 AXObjectCacheImpl* cache = toAXObjectCacheImpl(doc->existingAXObjectCache()) ; 304 AXObjectCacheImpl* cache = toAXObjectCacheImpl(doc->existingAXObjectCache()) ;
305 Node* node = unwrap<Node>(); 305 Node* node = unwrap<Node>();
306 return cache ? WebAXObject(cache->get(node)) : WebAXObject(); 306 return cache ? WebAXObject(cache->get(node)) : WebAXObject();
307 } 307 }
308 308
309 WebNode::WebNode(const PassRefPtrWillBeRawPtr<Node>& node) 309 WebNode::WebNode(const RawPtr<Node>& node)
310 : m_private(node) 310 : m_private(node)
311 { 311 {
312 } 312 }
313 313
314 WebNode& WebNode::operator=(const PassRefPtrWillBeRawPtr<Node>& node) 314 WebNode& WebNode::operator=(const RawPtr<Node>& node)
315 { 315 {
316 m_private = node; 316 m_private = node;
317 return *this; 317 return *this;
318 } 318 }
319 319
320 WebNode::operator PassRefPtrWillBeRawPtr<Node>() const 320 WebNode::operator RawPtr<Node>() const
321 { 321 {
322 return m_private.get(); 322 return m_private.get();
323 } 323 }
324 324
325 } // namespace blink 325 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698