The -*- file variable lines -*- establish per-file settings that Emacs will
pick up. This patch makes the following changes to those lines (and touches
nothing else):
- Never set the buffer's mode.
Years ago, Emacs did not have a good JavaScript mode, so it made sense
to use Java or C++ mode in .js files. However, Emacs has had js-mode for
years now; it's perfectly serviceable, and is available and enabled by
default in all major Emacs packagings.
Selecting a mode in the -*- file variable line -*- is almost always the
wrong thing to do anyway. It overrides Emacs's default choice, which is
(now) reasonable; and even worse, it overrides settings the user might
have made in their '.emacs' file for that file extension. It's only
useful when there's something specific about that particular file that
makes a particular mode appropriate.
- Correctly propagate settings that establish the correct indentation
level for this file: c-basic-offset and js2-basic-offset should be
js-indent-level. Whatever value they're given should be preserved;
different parts of our tree use different indentation styles.
- We don't use tabs in Mozilla JS code. Always set indent-tabs-mode: nil.
Remove tab-width: settings, at least in files that don't contain tab
characters.
- Remove js2-mode settings that belong in the user's .emacs file, like
js2-skip-preprocessor-directives.
Set search timeout to 30 seconds so that box0 could have enough time to
appear. The original timeout 3 seconds might be too short when try
servers have heavy loading.
On Windows, when selecting a word by long pressing, extra spaces after
the word will also be selected. To solve this problem, I redesign the
test cases by comparing the target content with the selected content
directly while ignoring spaces at certain test cases. I believe it's
easier to understand and less error-prone than the old
replace-selected-content-and-compare way.
I added a new method SelectionManager.selected_content() to make it
easier to get the current selected text.
Add marionette test cases for selection carets feature in bug 987718.
Test cases target <input>, <textarea>, editable and non-editable
elements.
Run tests on browser manually:
./mach marionette-test layout/base/tests/marionette/test_seletioncarets.py
Run tests on b2g emulator manually:
./mach marionette-webapi layout/base/tests/marionette/test_seletioncarets.py
* Extract those caret manipulating functions in test_touchcaret.py to
selection.py, and generalize them for manipulating selection.
* Use SelectionManager in test_touchcaret.py.
* Remove unneeded </input> from test_touchcaret.html.
Add marionette test cases for touch caret feature in bug 924692. Test
cases cover <input>, <textarea>, and contenteditable elements with
touch caret enabled and disabled.
Enlarge touch caret expiration time to 60 seconds to avoid intermittent
test failures in test cases which need to move touch caret.
Thanks Phoebe Chang <natsuki011077@gmail.com> for the WIP patch.
Thanks C.J. Ku <cku@mozilla.com> for various suggestions.
Run tests on browser manually:
./mach marionette-test layout/base/tests/marionette/test_touchcaret.py
* Action.long_press() now accepts optional parameters x and y as
Action.press() does.
* Add test cases in test_single_finger.py and
test_single_finger_desktop.py.
Add marionette test cases for touch caret feature in bug 924692. Test
cases cover <input>, <textarea>, and contenteditable elements with
touch caret enabled and disabled.
Thanks Phoebe Chang <natsuki011077@gmail.com> for the WIP patch.
Thanks C.J. Ku <cku@mozilla.com> for various suggestions.
Run tests on browser manually:
./mach marionette-test layout/base/tests/marionette/test_touchcaret.py
Add marionette test cases for touch caret feature in bug 924692. Test
cases cover <input>, <textarea>, and contenteditable elements with
touch caret enabled and disabled.
Thanks Phoebe Chang <natsuki011077@gmail.com> for the WIP patch.
Thanks C.J. Ku <cku@mozilla.com> for various suggestions.
Run tests on browser manually:
./mach marionette-test layout/base/tests/marionette/test_touchcaret.py
This allows HTMLElement.send_keys() to insert text after the caret in
<input>.
Also, fix the test cast fail in test_text.py due to caret position was
not being considered.