| 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 { | 418 { |
| 419 if (!htmlDocument->hasNamedItem(key) && !htmlDocument->hasExtraNamedItem(key
)) | 419 if (!htmlDocument->hasNamedItem(key) && !htmlDocument->hasExtraNamedItem(key
)) |
| 420 return v8Undefined(); | 420 return v8Undefined(); |
| 421 | 421 |
| 422 RefPtr<HTMLCollection> items = htmlDocument->documentNamedItems(key); | 422 RefPtr<HTMLCollection> items = htmlDocument->documentNamedItems(key); |
| 423 if (items->isEmpty()) | 423 if (items->isEmpty()) |
| 424 return v8Undefined(); | 424 return v8Undefined(); |
| 425 | 425 |
| 426 if (items->hasExactlyOneItem()) { | 426 if (items->hasExactlyOneItem()) { |
| 427 Element* element = items->item(0); | 427 Element* element = items->item(0); |
| 428 ASSERT(element); |
| 428 LocalFrame* frame = 0; | 429 LocalFrame* frame = 0; |
| 429 if (element->hasTagName(HTMLNames::iframeTag) && (frame = toHTMLIFrameEl
ement(element)->contentFrame())) | 430 if (isHTMLIFrameElement(*element) && (frame = toHTMLIFrameElement(*eleme
nt).contentFrame())) |
| 430 return toV8(frame->domWindow(), creationContext, isolate); | 431 return toV8(frame->domWindow(), creationContext, isolate); |
| 431 return toV8(element, creationContext, isolate); | 432 return toV8(element, creationContext, isolate); |
| 432 } | 433 } |
| 433 return toV8(items.release(), creationContext, isolate); | 434 return toV8(items.release(), creationContext, isolate); |
| 434 } | 435 } |
| 435 | 436 |
| 436 static void getter(v8::Local<v8::String> property, const v8::PropertyCallbackInf
o<v8::Value>& info) | 437 static void getter(v8::Local<v8::String> property, const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 437 { | 438 { |
| 438 // FIXME: Consider passing StringImpl directly. | 439 // FIXME: Consider passing StringImpl directly. |
| 439 AtomicString name = toCoreAtomicString(property); | 440 AtomicString name = toCoreAtomicString(property); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin) | 490 void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin) |
| 490 { | 491 { |
| 491 ASSERT(m_world->isMainWorld()); | 492 ASSERT(m_world->isMainWorld()); |
| 492 if (!m_perContextData) | 493 if (!m_perContextData) |
| 493 return; | 494 return; |
| 494 v8::HandleScope handleScope(m_isolate); | 495 v8::HandleScope handleScope(m_isolate); |
| 495 setSecurityToken(origin); | 496 setSecurityToken(origin); |
| 496 } | 497 } |
| 497 | 498 |
| 498 } // WebCore | 499 } // WebCore |
| OLD | NEW |