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
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 patch adjusts GetComputedTimingAt to set the time fraction and current
iteration fields of the output computed timing correctly for animations with
zero iteration duration. Care must be taken to handle cases such as animations
that have zero duration but repeat infinitely.
The code is significantly re-arranged to more closely align with the naming and
algorithms defined in Web Animations.
A couple of tests in test_animations.html have been tweaked to account for
floating-point error. This is not because the new code is less precise but
actually the opposite. These tests fall on the transition point of step-timing
functions. The new code uses the closest possible floating-point representation
of these times which happens to cause them to fall on the opposite side of the
transition point.
For example, in evaluating a point 3s into a reversed interval the old code
would give us an intermediate time fraction of:
0.29999999999999982
When we reverse that by subtracting from 1.0 we get: 0.70000000000000018
With the code in this patch we get an intermediate time fraction of:
0.29999999999999999
When we reverse that by subtracting from 1.0 we get: 0.69999999999999996
Hence we fall on the opposite side of the transition boundary.
This patch also makes ElementAnimation::ActiveDuration a static method that
takes timing parameters as an argument. This is so that this method can be
used within ElementAnimations::GetComputedTimingAt (a static method) in a
future patch.
We could also make ActiveDuration() a method of AnimationTiming. I suspect
this logic belongs together in ElementAnimation however.
In a future patch we could also add the active duration to the ComputedTiming
struct which would simplify the only other place this is currently used
which is ElementAnimations::GetEventsAt.