mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 707734 - Disable 'click and drag' text selection in nsFrame.cpp for touch enable devices r=roc
This commit is contained in:
parent
4688078712
commit
b7fb6ad80f
@ -52,6 +52,9 @@ pref("browser.viewport.scaleRatio", -1);
|
||||
/* allow scrollbars to float above chrome ui */
|
||||
pref("ui.scrollbarsCanOverlapContent", 1);
|
||||
|
||||
/* disable text selection */
|
||||
pref("browser.ignoreNativeFrameTextSelection", true);
|
||||
|
||||
/* cache prefs */
|
||||
pref("browser.cache.disk.enable", false);
|
||||
pref("browser.cache.disk.capacity", 0); // kilobytes
|
||||
|
@ -2444,14 +2444,14 @@ nsFrame::HandlePress(nsPresContext* aPresContext,
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
if (me->isControl)
|
||||
return NS_OK;//short ciruit. hard coded for mac due to time restraints.
|
||||
return NS_OK;//short circuit. hard coded for mac due to time restraints.
|
||||
bool control = me->isMeta;
|
||||
#else
|
||||
bool control = me->isControl;
|
||||
#endif
|
||||
|
||||
nsRefPtr<nsFrameSelection> fc = const_cast<nsFrameSelection*>(frameselection);
|
||||
if (me->clickCount >1 )
|
||||
if (me->clickCount > 1)
|
||||
{
|
||||
// These methods aren't const but can't actually delete anything,
|
||||
// so no need for nsWeakFrame.
|
||||
@ -2466,6 +2466,14 @@ nsFrame::HandlePress(nsPresContext* aPresContext,
|
||||
if (!offsets.content)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// On touchables devices, touch the screen is usually a pan action,
|
||||
// so let reposition the caret if needed but do not select text
|
||||
if (Preferences::GetBool("browser.ignoreNativeFrameTextSelection", false)) {
|
||||
return fc->HandleClick(offsets.content, offsets.StartOffset(),
|
||||
offsets.EndOffset(), false, false,
|
||||
offsets.associateWithNext);
|
||||
}
|
||||
|
||||
// Let Ctrl/Cmd+mouse down do table selection instead of drag initiation
|
||||
nsCOMPtr<nsIContent>parentContent;
|
||||
PRInt32 contentOffset;
|
||||
|
Loading…
Reference in New Issue
Block a user