| 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 return v8::Local<v8::Object>(); | 444 return v8::Local<v8::Object>(); |
| 445 | 445 |
| 446 if (!frame->script().canExecuteScripts(NotAboutToExecuteScript)) | 446 if (!frame->script().canExecuteScripts(NotAboutToExecuteScript)) |
| 447 return v8::Local<v8::Object>(); | 447 return v8::Local<v8::Object>(); |
| 448 | 448 |
| 449 ScriptState* scriptState = ScriptState::forMainWorld(frame); | 449 ScriptState* scriptState = ScriptState::forMainWorld(frame); |
| 450 if (!scriptState) | 450 if (!scriptState) |
| 451 return v8::Local<v8::Object>(); | 451 return v8::Local<v8::Object>(); |
| 452 | 452 |
| 453 v8::Local<v8::Value> v8value = | 453 v8::Local<v8::Value> v8value = |
| 454 toV8(m_element.get(), scriptState->context()->Global(), | 454 ToV8(m_element.get(), scriptState->context()->Global(), |
| 455 scriptState->isolate()); | 455 scriptState->isolate()); |
| 456 if (v8value.IsEmpty()) | 456 if (v8value.IsEmpty()) |
| 457 return v8::Local<v8::Object>(); | 457 return v8::Local<v8::Object>(); |
| 458 DCHECK(v8value->IsObject()); | 458 DCHECK(v8value->IsObject()); |
| 459 | 459 |
| 460 return v8::Local<v8::Object>::Cast(v8value); | 460 return v8::Local<v8::Object>::Cast(v8value); |
| 461 } | 461 } |
| 462 | 462 |
| 463 WebString WebPluginContainerImpl::executeScriptURL(const WebURL& url, | 463 WebString WebPluginContainerImpl::executeScriptURL(const WebURL& url, |
| 464 bool popupsAllowed) { | 464 bool popupsAllowed) { |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 // frame view. | 969 // frame view. |
| 970 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect); | 970 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect); |
| 971 } | 971 } |
| 972 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); | 972 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); |
| 973 // Convert to the plugin position. | 973 // Convert to the plugin position. |
| 974 for (size_t i = 0; i < cutOutRects.size(); i++) | 974 for (size_t i = 0; i < cutOutRects.size(); i++) |
| 975 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); | 975 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); |
| 976 } | 976 } |
| 977 | 977 |
| 978 } // namespace blink | 978 } // namespace blink |
| OLD | NEW |