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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 } | 324 } |
325 } | 325 } |
326 return draggableRegions; | 326 return draggableRegions; |
327 } | 327 } |
328 | 328 |
329 v8::Handle<v8::Value> WebDocument::registerEmbedderCustomElement(const WebString
& name, v8::Handle<v8::Value> options, WebExceptionCode& ec) | 329 v8::Handle<v8::Value> WebDocument::registerEmbedderCustomElement(const WebString
& name, v8::Handle<v8::Value> options, WebExceptionCode& ec) |
330 { | 330 { |
331 v8::Isolate* isolate = v8::Isolate::GetCurrent(); | 331 v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
332 Document* document = unwrap<Document>(); | 332 Document* document = unwrap<Document>(); |
333 TrackExceptionState exceptionState; | 333 TrackExceptionState exceptionState; |
334 ElementRegistrationOptions* registrationOptions = V8ElementRegistrationOptio
ns::toImpl(isolate, options, exceptionState); | 334 ElementRegistrationOptions registrationOptions; |
335 ScriptValue constructor = document->registerElement(ScriptState::current(iso
late), name, *registrationOptions, exceptionState, CustomElement::EmbedderNames)
; | 335 V8ElementRegistrationOptions::toImpl(isolate, options, registrationOptions,
exceptionState); |
| 336 if (exceptionState.hadException()) |
| 337 return v8::Handle<v8::Value>(); |
| 338 ScriptValue constructor = document->registerElement(ScriptState::current(iso
late), name, registrationOptions, exceptionState, CustomElement::EmbedderNames); |
336 ec = exceptionState.code(); | 339 ec = exceptionState.code(); |
337 if (exceptionState.hadException()) | 340 if (exceptionState.hadException()) |
338 return v8::Handle<v8::Value>(); | 341 return v8::Handle<v8::Value>(); |
339 return constructor.v8Value(); | 342 return constructor.v8Value(); |
340 } | 343 } |
341 | 344 |
342 WebURL WebDocument::manifestURL() const | 345 WebURL WebDocument::manifestURL() const |
343 { | 346 { |
344 const Document* document = constUnwrap<Document>(); | 347 const Document* document = constUnwrap<Document>(); |
345 HTMLLinkElement* linkElement = document->linkManifest(); | 348 HTMLLinkElement* linkElement = document->linkManifest(); |
(...skipping 12 matching lines...) Expand all Loading... |
358 m_private = elem; | 361 m_private = elem; |
359 return *this; | 362 return *this; |
360 } | 363 } |
361 | 364 |
362 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const | 365 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const |
363 { | 366 { |
364 return toDocument(m_private.get()); | 367 return toDocument(m_private.get()); |
365 } | 368 } |
366 | 369 |
367 } // namespace blink | 370 } // namespace blink |
OLD | NEW |