mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
246163150b
Chrome and Safari move selection at middle button down and does not modify the range at middle button up. However, they handle middle button down with `Shift` key is "continue selection". So, we should handle selection in nsIFrame when `mousedown` event for middle mouse button is fired, but ignore multiple selection, drag and drop and maintaining selection for aligning the behavior to the other browsers. This patch splits `nsIFrame::HandlePress()` and calls new method which moves selection from `nsIFrame::HandleEvent()` when middle button is pressed. (Note that this patch does not check whether middle click paste is enabled because Chrome moves selection even on Windows which Chrome always disable middle click paste on.) With this change, "paste" event target is changed. Previously, we used target of the preceding `mouseup` event, but we start to use the target of the preceding `mousedown` event. Note that even with this patch, we still behave differently from Chrome even in the following cases: - middle mouse button down in selected range, we collapse it, but Chrome keeps the selection. - middle mouse button click in selected range, we dispatch "paste" event, but Chrome collapse selection and not dispatch "paste" event. - middle mouse button down in selected range and up in different element, Chrome does not modify the range nor dispatch "paste" event. - Shift + middle mouse button in editable `<table>` works as non-editable in Chrome, but our editor handles it with special path. Therefore, we don't modify the range but dispatch "paste" event in the selected range. Changing them requires bigger change and probably requires some other features' behavior changes. Therefore, we shouldn't touch these issues until they are actually reported as web-compat issues. Differential Revision: https://phabricator.services.mozilla.com/D103997 |
||
---|---|---|
.cargo | ||
.vscode | ||
accessible | ||
browser | ||
build | ||
caps | ||
chrome | ||
config | ||
devtools | ||
docs | ||
docshell | ||
dom | ||
editor | ||
extensions | ||
gfx | ||
gradle/wrapper | ||
hal | ||
image | ||
intl | ||
ipc | ||
js | ||
layout | ||
media | ||
memory | ||
mfbt | ||
mobile | ||
modules | ||
mozglue | ||
netwerk | ||
nsprpub | ||
other-licenses | ||
parser | ||
python | ||
remote | ||
security | ||
services | ||
servo | ||
startupcache | ||
storage | ||
taskcluster | ||
testing | ||
third_party | ||
toolkit | ||
tools | ||
uriloader | ||
view | ||
widget | ||
xpcom | ||
xpfe/appshell | ||
.arcconfig | ||
.babel-eslint.rc.js | ||
.clang-format | ||
.clang-format-ignore | ||
.cron.yml | ||
.eslintignore | ||
.eslintrc.js | ||
.flake8 | ||
.git-blame-ignore-revs | ||
.gitattributes | ||
.gitignore | ||
.hg-annotate-ignore-revs | ||
.hg-format-source | ||
.hgignore | ||
.hgtags | ||
.lldbinit | ||
.mailmap | ||
.prettierignore | ||
.prettierrc | ||
.taskcluster.yml | ||
.trackerignore | ||
.yamllint | ||
.ycm_extra_conf.py | ||
aclocal.m4 | ||
AUTHORS | ||
build.gradle | ||
Cargo.lock | ||
Cargo.toml | ||
client.mk | ||
client.py | ||
CLOBBER | ||
configure.in | ||
configure.py | ||
GNUmakefile | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
LICENSE | ||
mach | ||
mach.ps1 | ||
Makefile.in | ||
moz.build | ||
moz.configure | ||
mozilla-config.h.in | ||
old-configure.in | ||
package-lock.json | ||
package.json | ||
README.txt | ||
settings.gradle | ||
substitute-local-geckoview.gradle | ||
test.mozbuild |
An explanation of the Firefox Source Code Directory Structure and links to project pages with documentation can be found at: https://firefox-source-docs.mozilla.org/contributing/directory_structure.html For information on how to build Firefox from the source code and create the patch see: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html If you have a question about developing Firefox, and can't find the solution on https://firefox-source-docs.mozilla.org/, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel. Nightly development builds can be downloaded from: https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/ - or - https://www.mozilla.org/firefox/channel/desktop/#nightly Keep in mind that nightly builds, which are used by Firefox developers for testing, may be buggy.