| 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 15 matching lines...) Expand all Loading... |
| 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 #include "web/WebPluginContainerImpl.h" | 32 #include "web/WebPluginContainerImpl.h" |
| 33 | 33 |
| 34 #include "bindings/core/v8/ScriptController.h" | 34 #include "bindings/core/v8/ScriptController.h" |
| 35 #include "bindings/core/v8/ScriptSourceCode.h" | 35 #include "bindings/core/v8/ScriptSourceCode.h" |
| 36 #include "bindings/core/v8/V8Binding.h" |
| 36 #include "bindings/core/v8/V8Element.h" | 37 #include "bindings/core/v8/V8Element.h" |
| 37 #include "core/HTMLNames.h" | 38 #include "core/HTMLNames.h" |
| 38 #include "core/clipboard/DataObject.h" | 39 #include "core/clipboard/DataObject.h" |
| 39 #include "core/clipboard/DataTransfer.h" | 40 #include "core/clipboard/DataTransfer.h" |
| 40 #include "core/dom/DocumentUserGestureToken.h" | 41 #include "core/dom/DocumentUserGestureToken.h" |
| 41 #include "core/dom/ExecutionContext.h" | 42 #include "core/dom/ExecutionContext.h" |
| 42 #include "core/dom/Fullscreen.h" | 43 #include "core/dom/Fullscreen.h" |
| 43 #include "core/events/DragEvent.h" | 44 #include "core/events/DragEvent.h" |
| 44 #include "core/events/EventQueue.h" | 45 #include "core/events/EventQueue.h" |
| 45 #include "core/events/GestureEvent.h" | 46 #include "core/events/GestureEvent.h" |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 } | 442 } |
| 442 | 443 |
| 443 v8::Local<v8::Object> WebPluginContainerImpl::v8ObjectForElement() { | 444 v8::Local<v8::Object> WebPluginContainerImpl::v8ObjectForElement() { |
| 444 LocalFrame* frame = m_element->document().frame(); | 445 LocalFrame* frame = m_element->document().frame(); |
| 445 if (!frame) | 446 if (!frame) |
| 446 return v8::Local<v8::Object>(); | 447 return v8::Local<v8::Object>(); |
| 447 | 448 |
| 448 if (!m_element->document().canExecuteScripts(NotAboutToExecuteScript)) | 449 if (!m_element->document().canExecuteScripts(NotAboutToExecuteScript)) |
| 449 return v8::Local<v8::Object>(); | 450 return v8::Local<v8::Object>(); |
| 450 | 451 |
| 451 ScriptState* scriptState = ScriptState::forMainWorld(frame); | 452 ScriptState* scriptState = toScriptStateForMainWorld(frame); |
| 452 if (!scriptState) | 453 if (!scriptState) |
| 453 return v8::Local<v8::Object>(); | 454 return v8::Local<v8::Object>(); |
| 454 | 455 |
| 455 v8::Local<v8::Value> v8value = | 456 v8::Local<v8::Value> v8value = |
| 456 ToV8(m_element.get(), scriptState->context()->Global(), | 457 ToV8(m_element.get(), scriptState->context()->Global(), |
| 457 scriptState->isolate()); | 458 scriptState->isolate()); |
| 458 if (v8value.IsEmpty()) | 459 if (v8value.IsEmpty()) |
| 459 return v8::Local<v8::Object>(); | 460 return v8::Local<v8::Object>(); |
| 460 DCHECK(v8value->IsObject()); | 461 DCHECK(v8value->IsObject()); |
| 461 | 462 |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 // frame view. | 987 // frame view. |
| 987 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect); | 988 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect); |
| 988 } | 989 } |
| 989 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); | 990 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); |
| 990 // Convert to the plugin position. | 991 // Convert to the plugin position. |
| 991 for (size_t i = 0; i < cutOutRects.size(); i++) | 992 for (size_t i = 0; i < cutOutRects.size(); i++) |
| 992 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); | 993 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); |
| 993 } | 994 } |
| 994 | 995 |
| 995 } // namespace blink | 996 } // namespace blink |
| OLD | NEW |