| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 return v8::Local<v8::Object>(); | 456 return v8::Local<v8::Object>(); |
| 457 | 457 |
| 458 if (!frame->script().canExecuteScripts(NotAboutToExecuteScript)) | 458 if (!frame->script().canExecuteScripts(NotAboutToExecuteScript)) |
| 459 return v8::Local<v8::Object>(); | 459 return v8::Local<v8::Object>(); |
| 460 | 460 |
| 461 ScriptState* scriptState = ScriptState::forMainWorld(frame); | 461 ScriptState* scriptState = ScriptState::forMainWorld(frame); |
| 462 if (!scriptState->contextIsValid()) | 462 if (!scriptState->contextIsValid()) |
| 463 return v8::Local<v8::Object>(); | 463 return v8::Local<v8::Object>(); |
| 464 | 464 |
| 465 v8::Local<v8::Value> v8value = toV8(m_element.get(), scriptState->context()-
>Global(), scriptState->isolate()); | 465 v8::Local<v8::Value> v8value = toV8(m_element.get(), scriptState->context()-
>Global(), scriptState->isolate()); |
| 466 if (v8value.IsEmpty()) |
| 467 return v8::Local<v8::Object>(); |
| 466 ASSERT(v8value->IsObject()); | 468 ASSERT(v8value->IsObject()); |
| 467 | 469 |
| 468 return v8::Local<v8::Object>::Cast(v8value); | 470 return v8::Local<v8::Object>::Cast(v8value); |
| 469 } | 471 } |
| 470 | 472 |
| 471 WebString WebPluginContainerImpl::executeScriptURL(const WebURL& url, bool popup
sAllowed) | 473 WebString WebPluginContainerImpl::executeScriptURL(const WebURL& url, bool popup
sAllowed) |
| 472 { | 474 { |
| 473 LocalFrame* frame = m_element->document().frame(); | 475 LocalFrame* frame = m_element->document().frame(); |
| 474 if (!frame) | 476 if (!frame) |
| 475 return WebString(); | 477 return WebString(); |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 for (size_t i = 0; i < cutOutRects.size(); i++) | 1016 for (size_t i = 0; i < cutOutRects.size(); i++) |
| 1015 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); | 1017 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); |
| 1016 } | 1018 } |
| 1017 | 1019 |
| 1018 bool WebPluginContainerImpl::pluginShouldPersist() const | 1020 bool WebPluginContainerImpl::pluginShouldPersist() const |
| 1019 { | 1021 { |
| 1020 return m_webPlugin->shouldPersist(); | 1022 return m_webPlugin->shouldPersist(); |
| 1021 } | 1023 } |
| 1022 | 1024 |
| 1023 } // namespace blink | 1025 } // namespace blink |
| OLD | NEW |