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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 void WebPluginContainerImpl::invalidate() | 377 void WebPluginContainerImpl::invalidate() |
378 { | 378 { |
379 Widget::invalidate(); | 379 Widget::invalidate(); |
380 } | 380 } |
381 | 381 |
382 void WebPluginContainerImpl::invalidateRect(const WebRect& rect) | 382 void WebPluginContainerImpl::invalidateRect(const WebRect& rect) |
383 { | 383 { |
384 invalidateRect(static_cast<IntRect>(rect)); | 384 invalidateRect(static_cast<IntRect>(rect)); |
385 } | 385 } |
386 | 386 |
387 void WebPluginContainerImpl::scrollRect(int dx, int dy, const WebRect& rect) | 387 void WebPluginContainerImpl::scrollRect(const WebRect& rect) |
388 { | 388 { |
389 Widget* parentWidget = parent(); | 389 Widget* parentWidget = parent(); |
390 if (parentWidget->isFrameView()) { | 390 if (parentWidget->isFrameView()) { |
391 FrameView* parentFrameView = toFrameView(parentWidget); | 391 FrameView* parentFrameView = toFrameView(parentWidget); |
392 if (!parentFrameView->isOverlapped()) { | 392 if (!parentFrameView->isOverlapped()) { |
393 IntRect damageRect = convertToContainingWindow(static_cast<IntRect>(
rect)); | 393 // FIXME: parameter is unused. Remove once popups scroll like everyt
hing else. |
394 IntSize scrollDelta(dx, dy); | 394 static const IntRect dummy; |
395 // scroll() only uses the second rectangle, clipRect, and ignores th
e first | 395 parent()->hostWindow()->scroll(dummy); |
396 // rectangle. | |
397 parent()->hostWindow()->scroll(scrollDelta, damageRect, damageRect); | |
398 return; | 396 return; |
399 } | 397 } |
400 } | 398 } |
401 | 399 |
402 // Use slow scrolling instead. | 400 // Use slow scrolling instead. |
403 invalidateRect(rect); | 401 invalidateRect(rect); |
404 } | 402 } |
405 | 403 |
406 void WebPluginContainerImpl::reportGeometry() | 404 void WebPluginContainerImpl::reportGeometry() |
407 { | 405 { |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 | 909 |
912 return clipRect; | 910 return clipRect; |
913 } | 911 } |
914 | 912 |
915 bool WebPluginContainerImpl::pluginShouldPersist() const | 913 bool WebPluginContainerImpl::pluginShouldPersist() const |
916 { | 914 { |
917 return m_webPlugin->shouldPersist(); | 915 return m_webPlugin->shouldPersist(); |
918 } | 916 } |
919 | 917 |
920 } // namespace blink | 918 } // namespace blink |
OLD | NEW |