Event regions weren't in a workable state prior to this. They were already stored relative to the reference frame, but in layer pixels.
Inside inactive layer managers the scale is always 1 regardless of the scale on the containing thebes layer (which is the scale it will actually be drawn at), and so the event regions did not take into account scale in this situation.
Storing the regions in appunits relative to the reference frame means we can just transform to the new reference frame (if it is different) when passing event regions up and out of inactive layer managers. The proper scale will be applied when we apply the event regions to the layer.
Now that animations and transitions are largely treated alike, we can remove
some redundant code in the processing of transform animations in
ComputeSuitableScaleForAnimation.
This patch replaces all references to ElementTransitions (now that it is empty)
with references to the base class, CommonElementAnimationData. It also takes the
opportunity to tidy up some of the call sites in nsLayoutUtils since they no
longer need to differentiate between animations and transitions.
This patch still leaves ElementAnimations|
ElementTransitions::GetAnimationsForCompositor as shortcuts
for the method now defined on CommonElementAnimationData.
This patch moves HasAnimationOfProperty to CommonElementAnimationData. It also
takes the chance to start removing some redundancy from nsLayoutUtils
/ ActiveLayerTracker. Some of this should never have been added in the first
place and some could have been removed earlier on but while we're fixing up
HasAnimationOfProperty it seems like an appropriate time to fix up its call
sites too.
Also, since HasAnimationOrTransition actually returns an object, not a bool, we
this patch renames it to GetAnimationsOrTransitions.
One of the main differences in handling a list of transitions vs a list of
regular animations is that when we are dealing with a list of transitions we
need to check for transitions that have finished and are about to be discarded
but need to be retained temporarily to provide correct triggering of subsequent
transitions. Such transitions are marked as "removed sentinels" and are ignored
for most operations.
This patch moves the methods for setting and checking such transitions to the
base class ElementAnimation so that we can treat animations and transitions
alike without having to downcast or do obscure checks for mStartTime.IsNull()
(which equates to checking if the animation is a "removed sentinel" but is not
particularly clear).
In the process, this patch renames said methods to Is/SetFinishedTransition
since hopefully that is a little easier to understand at a glance.
This patch is the first part in preparing the way to merge ElementTransitions
with CommonElementAnimationData (which we'll eventually rename to something
nicer).
Here we move mTiming from CommonElementAnimationData to the AnimationTiming
struct. While this is not strictly necessary in order to do the later
refactoring it makes it simpler since it:
- Divides time calculation into calculation based on dynamic play state (the
responsibility of animation players in Web Animations terms) and static
author-specified timing parameters (a property of animations in Web Animations
terms).
- In future we will probably put animations on the compositor during their
delay phase so we will want the delay to be present in the AnimationTiming
struct then.
- Makes AnimationTiming line up with the dictionary of the same name in Web
Animations.
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.
For touch events generated by marionette, the touch id is not started
from 0. Therefore, instead of getting the event position of touch id 0
directly in HandleTouchDownEvent(), we should loop over all the touch
ids to get their positions.
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
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 adds a timeStamp member to WidgetEvent alongside the existing 'time'
member. In the future we would like to remove 'time' and just keep timeStamp but
that depends on it being web-compatible. For now we introduce both members
side-by-side. Later we will add a pref to determine which one to return. If no
compatibility issues arise we will remove 'time' altogether.