| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 #endif | 90 #endif |
| 91 } | 91 } |
| 92 | 92 |
| 93 virtual void invalidateContentsAndRootView(const IntRect& paintRect) OVERRID
E | 93 virtual void invalidateContentsAndRootView(const IntRect& paintRect) OVERRID
E |
| 94 { | 94 { |
| 95 if (paintRect.isEmpty()) | 95 if (paintRect.isEmpty()) |
| 96 return; | 96 return; |
| 97 m_popup->widgetClient()->didInvalidateRect(paintRect); | 97 m_popup->widgetClient()->didInvalidateRect(paintRect); |
| 98 } | 98 } |
| 99 | 99 |
| 100 virtual void scroll(const IntSize& scrollDelta, const IntRect& scrollRect, c
onst IntRect& clipRect) OVERRIDE | |
| 101 { | |
| 102 m_popup->widgetClient()->didScrollRect(scrollDelta.width(), scrollDelta.
height(), intersection(scrollRect, clipRect)); | |
| 103 } | |
| 104 | |
| 105 virtual void invalidateContentsForSlowScroll(const IntRect& updateRect) OVER
RIDE | 100 virtual void invalidateContentsForSlowScroll(const IntRect& updateRect) OVER
RIDE |
| 106 { | 101 { |
| 107 invalidateContentsAndRootView(updateRect); | 102 invalidateContentsAndRootView(updateRect); |
| 108 } | 103 } |
| 109 | 104 |
| 110 virtual void scheduleAnimation() OVERRIDE | 105 virtual void scheduleAnimation() OVERRIDE |
| 111 { | 106 { |
| 112 if (m_popup->isAcceleratedCompositingActive()) { | 107 if (m_popup->isAcceleratedCompositingActive()) { |
| 113 ASSERT(m_popup->m_layerTreeView); | 108 ASSERT(m_popup->m_layerTreeView); |
| 114 m_popup->m_layerTreeView->setNeedsAnimate(); | 109 m_popup->m_layerTreeView->setNeedsAnimate(); |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 // A WebPagePopupImpl instance usually has two references. | 394 // A WebPagePopupImpl instance usually has two references. |
| 400 // - One owned by the instance itself. It represents the visible widget. | 395 // - One owned by the instance itself. It represents the visible widget. |
| 401 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 396 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 402 // WebPagePopupImpl to close. | 397 // WebPagePopupImpl to close. |
| 403 // We need them because the closing operation is asynchronous and the widget | 398 // We need them because the closing operation is asynchronous and the widget |
| 404 // can be closed while the WebViewImpl is unaware of it. | 399 // can be closed while the WebViewImpl is unaware of it. |
| 405 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 400 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
| 406 } | 401 } |
| 407 | 402 |
| 408 } // namespace blink | 403 } // namespace blink |
| OLD | NEW |