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 4088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4099 const WebMouseEvent& mouseEvent = static_cast<const WebMouseEvent&>(event); | 4099 const WebMouseEvent& mouseEvent = static_cast<const WebMouseEvent&>(event); |
4100 | 4100 |
4101 if (page()) | 4101 if (page()) |
4102 page()->pointerLockController().dispatchLockedMouseEvent( | 4102 page()->pointerLockController().dispatchLockedMouseEvent( |
4103 PlatformMouseEventBuilder(mainFrameImpl()->frameView(), mouseEvent), | 4103 PlatformMouseEventBuilder(mainFrameImpl()->frameView(), mouseEvent), |
4104 eventType); | 4104 eventType); |
4105 } | 4105 } |
4106 | 4106 |
4107 bool WebViewImpl::shouldDisableDesktopWorkarounds() | 4107 bool WebViewImpl::shouldDisableDesktopWorkarounds() |
4108 { | 4108 { |
4109 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport
Arguments(); | 4109 if (!settings()->viewportEnabled() || !isFixedLayoutModeEnabled()) |
4110 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments.
userZoom | 4110 return false; |
4111 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp
ortArguments::ValueAuto); | 4111 |
| 4112 // A document is considered adapted to small screen UAs if one of these hold
s: |
| 4113 // 1. The author specified viewport has a constrained width that is equal to |
| 4114 // the initial viewport width. |
| 4115 // 2. The author has disabled viewport zoom. |
| 4116 |
| 4117 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4118 |
| 4119 return fixedLayoutSize().width == m_size.width |
| 4120 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4112 } | 4121 } |
4113 | 4122 |
4114 } // namespace WebKit | 4123 } // namespace WebKit |
OLD | NEW |