Specifically, this makes us use nsChangeHint_RepaintFrame for changes to font decorations, border-{color,style,radius,image}, color, background-{image,color}, text-decoration-{line,color}, text-overflow
Add basic gtest to ensure AccessibleCaret and AccessibleCaretManager are
both testable. More tests to come.
Allow -Winconsistent-missing-override warning in gtest since MOCK_METHOD
does not have 'override' keyword. See bug 1169974.
--HG--
extra : commitid : 38ZTtolb0X9
extra : rebase_source : 52b93d89dddc3913dc3acab1f60971f80c009346
Provide operator<< functions so that gtest can use them to print enum
classes.
--HG--
extra : commitid : JYu6ffen2Zr
extra : rebase_source : 6628de44b343a0c625fd4526d36dba34ad0cb5cc
We need to extract statements that touch PresShell, access frame trees,
or call other utility functions into functions so that we could mock or
stub them in gtest.
Inline GetFocusedContent since it's only used once.
--HG--
extra : commitid : 15oROwm04pa
extra : rebase_source : f40692f3f77f8848424f6021046b6e4eeb7752dc
Remove the assert of the existence of PresShell in the constructor since
there's no PresShell in gtest. Also make AccessibleCaret inheritable.
--HG--
extra : commitid : JudUoXt9auc
extra : rebase_source : 882f017063339c2fb2313459d9a9f2f7c1549071
Rename mCaretMode to mLastUpdateCaretsMode to make it clear that this
variable track the caret mode since last update. This also avoid the
confusion that GetCaretMode() returns mCaretMode.
--HG--
extra : commitid : BoFaTHocik
extra : rebase_source : 944882f796904671d516f4e15edb39a5ae88bada
Remove WrapPreserve3DList() and replaced it by creating a
nsDisplayTransform item for each transformed frame.
- Add an additional item for each top frame extending 3D context to
separate consequence contexts.
- Effective transform of a layer is the accumulation of ancestors in
the same 3D context.
- The layers creating new context and extended by children need a
temporary buffer if it's effective transform is not 2D.
- Clip rects are accumulated along the context chain.
- Visible rects of items are computed from dirty regions of the frame
creating the context and accumulated transforms.
- Bounds of items are computed from accumulated transforms and
accumulated bounds of the descent frames.
- Backface hidden is handled by compositor and BasicLayerManager.
--HG--
extra : rebase_source : 1a894b057a117a8520898c9f83308d92c122b180
The print engine used to directly cause a prompt to be displayed in the most
recent window in the event of an error. This patch causes the print engine to
fire an event instead so that the front-end can choose to display or ignore
the error.
--HG--
extra : commitid : J2icIUiO8Lv
extra : rebase_source : 0288d18cf29b8c167da2be9b907f234cf4c3f2b7
The old SelectionStateChangedEvent dispatched by SelectionChanged had
this field, but it has not being ported to CaretStateChangedEvent. We
should include selected text in the event so that Gaia could have a
chance to enhance user experience.
--HG--
extra : rebase_source : 7304b71e251e2ee081192340b8f86f22bf6e03a6
This patch also reworks the dispatch of events in nsRefreshDriver. Previously
the refresh driver would dispatch the transition events for all subdocuments
then the animation events. This arrangement is complicated and not obviously
necessary. This patch simplifies this arrangement by dispatching transition
events and animation events for each document before proceeding to
subdocuments.
--HG--
extra : rebase_source : ed9147de4a4b5f36e444bdab82e45ee2143e5be8
In order to sort between events that have the same timestamp we use the
sort order of the corresponding animations so we need to store a pointer
to the animation along with the event.
--HG--
extra : rebase_source : 2767157135abd5a094d856410cd9c70e46a33b68
The elapsedTime member reported on AnimationEvents measures the time from
the *end* of the delay phase (i.e. the beginning of the active interval) to
when the event occurred. However, the AnimationTimeToTimeStamp method
introduced in the previous patch expects a time relative to the animation's
start time (i.e. the *start* of the delay phase). This patch adds a method
that performs the necessary conversion from an elapsedTime to an animation
time before calling AnimationTimeToTimeStamp. It also provides extra handling
for cases such as when the animation's start time has not yet been resolved or
when animation effect has disappeared.
--HG--
extra : rebase_source : 594f3f12bab3febe592d09b57be72b2ec09b47cf
This patch lines up the parameters of AnimationEventInfo and
TransitionEventInfo constructors so that they are more logical and consistent.
Specifically, it groups the element and pseudo type together since they
form a logical pair denoting the event target. For AnimationEventInfo this
patch also places the type of event before the common event parameters since
the event type seems to be more significant.
This patch also performs some miscelleaneous housekeeping: removing some
unnecessary namespace prefixes, whitespace fixes, and making
TransitionEventInfo use the same concrete type to store the target element
as AnimationEventInfo (dom::Element instead of nsIContent).
--HG--
extra : rebase_source : ce6935f74f31dffadce4d0e7d4fa8859ec213740
Currently we define a helper method, InitialAdvance, on KeyframeEffectReadOnly.
However, this method is only used for filling out the elapsedTime member of
AnimationEvents (which are generated by CSS animations). This patch moves this
method to CSSAnimation since it is unneeded for other types of Animations.
--HG--
extra : rebase_source : 9ab3b81a8272c004aabf26fea557c9a2f5d76caf
This makes reftest command line arguments behave more like other test suites,
so we can use a simple unified syntax for e.g. |mach try|. The patch also
reworks the command line argument parsing to use argparse rather than optparse,
and causes mach to reuse the same parser as the suite.
This unifies how reftests are invoked across desktop and
mobile, and paves the way for introducing more complex
datatypes that are unreasonable to express on the
command line.
There are many sub-classes of nsExpirationTracker. In order to distinguish them
nicely in the logging of timer firings, it's necessary to manually name each
one. (This wouldn't be necessary if there was a way to stringify template
parameters, but there isn't.)
--HG--
extra : rebase_source : 89b99e9dbb2a806bd21145d04a5e023794643b61
Backed out changeset e768739ec812 (bug 1194166)
Backed out changeset a8393be51468 (bug 1193257)
Backed out changeset 1484fe1a38e6 (bug 1193224)
Backed out changeset 24f4ad5c55cc (bug 1198257)
Backed out changeset 985f984a97ad (bug 1193223)
Backed out changeset 6137013d4933 (bug 1181516)
Backed out changeset 0456de3eb5e3 (bug 1181520)
ON A CLOSED TREE
This makes reftest command line arguments behave more like other test suites,
so we can use a simple unified syntax for e.g. |mach try|. The patch also
reworks the command line argument parsing to use argparse rather than optparse,
and causes mach to reuse the same parser as the suite.
This unifies how reftests are invoked across desktop and
mobile, and paves the way for introducing more complex
datatypes that are unreasonable to express on the
command line.
Make the FrameLayerBuilder remember for what region it has calculated
display item visibility, then recompute the visibility whenever the
dirty region it is passed to DrawPaintedLayer changes.
This means that the caller does not have to know the entire dirty region
that will be drawn for the transaction, but we can still optimise cases
where it knows some of the dirty region in advance.
This fixes a regression where MultiTiledContentClient's low-res display
port would not be painted if a smaller region of its high-res buffer had
already been painted that transaction, since the FrameLayerBuilder
had decided that most of the larger low-res region was invisible.
Remove WrapPreserve3DList() and replaced it by creating a
nsDisplayTransform item for each transformed frame.
- Add an additional item for each top frame extending 3D context to
separate consequence contexts.
- Effective transform of a layer is the accumulation of ancestors in
the same 3D context.
- The layers creating new context and extended by children need a
temporary buffer if it's effective transform is not 2D.
- Clip rects are accumulated along the context chain.
- Visible rects of items are computed from dirty regions of the frame
creating the context and accumulated transforms.
- Bounds of items are computed from accumulated transforms and
accumulated bounds of the descent frames.
- Backface hidden is handled by compositor and BasicLayerManager.
When a TEXTAREA element is focused it returns the cursor to the last
position was at, or places it last. INPUT @type="text" (or any other
textual input element) places the caret at the beginning. Because of
this we move the caret to the end of the input field. The next time
the element is focussed, the cursor should move to the end.
The layout touch caret tests relied on the caret being left in its
previous position. This patch addresses that by using the advanced user
interaction API for these test cases.
r=jgriffin
--HG--
extra : commitid : 7tchyrqIp00
extra : rebase_source : 5f164dc051183056c92a2da7fb6e601fff748b29
This makes reftest command line arguments behave more like other test suites,
so we can use a simple unified syntax for e.g. |mach try|. The patch also
reworks the command line argument parsing to use argparse rather than optparse,
and causes mach to reuse the same parser as the suite.
This unifies how reftests are invoked across desktop and
mobile, and paves the way for introducing more complex
datatypes that are unreasonable to express on the
command line.
In the new composite order arrangement CSSAnimations and CSSTransition have the
following life-cycle:
1. Animation created by markup
=> composite order determined by markup
(e.g. CSS animations use tree order and animation-name order;
CSS transitions use transition trigger order)
2. Animation cancelled by changing markup
=> composite order is undefined
3. Animation is played again using the API
=> composite order is defined by when the animation is first played.
Another way of saying this is that, at the point when the animation is
played, it is appended to the "global animation list".
4. Animation is subsequently cancelled / played => no change
We need a way to know when we are going from 2 to 3. It would seem like we
could do that by setting mAnimationIndex to some sentinel value while it is
in 2. However, even when in 2, although the spec doesn't define the composite
order animations at this point (from an API point of view you can't access these
objects and they don't contribute to style so it doesn't need to be defined), we
sometimes will need to establish an order.
This can happen, for example, when an animation queues events and then is later
cancelled before the events are dispatched. Because we sort events based on
their associated animation at the time of dispatch (for performance reasons) we
need a deterministic order for these idle animations.
We do that (in a subsequent patch in this series) by setting mAnimationIndex
when we transition from 1 to 2. That is, these idle animations are effectively
ordered by when they became idle (which always happens in a deterministic
fashion).
The Web Animations specification has replaced the term "sequence number" with
references to a global animation list. This patch applies similar naming
to our animation structures.
This also tests that regions of a fixed background layer that may be revealed by async scrolling are painted.
--HG--
extra : rebase_source : b79de765277d9ea4f23a88f923b06cbeee9712d6
extra : source : 49e72ce8143af66579c8d6c0b6a0f215e9883d5a
This ensures that regions beyond the clip are painted, and async scrolling can reveal them by moving the layer-level clip.
This patch also ensures that we continue creating mask layers for fixed background layers correctly, where appropriate.
--HG--
extra : rebase_source : e0759006463e7d69cd1d916c8e759b35d300a7c7
extra : source : 09922c7c550760f9b61d8ef523281234805af218
In this case the test image is painted using -moz-element which layerizes
differently than not using -moz-element when APZ is enabled. This slight
layerization difference causes a few pixels to be different and the reftest
to fail. Fuzzing it seems reasonable as the fundamental nature of the test
is unchanged.
--HG--
extra : commitid : 1faZ7pEEkxj
Although I didn't test this theory, I think it's fixing a regression
from patch 3 in bug 1084136 (changeset e7ecd25d7e7c), which stopped
clearing other flags when an error occurred.
--HG--
extra : transplant_source : %E8%B9%F6%BA-%22%C2s%A59V%DB%F7%D7%9D%A7Vpa2
This makes reftest command line arguments behave more like other test suites,
so we can use a simple unified syntax for e.g. |mach try|. The patch also
reworks the command line argument parsing to use argparse rather than optparse,
and causes mach to reuse the same parser as the suite.
This unifies how reftests are invoked across desktop and
mobile, and paves the way for introducing more complex
datatypes that are unreasonable to express on the
command line.
rs=smaug on the webidl change
IGNORE IDL due to only adding a const
--HG--
extra : commitid : zI9Hpg9cZ6
extra : rebase_source : 8a2bf373dd9ed2c08ef9229ccd7dfff4fe1b30f7
extra : histedit_source : e0b5ba801b8c9912378e90779c42e99f4604276d
As well as ensuring that we don't create animations for elements that are not
part of the document tree, this test also adjusts the assertion that checks
this in the following ways:
* Calls GetComposedDoc() instead of GetCrossShadowCurrentDoc() since the
latter is deprecated.
* Moves it from RequestRestyle to FlushAnimations since, depending on how we
refactor this code in the future, it's possible we might end up calling
RequestRestyle even for animations on elements that have been removed from the
document but we shouldn't call FlushAnimations in this case.
Note that this also fixes a subtle bug: we *should* have returned
nsChangeHint_NeutralChange from CalcDifference when we ignored
the 'align-content' change (not zero). See bug 1176782 comment 14
(and the comments leading up to that) for details.
The missing |mIsSubgrid| check caused nsStylePosition::CalcDifference
to return zero even after the property value was changed to 'subgrid'.
See bug 1176782 comment 14 (and the comments leading up to that) for
details.
This functions is for hiding caret in cursor mode on desktop browser
when receiving NS_WHEEL_WHEEL, which is never used on B2G in production.
On desktop browser, a proper wheel scroll cycle begins by NS_WHEEL_START
and ends by NS_WHEEL_STOP, which was covered by gtest. Move the three
marionette test for TouchCaret only.
--HG--
extra : commitid : KCG4QMsPhdY
extra : rebase_source : b33ca79699cfffe33da1890aed10935fa7565e1c
This is the patch which fixed the bug.
When calling OnScrollPositionChanged in cursor mode, we want the
appearance of the caret to be preserved since the caret might be hidden
due to timeout. We should respect the old appearance of the caret.
Add a marionette test to ensure the caret does not appear due to
ScrollPositionChanged.
--HG--
extra : commitid : KCG4QMsPhdY
extra : rebase_source : e69ce44e11e079dc79c8e69e7aa25003ca5d0398
The comment reads "No need to consider whether the caret's position is
out of scrollport", which is untrue.
For example, the position of nsCaret might be shifted by typing and be
covered by other elements. So we need to set the appearance of first
caret to NormalNotShown when it becomes invisible.
--HG--
extra : commitid : KCG4QMsPhdY
extra : rebase_source : c5990c1b544354b80295507e3d886eb7bd11ed15
The special-case was added back when the Fennec dynamic toolbar showing/hiding
behaviour didn't resize the content area. As of bug 1180295 that is no longer
the case, and showing/hiding the dynamic toolbar *does* resize the content area.
Therefore the widget bounds always represents the actual content area and can
be used directly as the composition bounds.
In addition, the special-case code relied on a particular quirk of the Fennec
CSS viewport determination code which was removed in bug 1180267. The quirk was
that the CSS viewport height was always set such that it would cover the
available screen height when the page was zoomed out to the minimum allowed
zoom. This behaviour was technically incorrect as it would ignore any height
properties provided in the meta-viewport tag. Now that this quirk has been
removed, the special-case code breaks because the root frame's height is
independent of the screen height and can result in an incorrect composition
bounds.
--HG--
extra : commitid : 69FDhj50WEN
* * *
Bug 1057680 - pt 1 - Add a font-stretch keyword to the valid values for the font shorthand in property_database.js. r=jdaggett
* * *
Bug 1057680 - pt 2.1 - Fix up existing tests that depend on the shorthand not handling font-stretch values. r=jdaggett