This removes the duplication where AddAnimationsForProperty calls
HasAnimationOfProperty which goes over the list once, and then
AddAnimationForProperty searches the list again and skips all but the
item found before.
It also makes it easier, in patch 7, to perform additional tests on the
item that we found.
After double-clicking to select a word on browser, we cannot drag caret
to change the selection within a word. We should clear the maintained
selection.
When dragging the second caret (eDirNext) over non-selectable elements,
the last range is not generated. Therefore when dragging the first
caret, we will change the selection direction to eDirPrevious, the last
range will be excluded by AutoPrepareFocusRange.
We add a new function to adjust generated bit and anchor focus range
after changing selection direction.
The original test had dragged the second SelectionCaret over
non-selectable elements. After that, we should further drag the first
SelectionCaret over non-selectable elements, and confirm that the
selection ranges are correct.
This removes the duplication where AddAnimationsForProperty calls
HasAnimationOfProperty which goes over the list once, and then
AddAnimationForProperty searches the list again and skips all but the
item found before.
It also makes it easier, in patch 7, to perform additional tests on the
item that we found.
Note that this adds a parameter to the callback function so that we can
keep track of which canvas is for the test and which is for the
reference; previously we didn't care.
It also puts testfile and reffile in local variables so that they can be
reused, and then appends the extra bidi numeral information to reffile
when calling assertSnapshots so that the messages contain the same (or
more) data as before.
This adds support for class="reftest-opaque-layer" and for
reftest-assigned-layer="some-layer-name" to the reftest harness.
From reftest/README.txt:
Opaque Layer Tests: class="reftest-opaque-layer"
================================================
If an element should be assigned to a PaintedLayer that's opaque, set the class
"reftest-opaque-layer" on it. This checks whether the layer is opaque during
the last paint of the test, and it works whether your test is an invalidation
test or not. In order to pass the test, the element has to have a primary
frame, and that frame's display items must all be assigned to a single painted
layer and no other layers, so it can't be used on elements that create stacking
contexts (active or inactive).
Layerization Tests: reftest-assigned-layer="layer-name"
=======================================================
If two elements should be assigned to the same PaintedLayer, choose any string
value as the layer name and set the attribute reftest-assigned-layer="yourname"
on both elements. Reftest will check whether all elements with the same
reftest-assigned-layer value share the same layer. It will also test whether
elements with different reftest-assigned-layer values are assigned to different
layers.
The same restrictions as with class="reftest-opaque-layer" apply: All elements
must have a primary frame, and that frame's display items must all be assigned
to the same PaintedLayer and no other layers. If these requirements are not
met, the test will fail.