| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 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 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1582 m_selectPopup = nullptr; | 1582 m_selectPopup = nullptr; |
| 1583 ASSERT(mainFrameImpl()->frame()->document()); | 1583 ASSERT(mainFrameImpl()->frame()->document()); |
| 1584 Document& document = *mainFrameImpl()->frame()->document(); | 1584 Document& document = *mainFrameImpl()->frame()->document(); |
| 1585 // Remove the handler we added in |popupOpened| conditionally, because the | 1585 // Remove the handler we added in |popupOpened| conditionally, because the |
| 1586 // Document may have already removed it, for instance, due to a navigation. | 1586 // Document may have already removed it, for instance, due to a navigation. |
| 1587 EventHandlerRegistry* registry = &document.frameHost()->eventHandlerRegistry
(); | 1587 EventHandlerRegistry* registry = &document.frameHost()->eventHandlerRegistry
(); |
| 1588 if (registry->eventHandlerTargets(EventHandlerRegistry::WheelEvent)->contain
s(&document)) | 1588 if (registry->eventHandlerTargets(EventHandlerRegistry::WheelEvent)->contain
s(&document)) |
| 1589 registry->didRemoveEventHandler(document, EventHandlerRegistry::WheelEve
nt); | 1589 registry->didRemoveEventHandler(document, EventHandlerRegistry::WheelEve
nt); |
| 1590 } | 1590 } |
| 1591 | 1591 |
| 1592 PagePopup* WebViewImpl::openPagePopup(PagePopupClient* client, const IntRect& or
iginBoundsInRootView) | 1592 PagePopup* WebViewImpl::openPagePopup(PagePopupClient* client) |
| 1593 { | 1593 { |
| 1594 ASSERT(client); | 1594 ASSERT(client); |
| 1595 if (hasOpenedPopup()) | 1595 if (hasOpenedPopup()) |
| 1596 hidePopups(); | 1596 hidePopups(); |
| 1597 ASSERT(!m_pagePopup); | 1597 ASSERT(!m_pagePopup); |
| 1598 | 1598 |
| 1599 WebWidget* popupWidget = m_client->createPopupMenu(WebPopupTypePage); | 1599 WebWidget* popupWidget = m_client->createPopupMenu(WebPopupTypePage); |
| 1600 ASSERT(popupWidget); | 1600 ASSERT(popupWidget); |
| 1601 m_pagePopup = toWebPagePopupImpl(popupWidget); | 1601 m_pagePopup = toWebPagePopupImpl(popupWidget); |
| 1602 if (!m_pagePopup->initialize(this, client, originBoundsInRootView)) { | 1602 if (!m_pagePopup->initialize(this, client)) { |
| 1603 m_pagePopup->closePopup(); | 1603 m_pagePopup->closePopup(); |
| 1604 m_pagePopup = nullptr; | 1604 m_pagePopup = nullptr; |
| 1605 } | 1605 } |
| 1606 return m_pagePopup.get(); | 1606 return m_pagePopup.get(); |
| 1607 } | 1607 } |
| 1608 | 1608 |
| 1609 void WebViewImpl::closePagePopup(PagePopup* popup) | 1609 void WebViewImpl::closePagePopup(PagePopup* popup) |
| 1610 { | 1610 { |
| 1611 ASSERT(popup); | 1611 ASSERT(popup); |
| 1612 WebPagePopupImpl* popupImpl = toWebPagePopupImpl(popup); | 1612 WebPagePopupImpl* popupImpl = toWebPagePopupImpl(popup); |
| (...skipping 3006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4619 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4619 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4620 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4620 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4621 } | 4621 } |
| 4622 | 4622 |
| 4623 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4623 void WebViewImpl::forceNextWebGLContextCreationToFail() |
| 4624 { | 4624 { |
| 4625 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4625 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
| 4626 } | 4626 } |
| 4627 | 4627 |
| 4628 } // namespace blink | 4628 } // namespace blink |
| OLD | NEW |