| 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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 | 582 |
| 583 WebPoint WebPluginContainerImpl::localToRootFramePoint(const WebPoint& pointInLo
cal) | 583 WebPoint WebPluginContainerImpl::localToRootFramePoint(const WebPoint& pointInLo
cal) |
| 584 { | 584 { |
| 585 FrameView* view = toFrameView(parent()); | 585 FrameView* view = toFrameView(parent()); |
| 586 if (!view) | 586 if (!view) |
| 587 return pointInLocal; | 587 return pointInLocal; |
| 588 IntPoint absolutePoint = roundedIntPoint(m_element->layoutObject()->localToA
bsolute(FloatPoint(pointInLocal), UseTransforms)); | 588 IntPoint absolutePoint = roundedIntPoint(m_element->layoutObject()->localToA
bsolute(FloatPoint(pointInLocal), UseTransforms)); |
| 589 return view->contentsToRootFrame(absolutePoint); | 589 return view->contentsToRootFrame(absolutePoint); |
| 590 } | 590 } |
| 591 | 591 |
| 592 WebRect WebPluginContainerImpl::localToScreenRect(const WebRect& rectInLocal) |
| 593 { |
| 594 FrameView* view = toFrameView(parent()); |
| 595 if (!view) |
| 596 return rectInLocal; |
| 597 IntRect absoluteRect = roundedIntRect(m_element->layoutObject()->localToAbso
luteQuad(FloatQuad(FloatRect(rectInLocal)), UseTransforms).boundingBox()); |
| 598 |
| 599 return view->contentsToScreen(absoluteRect); |
| 600 } |
| 601 |
| 592 void WebPluginContainerImpl::didReceiveResponse(const ResourceResponse& response
) | 602 void WebPluginContainerImpl::didReceiveResponse(const ResourceResponse& response
) |
| 593 { | 603 { |
| 594 // Make sure that the plugin receives window geometry before data, or else | 604 // Make sure that the plugin receives window geometry before data, or else |
| 595 // plugins misbehave. | 605 // plugins misbehave. |
| 596 frameRectsChanged(); | 606 frameRectsChanged(); |
| 597 | 607 |
| 598 WrappedResourceResponse urlResponse(response); | 608 WrappedResourceResponse urlResponse(response); |
| 599 m_webPlugin->didReceiveResponse(urlResponse); | 609 m_webPlugin->didReceiveResponse(urlResponse); |
| 600 } | 610 } |
| 601 | 611 |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 // frame view. | 987 // frame view. |
| 978 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec
t); | 988 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec
t); |
| 979 } | 989 } |
| 980 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); | 990 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); |
| 981 // Convert to the plugin position. | 991 // Convert to the plugin position. |
| 982 for (size_t i = 0; i < cutOutRects.size(); i++) | 992 for (size_t i = 0; i < cutOutRects.size(); i++) |
| 983 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); | 993 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); |
| 984 } | 994 } |
| 985 | 995 |
| 986 } // namespace blink | 996 } // namespace blink |
| OLD | NEW |