OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2011 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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 return v8Undefined(); | 423 return v8Undefined(); |
424 | 424 |
425 if (items->hasExactlyOneItem()) { | 425 if (items->hasExactlyOneItem()) { |
426 HTMLElement* element = items->item(0); | 426 HTMLElement* element = items->item(0); |
427 ASSERT(element); | 427 ASSERT(element); |
428 Frame* frame = isHTMLIFrameElement(*element) ? toHTMLIFrameElement(*elem
ent).contentFrame() : 0; | 428 Frame* frame = isHTMLIFrameElement(*element) ? toHTMLIFrameElement(*elem
ent).contentFrame() : 0; |
429 if (frame) | 429 if (frame) |
430 return toV8(frame->domWindow(), creationContext, isolate); | 430 return toV8(frame->domWindow(), creationContext, isolate); |
431 return toV8(element, creationContext, isolate); | 431 return toV8(element, creationContext, isolate); |
432 } | 432 } |
433 return toV8(items.release(), creationContext, isolate); | 433 return toV8(PassRefPtrWillBeRawPtr<HTMLCollection>(items.release()), creatio
nContext, isolate); |
434 } | 434 } |
435 | 435 |
436 static void getter(v8::Local<v8::String> property, const v8::PropertyCallbackInf
o<v8::Value>& info) | 436 static void getter(v8::Local<v8::String> property, const v8::PropertyCallbackInf
o<v8::Value>& info) |
437 { | 437 { |
438 // FIXME: Consider passing StringImpl directly. | 438 // FIXME: Consider passing StringImpl directly. |
439 AtomicString name = toCoreAtomicString(property); | 439 AtomicString name = toCoreAtomicString(property); |
440 HTMLDocument* htmlDocument = V8HTMLDocument::toNative(info.Holder()); | 440 HTMLDocument* htmlDocument = V8HTMLDocument::toNative(info.Holder()); |
441 ASSERT(htmlDocument); | 441 ASSERT(htmlDocument); |
442 v8::Handle<v8::Value> result = getNamedProperty(htmlDocument, name, info.Hol
der(), info.GetIsolate()); | 442 v8::Handle<v8::Value> result = getNamedProperty(htmlDocument, name, info.Hol
der(), info.GetIsolate()); |
443 if (!result.IsEmpty()) { | 443 if (!result.IsEmpty()) { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 | 484 |
485 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) | 485 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) |
486 { | 486 { |
487 ASSERT(m_world->isMainWorld()); | 487 ASSERT(m_world->isMainWorld()); |
488 if (!isContextInitialized()) | 488 if (!isContextInitialized()) |
489 return; | 489 return; |
490 setSecurityToken(origin); | 490 setSecurityToken(origin); |
491 } | 491 } |
492 | 492 |
493 } // namespace blink | 493 } // namespace blink |
OLD | NEW |