| 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 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1533 return static_cast<WebViewImpl*>(page->chrome().client().webView()); | 1533 return static_cast<WebViewImpl*>(page->chrome().client().webView()); |
| 1534 } | 1534 } |
| 1535 | 1535 |
| 1536 // WebWidget ------------------------------------------------------------------ | 1536 // WebWidget ------------------------------------------------------------------ |
| 1537 | 1537 |
| 1538 void WebViewImpl::close() | 1538 void WebViewImpl::close() |
| 1539 { | 1539 { |
| 1540 if (m_page) { | 1540 if (m_page) { |
| 1541 // Initiate shutdown for the entire frameset. This will cause a lot of | 1541 // Initiate shutdown for the entire frameset. This will cause a lot of |
| 1542 // notifications to be sent. | 1542 // notifications to be sent. |
| 1543 // FIXME: This is redundant with willBeDestroyed()... is this really | |
| 1544 // needed? | |
| 1545 if (m_page->mainFrame()->isLocalFrame()) | |
| 1546 m_page->deprecatedLocalMainFrame()->loader().frameDetached(); | |
| 1547 | |
| 1548 m_page->willBeDestroyed(); | 1543 m_page->willBeDestroyed(); |
| 1549 m_page.clear(); | 1544 m_page.clear(); |
| 1550 } | 1545 } |
| 1551 | 1546 |
| 1552 // Should happen after m_page.clear(). | 1547 // Should happen after m_page.clear(). |
| 1553 if (m_devToolsAgent) | 1548 if (m_devToolsAgent) |
| 1554 m_devToolsAgent.clear(); | 1549 m_devToolsAgent.clear(); |
| 1555 | 1550 |
| 1556 // Reset the delegate to prevent notifications being sent as we're being | 1551 // Reset the delegate to prevent notifications being sent as we're being |
| 1557 // deleted. | 1552 // deleted. |
| (...skipping 2585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4143 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4138 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4144 | 4139 |
| 4145 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4140 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4146 return false; | 4141 return false; |
| 4147 | 4142 |
| 4148 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4143 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4149 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4144 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4150 } | 4145 } |
| 4151 | 4146 |
| 4152 } // namespace blink | 4147 } // namespace blink |
| OLD | NEW |