| 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 void WebPluginContainerImpl::invalidateRect(const WebRect& rect) | 406 void WebPluginContainerImpl::invalidateRect(const WebRect& rect) |
| 407 { | 407 { |
| 408 invalidateRect(static_cast<IntRect>(rect)); | 408 invalidateRect(static_cast<IntRect>(rect)); |
| 409 } | 409 } |
| 410 | 410 |
| 411 void WebPluginContainerImpl::scrollRect(const WebRect& rect) | 411 void WebPluginContainerImpl::scrollRect(const WebRect& rect) |
| 412 { | 412 { |
| 413 invalidateRect(rect); | 413 invalidateRect(rect); |
| 414 } | 414 } |
| 415 | 415 |
| 416 void WebPluginContainerImpl::setNeedsLayout() |
| 417 { |
| 418 if (m_element->layoutObject()) |
| 419 m_element->layoutObject()->setNeedsLayout("Plugin needs layout"); |
| 420 } |
| 421 |
| 416 void WebPluginContainerImpl::reportGeometry() | 422 void WebPluginContainerImpl::reportGeometry() |
| 417 { | 423 { |
| 418 // We cannot compute geometry without a parent or layoutObject. | 424 // We cannot compute geometry without a parent or layoutObject. |
| 419 if (!parent() || !m_element || !m_element->layoutObject()) | 425 if (!parent() || !m_element || !m_element->layoutObject()) |
| 420 return; | 426 return; |
| 421 | 427 |
| 422 IntRect windowRect, clipRect, unobscuredRect; | 428 IntRect windowRect, clipRect, unobscuredRect; |
| 423 Vector<IntRect> cutOutRects; | 429 Vector<IntRect> cutOutRects; |
| 424 calculateGeometry(windowRect, clipRect, unobscuredRect, cutOutRects); | 430 calculateGeometry(windowRect, clipRect, unobscuredRect, cutOutRects); |
| 425 | 431 |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 for (size_t i = 0; i < cutOutRects.size(); i++) | 1021 for (size_t i = 0; i < cutOutRects.size(); i++) |
| 1016 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); | 1022 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); |
| 1017 } | 1023 } |
| 1018 | 1024 |
| 1019 bool WebPluginContainerImpl::pluginShouldPersist() const | 1025 bool WebPluginContainerImpl::pluginShouldPersist() const |
| 1020 { | 1026 { |
| 1021 return m_webPlugin->shouldPersist(); | 1027 return m_webPlugin->shouldPersist(); |
| 1022 } | 1028 } |
| 1023 | 1029 |
| 1024 } // namespace blink | 1030 } // namespace blink |
| OLD | NEW |