| 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 } | 511 } |
| 512 | 512 |
| 513 void WebPluginContainerImpl::zoomLevelChanged(double zoomLevel) | 513 void WebPluginContainerImpl::zoomLevelChanged(double zoomLevel) |
| 514 { | 514 { |
| 515 WebViewImpl* view = WebViewImpl::fromPage(m_element->document().frame()->pag
e()); | 515 WebViewImpl* view = WebViewImpl::fromPage(m_element->document().frame()->pag
e()); |
| 516 view->fullFramePluginZoomLevelChanged(zoomLevel); | 516 view->fullFramePluginZoomLevelChanged(zoomLevel); |
| 517 } | 517 } |
| 518 | 518 |
| 519 bool WebPluginContainerImpl::isRectTopmost(const WebRect& rect) | 519 bool WebPluginContainerImpl::isRectTopmost(const WebRect& rect) |
| 520 { | 520 { |
| 521 if (m_element->document().isDetached()) | 521 if (!m_element || m_element->document().isDetached()) |
| 522 return false; | 522 return false; |
| 523 | 523 |
| 524 LocalFrame* frame = m_element->document().frame(); | 524 LocalFrame* frame = m_element->document().frame(); |
| 525 if (!frame) | 525 if (!frame) |
| 526 return false; | 526 return false; |
| 527 | 527 |
| 528 // hitTestResultAtPoint() takes a padding rectangle. | 528 // hitTestResultAtPoint() takes a padding rectangle. |
| 529 // FIXME: We'll be off by 1 when the width or height is even. | 529 // FIXME: We'll be off by 1 when the width or height is even. |
| 530 IntRect documentRect(x() + rect.x, y() + rect.y, rect.width, rect.height); | 530 IntRect documentRect(x() + rect.x, y() + rect.y, rect.width, rect.height); |
| 531 LayoutPoint center = documentRect.center(); | 531 LayoutPoint center = documentRect.center(); |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 for (size_t i = 0; i < cutOutRects.size(); i++) | 1014 for (size_t i = 0; i < cutOutRects.size(); i++) |
| 1015 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); | 1015 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); |
| 1016 } | 1016 } |
| 1017 | 1017 |
| 1018 bool WebPluginContainerImpl::pluginShouldPersist() const | 1018 bool WebPluginContainerImpl::pluginShouldPersist() const |
| 1019 { | 1019 { |
| 1020 return m_webPlugin->shouldPersist(); | 1020 return m_webPlugin->shouldPersist(); |
| 1021 } | 1021 } |
| 1022 | 1022 |
| 1023 } // namespace blink | 1023 } // namespace blink |
| OLD | NEW |