| 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 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1587 | 1587 |
| 1588 Frame* WebViewImpl::focusedWebCoreFrame() const | 1588 Frame* WebViewImpl::focusedWebCoreFrame() const |
| 1589 { | 1589 { |
| 1590 return m_page ? m_page->focusController().focusedOrMainFrame() : 0; | 1590 return m_page ? m_page->focusController().focusedOrMainFrame() : 0; |
| 1591 } | 1591 } |
| 1592 | 1592 |
| 1593 WebViewImpl* WebViewImpl::fromPage(Page* page) | 1593 WebViewImpl* WebViewImpl::fromPage(Page* page) |
| 1594 { | 1594 { |
| 1595 if (!page) | 1595 if (!page) |
| 1596 return 0; | 1596 return 0; |
| 1597 | 1597 return static_cast<WebViewImpl*>(page->chrome().client().webView()); |
| 1598 ChromeClientImpl* chromeClient = static_cast<ChromeClientImpl*>(page->chrome
().client()); | |
| 1599 return static_cast<WebViewImpl*>(chromeClient->webView()); | |
| 1600 } | 1598 } |
| 1601 | 1599 |
| 1602 // WebWidget ------------------------------------------------------------------ | 1600 // WebWidget ------------------------------------------------------------------ |
| 1603 | 1601 |
| 1604 void WebViewImpl::close() | 1602 void WebViewImpl::close() |
| 1605 { | 1603 { |
| 1606 if (m_page) { | 1604 if (m_page) { |
| 1607 // Initiate shutdown for the entire frameset. This will cause a lot of | 1605 // Initiate shutdown for the entire frameset. This will cause a lot of |
| 1608 // notifications to be sent. | 1606 // notifications to be sent. |
| 1609 if (m_page->mainFrame()) | 1607 if (m_page->mainFrame()) |
| (...skipping 2498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4108 } | 4106 } |
| 4109 | 4107 |
| 4110 bool WebViewImpl::shouldDisableDesktopWorkarounds() | 4108 bool WebViewImpl::shouldDisableDesktopWorkarounds() |
| 4111 { | 4109 { |
| 4112 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport
Arguments(); | 4110 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport
Arguments(); |
| 4113 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments.
userZoom | 4111 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments.
userZoom |
| 4114 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp
ortArguments::ValueAuto); | 4112 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp
ortArguments::ValueAuto); |
| 4115 } | 4113 } |
| 4116 | 4114 |
| 4117 } // namespace WebKit | 4115 } // namespace WebKit |
| OLD | NEW |