mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1165128 - Enable zoomedview by default. r=mcomella
This commit is contained in:
parent
e39ce9480f
commit
678e6dea01
@ -76,7 +76,7 @@ struct EventRadiusPrefs
|
||||
bool mRegistered;
|
||||
bool mTouchOnly;
|
||||
bool mRepositionEventCoords;
|
||||
bool mTouchClusterDetection;
|
||||
bool mTouchClusterDetectionDisabled;
|
||||
uint32_t mLimitReadableSize;
|
||||
};
|
||||
|
||||
@ -125,8 +125,8 @@ GetPrefsFor(EventClassID aEventClassID)
|
||||
nsPrintfCString repositionPref("ui.%s.radius.reposition", prefBranch);
|
||||
Preferences::AddBoolVarCache(&prefs->mRepositionEventCoords, repositionPref.get(), false);
|
||||
|
||||
nsPrintfCString touchClusterPref("ui.zoomedview.enabled", prefBranch);
|
||||
Preferences::AddBoolVarCache(&prefs->mTouchClusterDetection, touchClusterPref.get(), false);
|
||||
nsPrintfCString touchClusterPref("ui.zoomedview.disabled", prefBranch);
|
||||
Preferences::AddBoolVarCache(&prefs->mTouchClusterDetectionDisabled, touchClusterPref.get(), true);
|
||||
|
||||
nsPrintfCString limitReadableSizePref("ui.zoomedview.limitReadableSize", prefBranch);
|
||||
Preferences::AddUintVarCache(&prefs->mLimitReadableSize, limitReadableSizePref.get(), 8);
|
||||
@ -396,7 +396,7 @@ GetClosest(nsIFrame* aRoot, const nsPoint& aPointRelativeToRootFrame,
|
||||
static bool
|
||||
IsElementClickableAndReadable(nsIFrame* aFrame, WidgetGUIEvent* aEvent, const EventRadiusPrefs* aPrefs)
|
||||
{
|
||||
if (!aPrefs->mTouchClusterDetection) {
|
||||
if (aPrefs->mTouchClusterDetectionDisabled) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -487,7 +487,7 @@ FindFrameTargetedByInputEvent(WidgetGUIEvent* aEvent,
|
||||
GetClosest(aRootFrame, aPointRelativeToRootFrame, targetRect, prefs,
|
||||
restrictToDescendants, candidates, &elementsInCluster);
|
||||
if (closestClickable) {
|
||||
if ((prefs->mTouchClusterDetection && elementsInCluster > 1) ||
|
||||
if ((!prefs->mTouchClusterDetectionDisabled && elementsInCluster > 1) ||
|
||||
(!IsElementClickableAndReadable(closestClickable, aEvent, prefs))) {
|
||||
if (aEvent->mClass == eMouseEventClass) {
|
||||
WidgetMouseEventBase* mouseEventBase = aEvent->AsMouseEventBase();
|
||||
|
@ -403,7 +403,7 @@ pref("font.size.inflation.minTwips", 0);
|
||||
// When true, zooming will be enabled on all sites, even ones that declare user-scalable=no.
|
||||
pref("browser.ui.zoom.force-user-scalable", false);
|
||||
|
||||
pref("ui.zoomedview.enabled", false);
|
||||
pref("ui.zoomedview.disabled", false);
|
||||
pref("ui.zoomedview.limitReadableSize", 8); // value in layer pixels
|
||||
|
||||
pref("ui.touch.radius.enabled", false);
|
||||
|
Loading…
Reference in New Issue
Block a user