| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 Widget::invalidate(); | 204 Widget::invalidate(); |
| 205 } | 205 } |
| 206 | 206 |
| 207 void WebPluginContainerImpl::invalidateRect(const WebRect& rect) | 207 void WebPluginContainerImpl::invalidateRect(const WebRect& rect) |
| 208 { | 208 { |
| 209 invalidateRect(static_cast<IntRect>(rect)); | 209 invalidateRect(static_cast<IntRect>(rect)); |
| 210 } | 210 } |
| 211 | 211 |
| 212 void WebPluginContainerImpl::reportGeometry() | 212 void WebPluginContainerImpl::reportGeometry() |
| 213 { | 213 { |
| 214 if (!parent()) | 214 // We cannot compute geometry without an associated RenderObject. |
| 215 if (!parent() || !m_element->renderer()) |
| 215 return; | 216 return; |
| 216 | 217 |
| 217 IntRect windowRect, clipRect; | 218 IntRect windowRect, clipRect; |
| 218 Vector<IntRect> cutOutRects; | 219 Vector<IntRect> cutOutRects; |
| 219 calculateGeometry(frameRect(), windowRect, clipRect, cutOutRects); | 220 calculateGeometry(frameRect(), windowRect, clipRect, cutOutRects); |
| 220 | 221 |
| 221 m_webPlugin->updateGeometry(windowRect, clipRect, cutOutRects, isVisible()); | 222 m_webPlugin->updateGeometry(windowRect, clipRect, cutOutRects, isVisible()); |
| 222 } | 223 } |
| 223 | 224 |
| 224 void WebPluginContainerImpl::clearScriptObjects() | 225 void WebPluginContainerImpl::clearScriptObjects() |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 roundedIntPoint(iframeRenderer->localToAbsolute()); | 526 roundedIntPoint(iframeRenderer->localToAbsolute()); |
| 526 RenderBox* rbox = toRenderBox(iframeRenderer); | 527 RenderBox* rbox = toRenderBox(iframeRenderer); |
| 527 IntSize size(rbox->width(), rbox->height()); | 528 IntSize size(rbox->width(), rbox->height()); |
| 528 cutOutRects.append(IntRect(point, size)); | 529 cutOutRects.append(IntRect(point, size)); |
| 529 } | 530 } |
| 530 } | 531 } |
| 531 } | 532 } |
| 532 } | 533 } |
| 533 | 534 |
| 534 } // namespace WebKit | 535 } // namespace WebKit |
| OLD | NEW |