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

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

Issue 270573008: Oilpan: Prepare to support garbage-collected Node in WebNode hierarchy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add FIXME comments Created 6 years, 7 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 | « Source/web/ChromeClientImpl.cpp ('k') | Source/web/WebDocumentType.cpp » ('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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 247 }
248 248
249 WebReferrerPolicy WebDocument::referrerPolicy() const 249 WebReferrerPolicy WebDocument::referrerPolicy() const
250 { 250 {
251 return static_cast<WebReferrerPolicy>(constUnwrap<Document>()->referrerPolic y()); 251 return static_cast<WebReferrerPolicy>(constUnwrap<Document>()->referrerPolic y());
252 } 252 }
253 253
254 WebElement WebDocument::createElement(const WebString& tagName) 254 WebElement WebDocument::createElement(const WebString& tagName)
255 { 255 {
256 TrackExceptionState exceptionState; 256 TrackExceptionState exceptionState;
257 #if ENABLE(OILPAN)
258 // FIXME: Document::createElement should return a raw pointer.
259 WebElement element(unwrap<Document>()->createElement(tagName, exceptionState ).get());
260 #else
257 WebElement element(unwrap<Document>()->createElement(tagName, exceptionState )); 261 WebElement element(unwrap<Document>()->createElement(tagName, exceptionState ));
262 #endif
258 if (exceptionState.hadException()) 263 if (exceptionState.hadException())
259 return WebElement(); 264 return WebElement();
260 return element; 265 return element;
261 } 266 }
262 267
263 WebAXObject WebDocument::accessibilityObject() const 268 WebAXObject WebDocument::accessibilityObject() const
264 { 269 {
265 const Document* document = constUnwrap<Document>(); 270 const Document* document = constUnwrap<Document>();
266 return WebAXObject(document->axObjectCache()->getOrCreate(document->renderer ())); 271 return WebAXObject(document->axObjectCache()->getOrCreate(document->renderer ()));
267 } 272 }
(...skipping 26 matching lines...) Expand all
294 Document* document = unwrap<Document>(); 299 Document* document = unwrap<Document>();
295 Dictionary dictionary(options, isolate); 300 Dictionary dictionary(options, isolate);
296 TrackExceptionState exceptionState; 301 TrackExceptionState exceptionState;
297 ScriptValue constructor = document->registerElement(ScriptState::current(iso late), name, dictionary, exceptionState, CustomElement::EmbedderNames); 302 ScriptValue constructor = document->registerElement(ScriptState::current(iso late), name, dictionary, exceptionState, CustomElement::EmbedderNames);
298 ec = exceptionState.code(); 303 ec = exceptionState.code();
299 if (exceptionState.hadException()) 304 if (exceptionState.hadException())
300 return v8::Handle<v8::Value>(); 305 return v8::Handle<v8::Value>();
301 return constructor.v8Value(); 306 return constructor.v8Value();
302 } 307 }
303 308
304 WebDocument::WebDocument(const PassRefPtr<Document>& elem) 309 WebDocument::WebDocument(const PassRefPtrWillBeRawPtr<Document>& elem)
305 : WebNode(elem) 310 : WebNode(elem)
306 { 311 {
307 } 312 }
308 313
309 WebDocument& WebDocument::operator=(const PassRefPtr<Document>& elem) 314 WebDocument& WebDocument::operator=(const PassRefPtrWillBeRawPtr<Document>& elem )
310 { 315 {
311 m_private = elem; 316 m_private = elem;
312 return *this; 317 return *this;
313 } 318 }
314 319
315 WebDocument::operator PassRefPtr<Document>() const 320 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const
316 { 321 {
317 return toDocument(m_private.get()); 322 return toDocument(m_private.get());
318 } 323 }
319 324
320 } // namespace blink 325 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/ChromeClientImpl.cpp ('k') | Source/web/WebDocumentType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698