These wpt tests are using the wrong ref html which always assume the cue should be on the bottom of the video element.
According to the spec, the result of cue's position is calulated by rendering area and it won't always be on the bottom of the video.
Differential Revision: https://phabricator.services.mozilla.com/D20029
--HG--
extra : moz-landing-system : lando
There is no need to have an anonymous function after we replace all `var` to `let`, now those variables won't pollute outer scopes.
Differential Revision: https://phabricator.services.mozilla.com/D20028
--HG--
extra : moz-landing-system : lando
In order to keep the local variable only visible inside the function scope, we should only use 'let' for those variables.
Differential Revision: https://phabricator.services.mozilla.com/D20027
--HG--
extra : moz-landing-system : lando
Remove those funcitons which are used to implement the previous way to move the cue box.
Differential Revision: https://phabricator.services.mozilla.com/D19610
--HG--
extra : moz-landing-system : lando
According to the spec 7.2.10, step1 to step10 (snap-to-line is true) and step1 to step2 (snap-to-line is flase) [1], we would adjust cue box's position depending on the algorithm.
The algorithm would calculate the cue box's top (or left) position depending on the writing direction, and move the box to the specific position.
However, if the cue box is overlapping with other cue boxes in the rendering area, we would still need to adjust its postion, which will be implemented in next patch.
[1]
https://w3c.github.io/webvtt/#ref-for-webvtt-cue-snap-to-lines-flag-12https://w3c.github.io/webvtt/#ref-for-webvtt-cue-snap-to-lines-flag-13
Differential Revision: https://phabricator.services.mozilla.com/D19609
--HG--
extra : moz-landing-system : lando
It's confused that we have both simpleBoxPosition object and BoxPosition object, we should only use one format to perform all box related operations.
Therefore, BoxPosition should be able to be initiaized by StyleBox, HTMLElement or BoxPosition.
In addition, as `right` and `bottom` can be calculated from other attributes, we remove these two attributes from BoxPosition, and use getter to get the correct value, which can reduce some unnessary modification when we changes the `height` or `width`. In order to implement a more readable getter, so we change `BoxPosition` to class-based.
Differential Revision: https://phabricator.services.mozilla.com/D22809
--HG--
extra : moz-landing-system : lando
When calculating font size, we should use the original bounding box as a reference, or it would cause incorrect font size scale.
Differential Revision: https://phabricator.services.mozilla.com/D20026
--HG--
extra : moz-landing-system : lando
Android P has a lot of Noto Serif and Noto Sans fonts for several languages.
So we should use it to default font list.
Differential Revision: https://phabricator.services.mozilla.com/D23626
--HG--
extra : moz-landing-system : lando
We've ignored clauses whose visual styles are not specified.
However, kinput2 with XIM protocol does not specify any styles
to non-selected clauses. Therefore, we fail to dispatch
eCompositionChange events if there is 2 or more clauses.
Note that the log in the bug indicates that we may set
selected clause type to`TextRangeType::eConvertedClause` and
last clause type to `TextRangeType::eSelectedClause` because
caret is always put at end of composition string. However,
this should not problem for now because nobody except plugins
on Windows refer this information.
Differential Revision: https://phabricator.services.mozilla.com/D23464
--HG--
extra : moz-landing-system : lando
The only time that the ancestor spatial node index is read is
during push_stacking_context. This means that even if it was
used as an ancestor for a 3d context, we can safely collapse
it in to the parent stacking context during flattening, if it
is otherwise redundant.
This is a partial fix for picture caching heuristics failing
with the display list produced on mobile devices.
Differential Revision: https://phabricator.services.mozilla.com/D23633
--HG--
extra : moz-landing-system : lando
When close to int64_t's limit, the int64 can't be precisely converted to
double because of rounding error, rounding-up is also allowed. To ensure
a double `d` is within int64's limit, we should check
`d < std::numeric_limits<int64_t>::max()`, instead of `<=`.
Because `std::numeric_limits<int64_t>::max()` might be converted to a larger
double, when they are equal, we can't be sure if `d` is indeed within the actual
int64 limit.
Differential Revision: https://phabricator.services.mozilla.com/D23680
--HG--
extra : moz-landing-system : lando
`Selection::Extend()` is too slow but editor and ContentEventHandler use it in
some places. We should make them use `Selection::SetStartAndEndInLimiter()` or
`Selection::SetBaseAndExtentInLimiter()`. The former is usable only when caller
guarantees the start point is prior to the end point in the DOM tree.
Otherwise, we need to use the latter even though it's slower than the former.
Differential Revision: https://phabricator.services.mozilla.com/D23462
--HG--
extra : moz-landing-system : lando
`EditorBase::SelectEntierDocument()` uses `Selection::Extend()` but it's too
slow. It should use `Selection::SetStartAndEndInLimiter()` instead.
Additionally, `TextEditor::SelectEntierDocument()` shrink the result of
`EditorBase::SelectEntierDocument()` with `Selection::Extend()` if there is
a `moz-<br>` element. So, `TextEditor::SelectEntinerDocument()` should set
its expected selection with a call for saving the runtime cost.
Then, we don't need to make `EditorBase::SelectEntierDocument()` as non-pure
virtual method. So, this patch makes each its callers call
`Selection->SelectAllChildren()` directly.
Differential Revision: https://phabricator.services.mozilla.com/D23461
--HG--
extra : moz-landing-system : lando
`Selection::Extend()` is too slow because:
- it may create some `nsRange` instances.
- it users `nsContentUtils::ComparePoints()` multiple times.
Therefore, we can improve the performance if we can stop using it in some
places. First, this patch creates `Selection::SetStartAndEnd()` and
`Selection::SetStartAndEndInLimiter()` for internal use. They remove
current ranges, reuse `nsRange` instance as far as possible and add new
range which is set by their arguments. Then, this patch makes
`Selection::SelectAllChildren()` stop using `Selection::Extend()`. At this
time, this fixes a web-compat issue. `Selection::Expand()` cannot cross the
selection limiter boundary when there is a limiter (e.g., when an editing host
has focus). But we can now fix this with using the new internal API.
Note that methods in editor shouldn't move selection to outside of active
editing host. Therefore, this patch adds `Selection::SetStartAndEndInLimiter()`
and `Selection::SetBaseAndExtentInLimiter()` for them.
Differential Revision: https://phabricator.services.mozilla.com/D23459
--HG--
extra : moz-landing-system : lando
A patch of mine starts calling nsLookAndFeel from xpcshell tests, which makes
gtk crash eventually.
Differential Revision: https://phabricator.services.mozilla.com/D23759
--HG--
extra : moz-landing-system : lando
The wpt reftest window was mixing up width and height for initial
opening, meaining that it would be the wrong shape for non-square
configurations. This caused us to go down a path where we weren't
passing DRAWWINDOW_USE_WIDGET_LAYERS which turns out to be broken and
result in frequent blank screenshots.
Fix the window dimensions and make the broken path an error instead.
Differential Revision: https://phabricator.services.mozilla.com/D23323
Automatic update from web-platform-tests
[wptrunner] Reset internal state during "rerun" (#15488)
The "reftest" implementation uses an internal cache for screenshots as
an optimization for running similar tests. That optimization is
inappropriate for the CLI's "rerun" feature since in that context,
repeatedly running the same tests is an explicit goal.
Introduce a generic "reset" message that is emitted by the
TestRunnerManager during "rerun", and extend the RefTestExecutor to
handle this message by emptying its internal cache.
--
wpt-commits: f650eb264890a42067f0703fa1e7350c4d8f31d2
wpt-pr: 15488