OLD | NEW |
---|---|
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 Loading... | |
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) | |
haraken
2014/05/08 06:22:37
This can be removed once we make createElement ret
tkent
2014/05/08 07:39:30
Done.
| |
258 WebElement element(unwrap<Document>()->createElement(tagName, exceptionState ).get()); | |
259 #else | |
257 WebElement element(unwrap<Document>()->createElement(tagName, exceptionState )); | 260 WebElement element(unwrap<Document>()->createElement(tagName, exceptionState )); |
261 #endif | |
258 if (exceptionState.hadException()) | 262 if (exceptionState.hadException()) |
259 return WebElement(); | 263 return WebElement(); |
260 return element; | 264 return element; |
261 } | 265 } |
262 | 266 |
263 WebAXObject WebDocument::accessibilityObject() const | 267 WebAXObject WebDocument::accessibilityObject() const |
264 { | 268 { |
265 const Document* document = constUnwrap<Document>(); | 269 const Document* document = constUnwrap<Document>(); |
266 return WebAXObject(document->axObjectCache()->getOrCreate(document->renderer ())); | 270 return WebAXObject(document->axObjectCache()->getOrCreate(document->renderer ())); |
267 } | 271 } |
(...skipping 26 matching lines...) Expand all Loading... | |
294 Document* document = unwrap<Document>(); | 298 Document* document = unwrap<Document>(); |
295 Dictionary dictionary(options, isolate); | 299 Dictionary dictionary(options, isolate); |
296 TrackExceptionState exceptionState; | 300 TrackExceptionState exceptionState; |
297 ScriptValue constructor = document->registerElement(ScriptState::current(iso late), name, dictionary, exceptionState, CustomElement::EmbedderNames); | 301 ScriptValue constructor = document->registerElement(ScriptState::current(iso late), name, dictionary, exceptionState, CustomElement::EmbedderNames); |
298 ec = exceptionState.code(); | 302 ec = exceptionState.code(); |
299 if (exceptionState.hadException()) | 303 if (exceptionState.hadException()) |
300 return v8::Handle<v8::Value>(); | 304 return v8::Handle<v8::Value>(); |
301 return constructor.v8Value(); | 305 return constructor.v8Value(); |
302 } | 306 } |
303 | 307 |
304 WebDocument::WebDocument(const PassRefPtr<Document>& elem) | 308 WebDocument::WebDocument(const PassRefPtrWillBeRawPtr<Document>& elem) |
305 : WebNode(elem) | 309 : WebNode(elem) |
306 { | 310 { |
307 } | 311 } |
308 | 312 |
309 WebDocument& WebDocument::operator=(const PassRefPtr<Document>& elem) | 313 WebDocument& WebDocument::operator=(const PassRefPtrWillBeRawPtr<Document>& elem ) |
310 { | 314 { |
311 m_private = elem; | 315 m_private = elem; |
312 return *this; | 316 return *this; |
313 } | 317 } |
314 | 318 |
315 WebDocument::operator PassRefPtr<Document>() const | 319 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const |
316 { | 320 { |
317 return toDocument(m_private.get()); | 321 return toDocument(m_private.get()); |
318 } | 322 } |
319 | 323 |
320 } // namespace blink | 324 } // namespace blink |
OLD | NEW |