| 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 return; | 398 return; |
| 399 PageWidgetDelegate::updateAllLifecyclePhases(*m_page, *m_page->deprecatedLoc
alMainFrame()); | 399 PageWidgetDelegate::updateAllLifecyclePhases(*m_page, *m_page->deprecatedLoc
alMainFrame()); |
| 400 } | 400 } |
| 401 | 401 |
| 402 void WebPagePopupImpl::paint(WebCanvas* canvas, const WebRect& rect) | 402 void WebPagePopupImpl::paint(WebCanvas* canvas, const WebRect& rect) |
| 403 { | 403 { |
| 404 if (!m_closing) | 404 if (!m_closing) |
| 405 PageWidgetDelegate::paint(*m_page, canvas, rect, *m_page->deprecatedLoca
lMainFrame()); | 405 PageWidgetDelegate::paint(*m_page, canvas, rect, *m_page->deprecatedLoca
lMainFrame()); |
| 406 } | 406 } |
| 407 | 407 |
| 408 void WebPagePopupImpl::resize(const WebSize& newSizeInViewport, float, bool) |
| 409 { |
| 410 // Top controls don't exist in popups so ignore the top control params. |
| 411 resize(newSizeInViewport); |
| 412 } |
| 413 |
| 408 void WebPagePopupImpl::resize(const WebSize& newSizeInViewport) | 414 void WebPagePopupImpl::resize(const WebSize& newSizeInViewport) |
| 409 { | 415 { |
| 410 WebRect newSize(0, 0, newSizeInViewport.width, newSizeInViewport.height); | 416 WebRect newSize(0, 0, newSizeInViewport.width, newSizeInViewport.height); |
| 411 widgetClient()->convertViewportToWindow(&newSize); | 417 widgetClient()->convertViewportToWindow(&newSize); |
| 412 | 418 |
| 413 setWindowRect(WebRect(m_windowRectInScreen.x, m_windowRectInScreen.y, newSiz
e.width, newSize.height)); | 419 setWindowRect(WebRect(m_windowRectInScreen.x, m_windowRectInScreen.y, newSiz
e.width, newSize.height)); |
| 414 if (m_page) { | 420 if (m_page) { |
| 415 toLocalFrame(m_page->mainFrame())->view()->resize(newSizeInViewport); | 421 toLocalFrame(m_page->mainFrame())->view()->resize(newSizeInViewport); |
| 416 m_page->frameHost().visualViewport().setSize(newSizeInViewport); | 422 m_page->frameHost().visualViewport().setSize(newSizeInViewport); |
| 417 } | 423 } |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 // A WebPagePopupImpl instance usually has two references. | 566 // A WebPagePopupImpl instance usually has two references. |
| 561 // - One owned by the instance itself. It represents the visible widget. | 567 // - One owned by the instance itself. It represents the visible widget. |
| 562 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 568 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 563 // WebPagePopupImpl to close. | 569 // WebPagePopupImpl to close. |
| 564 // We need them because the closing operation is asynchronous and the widget | 570 // We need them because the closing operation is asynchronous and the widget |
| 565 // can be closed while the WebViewImpl is unaware of it. | 571 // can be closed while the WebViewImpl is unaware of it. |
| 566 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 572 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
| 567 } | 573 } |
| 568 | 574 |
| 569 } // namespace blink | 575 } // namespace blink |
| OLD | NEW |