We should create a stacking context for any transform or opacity animations
that are either "in effect" (what we currently do) OR "current", i.e.
scheduled to run or running. *BUT* for now, we don't create any stacking
context in before phase without fill:backwards or fill:both because the
property never wins in cascade until the animation gets "in effect". This
restriction will be removed in a subsequent patch in this bug after landing
bug 1279403.
MozReview-Commit-ID: 8RyLJNPtoKI
--HG--
rename : layout/reftests/css-animations/stacking-context-transform-animation-ref.html => layout/reftests/css-animations/stacking-context-animation-ref.html
extra : rebase_source : 0d9c8d9e03ca0d400e9b376b9416fbabffd10034
We want the maximum scroll position to be aligned with layer pixels. That way
we don't have to re-rasterize the scrolled contents once scrolling hits the
edge of the scrollable area.
Here's how we determine the maximum scroll position: We get the scroll port
rect, snapped to layer pixels. Then we get the scrolled rect and also snap
that to layer pixels. The maximum scroll position is set to the difference
between right/bottom edges of these rectangles.
Now the scrollable area is computed by adding this maximum scroll position
to the unsnapped scroll port size.
The underlying idea here is: Pretend we have overflow:visible so that the
scrolled contents start at (0, 0) relative to the scroll port and spill over
the scroll port edges. When these contents are rendered, their rendering is
snapped to layer pixels. We want those exact pixels to be accessible by
scrolling.
This way of computing the snapped scrollable area ensures that, if you scroll
to the maximum scroll position, the right/bottom edges of the rendered
scrolled contents line up exactly with the right/bottom edges of the scroll
port. The scrolled contents are neither cut off nor are they moved too far.
(This is something that no other browser engine gets completely right, see the
testcase in bug 1012752.)
There are also a few disadvantages to this solution. We snap to layer pixels,
and the size of a layer pixel can depend on the zoom level, the document
resolution, the current screen's scale factor, and CSS transforms. The snap
origin is the position of the reference frame. So a change to any of these
things can influence the scrollable area and the maximum scroll position.
This patch does not make us adjust the current scroll position in the event
that the maximum scroll position changes such that the current scroll position
would be out of range, unless there's a reflow of the scrolled contents. This
means that we can sometimes render a slightly inconsistent state where the
current scroll position exceeds the maximum scroll position. We can fix this
once it turns out to be a problem; I doubt that it will be a problem because
none of the other browsers seems to prevent this problem either.
The size of the scrollable area is exposed through the DOM properties
scrollWidth and scrollHeight. At the moment, these are integer properties, so
their value is rounded to the nearest CSS pixel. Before this patch, the
returned value would always be within 0.5 CSS pixels of the value that layout
computed for the content's scrollable overflow based on the CSS styles of the
contents.
Now that scrollWidth and scrollHeight also depend on pixel snapping, their
values can deviate by up to one layer pixel from what the page might expect
based on the styles of the contents. This change requires a few changes to
existing tests.
The fact that scrollWidth and scrollHeight can change based on the position of
the scrollable element and the zoom level / resolution may surprise some web
pages. However, this also seems to happen in Edge. Edge seems to always round
scrollWidth and scrollHeight upwards, possibly to their equivalent of layout
device pixels.
MozReview-Commit-ID: 3LFV7Lio4tG
--HG--
extra : histedit_source : 5390eeebfe9a2791d9ac8e91ec1dfec4ec7b4118
This matches the behaviour required by the latest editor's draft spec and matches what blink is planning on shipping soon.
It may not be an entirely web compatible change, but we expect only a small number of websites to be affected. See
the bug for more details.
This patch mainly consists of two parts, one for resolving and the other
for reordering.
In the resolving part, the added code stores the lowest embedding level
of all bidi formatting characters precede a frame to the bidi data of
that frame when necessary.
In the reordering part, virtual frame is restored from the information
stored above before asking the bidi engine to reorder frames
Collapsing a run of continuous virtual formatting characters into one
virtual character with the lowest embedding level among them should work
because a character with a higher embedding level than either of its
neighbors should not affect the reordering result of any other part of
the sequence. (No formal proof of this theorem, though)
MozReview-Commit-ID: LQjRu0mWsZP
--HG--
extra : source : 5d0cf1cbd270e9963d848a23b37528ed503ed6a0
This patch is mainly based on smontagu's wip patch. Some non-trivial differences:
* BidiParagraphData.mIsolateCount and related code are not added in this patch.
I investigated uses of this field in the wip patch, and it seems to me none of
them makes sense:
1. in the fast path of nsBidiPresUtils::ResolveParagraph, if there would be
any isolate character in the surrounding text, there must exist more than
one runs, which indicates the isolate count condition is redundant.
2. in handle of br frame in nsBidiPresUtils::TraverseFrames, based on my
understanding of "CSS Writing Modes Level 3" section "2.4.4. Paragraph
Breaks Within Embeddings and Isolates", the resolving should happen
unconditionally.
* {control,override}Char in nsBidiPresUtils::TraverseFrames are assigned
unconditionally when in a bidi inline container, so that we can properly
handle it when there are continuations. I suspect this was the reason of
regressions in dynamic reftests from the wip patch mentioned in comment 1.
MozReview-Commit-ID: LUdBAapA48e
--HG--
extra : source : 28fa56b841de689691375e8e2d5e56014921b48e
As it happens, these testcases don't actually have any padding. So for them,
"box-sizing: padding-box" is equivalent to the default "content-box" behavior,
anyway. So, this change (and the unsupporting of 'padding-box') doesn't impact
these tests' rendering.
MozReview-Commit-ID: JPTwmahnOti
This patch bundles a color font named "EmojiOne Mozilla", and turn on
the necessary code for including the bundled font, on Linux and Windows.
With that, users of Linux and Windows <=8.0 is able to see color Emoji
on Firefox without support from System.
The font bundled is the v0.2.1 version, generated from the project repo
in
https://github.com/mozilla/emojione-colr
with artwork from the original EmojiOne font and Twemoji,
under CC BY 4.0 license.
Test files, about:license page, and the packager instruction are
modified accordingly.
MozReview-Commit-ID: 2mmxnA0vS3u
(See bug 859301 comment 56 for an example of the problem this causes.)
--HG--
extra : amend_source : 88cd9b67f4f833f07ac34aeb6483cf83f9b339d3
extra : transplant_source : 0N%B9%D7%D5%91%22%BC%8D%5C%03%FD%E5Z%0C%E1%BF%91X%EA