| 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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 WebRect windowRect = windowRectInScreen(); | 431 WebRect windowRect = windowRectInScreen(); |
| 432 | 432 |
| 433 // TODO(bokan): We should only call into this if the bounds actually changed | 433 // TODO(bokan): We should only call into this if the bounds actually changed |
| 434 // but this reveals a bug in Aura. crbug.com/633140. | 434 // but this reveals a bug in Aura. crbug.com/633140. |
| 435 windowRect.width = newSize.width; | 435 windowRect.width = newSize.width; |
| 436 windowRect.height = newSize.height; | 436 windowRect.height = newSize.height; |
| 437 setWindowRect(windowRect); | 437 setWindowRect(windowRect); |
| 438 | 438 |
| 439 if (m_page) { | 439 if (m_page) { |
| 440 toLocalFrame(m_page->mainFrame())->view()->resize(newSizeInViewport); | 440 toLocalFrame(m_page->mainFrame())->view()->resize(newSizeInViewport); |
| 441 m_page->frameHost().visualViewport().setSize(newSizeInViewport); | 441 m_page->visualViewport().setSize(newSizeInViewport); |
| 442 } | 442 } |
| 443 | 443 |
| 444 m_widgetClient->didInvalidateRect( | 444 m_widgetClient->didInvalidateRect( |
| 445 WebRect(0, 0, newSize.width, newSize.height)); | 445 WebRect(0, 0, newSize.width, newSize.height)); |
| 446 } | 446 } |
| 447 | 447 |
| 448 WebInputEventResult WebPagePopupImpl::handleKeyEvent( | 448 WebInputEventResult WebPagePopupImpl::handleKeyEvent( |
| 449 const WebKeyboardEvent& event) { | 449 const WebKeyboardEvent& event) { |
| 450 if (m_closing || !m_page->mainFrame() || | 450 if (m_closing || !m_page->mainFrame() || |
| 451 !toLocalFrame(m_page->mainFrame())->view()) | 451 !toLocalFrame(m_page->mainFrame())->view()) |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 // A WebPagePopupImpl instance usually has two references. | 589 // A WebPagePopupImpl instance usually has two references. |
| 590 // - One owned by the instance itself. It represents the visible widget. | 590 // - One owned by the instance itself. It represents the visible widget. |
| 591 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 591 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 592 // WebPagePopupImpl to close. | 592 // WebPagePopupImpl to close. |
| 593 // We need them because the closing operation is asynchronous and the widget | 593 // We need them because the closing operation is asynchronous and the widget |
| 594 // can be closed while the WebViewImpl is unaware of it. | 594 // can be closed while the WebViewImpl is unaware of it. |
| 595 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 595 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
| 596 } | 596 } |
| 597 | 597 |
| 598 } // namespace blink | 598 } // namespace blink |
| OLD | NEW |