It turns out the `BuildPath()` method will still be exposed by DOM
API via `getTotalLength()`. So we need to fallback to `GetComputedStyleNoFlush()`
to handle display:none problem, and if the element doesn't even belong
to a document, we further fallback to 0.
`BuildPath()` being affected also means `GetStrokeWidth()`, etc. will also
be indirectly exposed to DOM API in some obscure cases. Let's add a utility
to handle the fallback.
Differential Revision: https://phabricator.services.mozilla.com/D33247
--HG--
extra : moz-landing-system : lando
Resolving length for inner <svg> is exactly the same as other ordinary
element. We should not pass the context to `GetAnimValue()`, otherwise
font-size will be obtained from the enclosing viewport of the inner
<svg> rather than the inner <svg> itself.
Differential Revision: https://phabricator.services.mozilla.com/D32657
--HG--
extra : moz-landing-system : lando
We use nsSVGUtils::GetTransformMatrixInUserSpace to support
CSS transform in getCTM.
Differential Revision: https://phabricator.services.mozilla.com/D28969
--HG--
extra : moz-landing-system : lando
We should not treat <iframe> as <object> for SVG, otherwise there will
be unexpected sizing and other webcompat problem (e.g. getScreenCTM).
It behaved correctly before, the change was introduced to solve a double
zooming problem (bug 843480) for <iframe>. Actually the zooming problem
can be solved by avoiding zooming when the window frame is an <iframe>.
Differential Revision: https://phabricator.services.mozilla.com/D28313
--HG--
extra : moz-landing-system : lando
This is split from the previous changeset since if we include dom/ the file size is too
large for phabricator to handle.
This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.
This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 2` argument.
Differential Revision: https://phabricator.services.mozilla.com/D27457
--HG--
extra : moz-landing-system : lando
We implements getBBox for tspan. The implementation also has consistent
behavior as getBoundingClientRect.
Differential Revision: https://phabricator.services.mozilla.com/D27428
--HG--
extra : moz-landing-system : lando
We implements getBBox for tspan. The implementation also has consistent
behavior as getBoundingClientRect.
Differential Revision: https://phabricator.services.mozilla.com/D27428
--HG--
extra : moz-landing-system : lando
We need device pixel, but TransformFramePointToTextChild returns in css pixel,
thus a scaling is necessary.
Differential Revision: https://phabricator.services.mozilla.com/D27322
--HG--
extra : moz-landing-system : lando
We should use nsLayoutUtils::GetTransformToAncestor instead of
nsSVGUtils::GetUserToCanvasTM to get the transform matrix. Because the former
will also take CSS transform into account while the latter won't.
Differential Revision: https://phabricator.services.mozilla.com/D26441
--HG--
extra : moz-landing-system : lando
We should use nsLayoutUtils::GetTransformToAncestor instead of
nsSVGUtils::GetUserToCanvasTM to get the transform matrix. Because the former
will also take CSS transform into account while the latter won't.
Differential Revision: https://phabricator.services.mozilla.com/D26441
--HG--
extra : moz-landing-system : lando
We also allow leading and trailing spaces for pair to be consistent with length,
number, etc.
Differential Revision: https://phabricator.services.mozilla.com/D25050
--HG--
extra : moz-landing-system : lando
We also allow leading and trailing spaces for pair to be consistent with length,
number, etc.
Differential Revision: https://phabricator.services.mozilla.com/D25050
--HG--
extra : moz-landing-system : lando
As it turns out we need this to avoid losing precision both during painting and
during serialization.
This patch also changes to serialize `context-value` if it's the computed value.
I could keep the previous behavior, but it makes no sense to serialize the
initial value. We're the only ones to support this value anyway, and I couldn't
find a definition or spec for this.
Also update tests and expectations for:
* New unexpected passes.
* Always serializing the unit in getComputedStyle.
* Calc and interpolation support.
Chrome also always serializes the unit in getComputedStyle, so I'm pretty sure
this is compatible with them. Chrome is inconsistent and keeps numbers in
specified style, but that's inconsistent with itself and with other quirky
lengths, so I updated the tests instead.
Differential Revision: https://phabricator.services.mozilla.com/D21819
Bug 828240 switched the children only transform on an outer svg from applying to
each of the anonymous child's children to applying directly to the anonymous
child instead. So now when the viewBox changes on an outer svg, we need to
update (just) the overflow of the anonymous child. The children only transform
on an inner svg still applies to the children of the inner svg, so we continue
updating those children in that case.
Hit testing uses overflows as part of the testing process, so was broken by the
lack of overflow updates.
Differential Revision: https://phabricator.services.mozilla.com/D5668
--HG--
extra : moz-landing-system : lando
Bug 828240 switched the children only transform from applying to each of the
anonymous child's children to applying directly to the anonymous child instead.
So now when the viewBox changes, we need to update (just) the overflow of the
anonymous child, where previously we were updating the overflows of each of the
children (which was having no effect I guess, since they no longer have the
child only transform applied to them).
Hit testing checks for hits using overflow, so was broken by the lack of
overflow update on the anonymous child (combined with the fact that the
anonymous child is now transformed by the children only transform).
Differential Revision: https://phabricator.services.mozilla.com/D5668
--HG--
extra : moz-landing-system : lando
This will hopefully fix some intermittent timeouts that we're hitting in this
test. (The theory is that without this patch, maybe we're firing the iframe's
load event before we've set up the load handler.)
MozReview-Commit-ID: 183ogex73SX
--HG--
extra : rebase_source : a4daf9b87828725c25e728ad8bc86eb9004ca159
Note that this patch also replaces legacy VK_* with KEY_*, and replaces
synthesizeKey() for inputting some characters with sendString() because
it's better and clearer what it does and it sets shiftKey state properly.
MozReview-Commit-ID: De4enbjux3T
--HG--
extra : rebase_source : 2296b84bff8e22f01eeb48cd8614fac5db11136a
To process focus handling deterministic, we need to wait for focus before
proceeding test.
MozReview-Commit-ID: 78EWlA3QuWM
--HG--
extra : rebase_source : 6473b0e1d364f9d3f8a5c43f82ee25be54a478bf
On MacOSX, more precisely if full keyboard access is not enabled on MacOSX,
we skip focusing link elements in SVG with tab key, so if there is no more
elements to be focused in the SVG, the focus will be moved outside the SVG.
To prevent this situation, there needs more focusable elements in the SVG.
MozReview-Commit-ID: HGGMjA0Asfw
--HG--
extra : rebase_source : 5f4b951f6dfcb7572cc947744365b0609d6c92f1