Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 23592015: Use constrained values for shouldDisableDesktopWorkarounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Yet another comment fix Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/web/tests/WebFrameTest.cpp » ('j') | Source/web/tests/data/disambiguation_popup_viewport_site.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698