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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 if (!htmlDocument->hasNamedItem(key.impl()) && !htmlDocument->hasExtraNamedI
tem(key.impl())) | 432 if (!htmlDocument->hasNamedItem(key.impl()) && !htmlDocument->hasExtraNamedI
tem(key.impl())) |
433 return v8Undefined(); | 433 return v8Undefined(); |
434 | 434 |
435 RefPtr<HTMLCollection> items = htmlDocument->documentNamedItems(key); | 435 RefPtr<HTMLCollection> items = htmlDocument->documentNamedItems(key); |
436 if (items->isEmpty()) | 436 if (items->isEmpty()) |
437 return v8Undefined(); | 437 return v8Undefined(); |
438 | 438 |
439 if (items->hasExactlyOneItem()) { | 439 if (items->hasExactlyOneItem()) { |
440 Node* node = items->item(0); | 440 Node* node = items->item(0); |
441 Frame* frame = 0; | 441 Frame* frame = 0; |
442 if (node->hasTagName(HTMLNames::iframeTag) && (frame = static_cast<HTMLI
FrameElement*>(node)->contentFrame())) | 442 if (node->hasTagName(HTMLNames::iframeTag) && (frame = toHTMLIFrameEleme
nt(node)->contentFrame())) |
443 return toV8(frame->document()->domWindow(), creationContext, isolate
); | 443 return toV8(frame->document()->domWindow(), creationContext, isolate
); |
444 return toV8(node, creationContext, isolate); | 444 return toV8(node, creationContext, isolate); |
445 } | 445 } |
446 return toV8(items.release(), creationContext, isolate); | 446 return toV8(items.release(), creationContext, isolate); |
447 } | 447 } |
448 | 448 |
449 static void getter(v8::Local<v8::String> property, const v8::PropertyCallbackInf
o<v8::Value>& info) | 449 static void getter(v8::Local<v8::String> property, const v8::PropertyCallbackInf
o<v8::Value>& info) |
450 { | 450 { |
451 // FIXME: Consider passing AtomicStringImpl directly. | 451 // FIXME: Consider passing AtomicStringImpl directly. |
452 AtomicString name = toWebCoreAtomicString(property); | 452 AtomicString name = toWebCoreAtomicString(property); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 void V8WindowShell::updateSecurityOrigin() | 502 void V8WindowShell::updateSecurityOrigin() |
503 { | 503 { |
504 ASSERT(m_world->isMainWorld()); | 504 ASSERT(m_world->isMainWorld()); |
505 if (m_context.isEmpty()) | 505 if (m_context.isEmpty()) |
506 return; | 506 return; |
507 v8::HandleScope handleScope; | 507 v8::HandleScope handleScope; |
508 setSecurityToken(); | 508 setSecurityToken(); |
509 } | 509 } |
510 | 510 |
511 } // WebCore | 511 } // WebCore |
OLD | NEW |