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 4097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4108 } | 4108 } |
4109 | 4109 |
4110 const WebMouseEvent& mouseEvent = static_cast<const WebMouseEvent&>(event); | 4110 const WebMouseEvent& mouseEvent = static_cast<const WebMouseEvent&>(event); |
4111 | 4111 |
4112 if (page()) | 4112 if (page()) |
4113 page()->pointerLockController().dispatchLockedMouseEvent( | 4113 page()->pointerLockController().dispatchLockedMouseEvent( |
4114 PlatformMouseEventBuilder(mainFrameImpl()->frameView(), mouseEvent), | 4114 PlatformMouseEventBuilder(mainFrameImpl()->frameView(), mouseEvent), |
4115 eventType); | 4115 eventType); |
4116 } | 4116 } |
4117 | 4117 |
4118 bool WebViewImpl::shouldDisableDesktopWorkarounds() | 4118 bool WebViewImpl::shouldDisableDesktopWorkarounds() |
kenneth.r.christiansen
2013/08/29 13:35:55
If these are quirks, should we suffix the methods
rune
2013/08/29 13:57:53
You mean negate it and call it shouldApplyDesktopW
aelias_OOO_until_Jul13
2013/08/29 18:29:35
It's used to decide whether to trigger Chromium's
| |
4119 { | 4119 { |
4120 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments(); | 4120 if (!settings()->viewportEnabled() || !isFixedLayoutModeEnabled()) |
4121 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom | 4121 return false; |
4122 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto); | 4122 |
4123 // A document is considered adapted to small screen UAs if one of these hold s: | |
4124 // 1. The author specified viewport has a constrained width that is equal to | |
4125 // the initial viewport width. | |
4126 // 2. The author has disabled viewport zoom. | |
4127 | |
4128 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); | |
4129 | |
4130 return fixedLayoutSize().width == m_size.width | |
4131 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); | |
4123 } | 4132 } |
4124 | 4133 |
4125 } // namespace WebKit | 4134 } // namespace WebKit |
OLD | NEW |