| 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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 if (!htmlDocument->hasNamedItem(key) && !htmlDocument->hasExtraNamedItem(key
)) | 427 if (!htmlDocument->hasNamedItem(key) && !htmlDocument->hasExtraNamedItem(key
)) |
| 428 return v8Undefined(); | 428 return v8Undefined(); |
| 429 | 429 |
| 430 RefPtr<HTMLCollection> items = htmlDocument->documentNamedItems(key); | 430 RefPtr<HTMLCollection> items = htmlDocument->documentNamedItems(key); |
| 431 if (items->isEmpty()) | 431 if (items->isEmpty()) |
| 432 return v8Undefined(); | 432 return v8Undefined(); |
| 433 | 433 |
| 434 if (items->hasExactlyOneItem()) { | 434 if (items->hasExactlyOneItem()) { |
| 435 Element* element = items->item(0); | 435 Element* element = items->item(0); |
| 436 ASSERT(element); | 436 ASSERT(element); |
| 437 LocalFrame* frame = 0; | 437 Frame* frame = 0; |
| 438 if (isHTMLIFrameElement(*element) && (frame = toHTMLIFrameElement(*eleme
nt).contentFrame())) | 438 if (isHTMLIFrameElement(*element) && (frame = toHTMLIFrameElement(*eleme
nt).contentFrame())) |
| 439 return toV8(frame->domWindow(), creationContext, isolate); | 439 return toV8(frame->domWindow(), creationContext, isolate); |
| 440 return toV8(element, creationContext, isolate); | 440 return toV8(element, creationContext, isolate); |
| 441 } | 441 } |
| 442 return toV8(items.release(), creationContext, isolate); | 442 return toV8(items.release(), creationContext, isolate); |
| 443 } | 443 } |
| 444 | 444 |
| 445 static void getter(v8::Local<v8::String> property, const v8::PropertyCallbackInf
o<v8::Value>& info) | 445 static void getter(v8::Local<v8::String> property, const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 446 { | 446 { |
| 447 // FIXME: Consider passing StringImpl directly. | 447 // FIXME: Consider passing StringImpl directly. |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin) | 498 void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin) |
| 499 { | 499 { |
| 500 ASSERT(m_world->isMainWorld()); | 500 ASSERT(m_world->isMainWorld()); |
| 501 if (!m_perContextData) | 501 if (!m_perContextData) |
| 502 return; | 502 return; |
| 503 v8::HandleScope handleScope(m_isolate); | 503 v8::HandleScope handleScope(m_isolate); |
| 504 setSecurityToken(origin); | 504 setSecurityToken(origin); |
| 505 } | 505 } |
| 506 | 506 |
| 507 } // WebCore | 507 } // WebCore |
| OLD | NEW |