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 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1589 { | 1589 { |
1590 ASSERT(popup); | 1590 ASSERT(popup); |
1591 WebPagePopupImpl* popupImpl = toWebPagePopupImpl(popup); | 1591 WebPagePopupImpl* popupImpl = toWebPagePopupImpl(popup); |
1592 ASSERT(m_pagePopup.get() == popupImpl); | 1592 ASSERT(m_pagePopup.get() == popupImpl); |
1593 if (m_pagePopup.get() != popupImpl) | 1593 if (m_pagePopup.get() != popupImpl) |
1594 return; | 1594 return; |
1595 m_pagePopup->closePopup(); | 1595 m_pagePopup->closePopup(); |
1596 m_pagePopup = nullptr; | 1596 m_pagePopup = nullptr; |
1597 } | 1597 } |
1598 | 1598 |
| 1599 LocalDOMWindow* WebViewImpl::pagePopupWindow() |
| 1600 { |
| 1601 return m_pagePopup ? m_pagePopup->window() : nullptr; |
| 1602 } |
| 1603 |
1599 Frame* WebViewImpl::focusedCoreFrame() const | 1604 Frame* WebViewImpl::focusedCoreFrame() const |
1600 { | 1605 { |
1601 return m_page ? m_page->focusController().focusedOrMainFrame() : 0; | 1606 return m_page ? m_page->focusController().focusedOrMainFrame() : 0; |
1602 } | 1607 } |
1603 | 1608 |
1604 WebViewImpl* WebViewImpl::fromPage(Page* page) | 1609 WebViewImpl* WebViewImpl::fromPage(Page* page) |
1605 { | 1610 { |
1606 if (!page) | 1611 if (!page) |
1607 return 0; | 1612 return 0; |
1608 return static_cast<WebViewImpl*>(page->chrome().client().webView()); | 1613 return static_cast<WebViewImpl*>(page->chrome().client().webView()); |
(...skipping 2819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4428 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4433 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4429 | 4434 |
4430 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4435 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4431 return false; | 4436 return false; |
4432 | 4437 |
4433 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4438 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4434 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4439 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4435 } | 4440 } |
4436 | 4441 |
4437 } // namespace blink | 4442 } // namespace blink |
OLD | NEW |