So that we can now ensure nsRefreshDriver ticks (i.e. nsRefreshDriver doesn't
stop its timer) for all queued events.
Before this patch, dispatching CSS animation/transition events relied on the
fact that DocumentTimeline observes nsRefreshDriver. For this fact,
animationcancel or transitioncancel event did not dispatch properly in some
cases, i.e. the case where the animation was dropped from the DocumentTimeline.
MozReview-Commit-ID: 7JYro0MY2U2
--HG--
extra : rebase_source : 28c8e2a50d29c5344e2c5ca3c43af41f4692fa0f
Now we sort CSS animation/transition events by scheduled event time prior
to compositor order.
SortEvents() will be a private method in the next patch in this patch
series.
MozReview-Commit-ID: ICkOayquN0f
--HG--
extra : rebase_source : 405c8232e93c54a073c722a4332873af02daa870
We just need information whether there is still an observer or not in most
cases. The only case we need to know the count is in an assertion in the
dtor of nsRefreshDriver. In the dtor we are checking there remains no
observers other than early runners.
Note that the order in HasObserver() was adjusted to reflect that we check
boolean flag first (mViewManagerFlushIsPending) and subsequently check observer
which is likey happen to. mFrameRequestCallbackDocs should have checked prior
to mResizeEventFlushObservers though.
MozReview-Commit-ID: E1qplusqw1Y
--HG--
extra : rebase_source : ebd9e6eb08952df954c55860638233c9a8729856
We don't need to collect whole descendants documents.
This patch intentionally leaves animation events handling which is another
caller of CollectDocuments in nsRefreshDriver since the animation part will
be fixed in a different way in bug 1415780.
MozReview-Commit-ID: INAJm1NHLuI
--HG--
extra : rebase_source : 4e255cef604d4455d6efa5dc2ebddd5dc649ee65
We do this by tracking them as a property on the root frame the same way we do for modified frames.
We also set the property in ProcessFrame but that is okay because we are guaranteed to finish the partial update at that point.
The underlying issue here is that the pres shell was already being torn down
when we flush.
The less risky change here is to just change the assertions instead of
IsSafeToFlush too, but the !isSafeToFlush || mViewManager assertion was also
firing already, because we null out the view manager from Destroy.
So this change is effectively idempotent behavior-wise (we tighten a bit the
view manager assertion, but that should be fine).
Just let me know if you want me to just loosen the assertions, but I think the
IsSafeToFlush change is nicer too.
MozReview-Commit-ID: 240qLlLi7RE
--HG--
extra : rebase_source : df5dacb849a93e62f90e278c0d99f1034b341b79
This provides a place for current XBL stylesheets to be loaded without using XBL <resources>,
that load as a UA sheet instead of loading them as document sheets. This makes the styles
apply more similarly to XBL, in that they are less specific than document styles.
MozReview-Commit-ID: 3ewomJZMbrk
--HG--
extra : rebase_source : 8d8d837872947daa8f601e7d32de118655dabdde
We're crashing because we're trying to flush layout of a shell whose document is
in the bfcache, so when we try to get the shell from the document in the style
set we get null back.
This shouldn't generally happen, and all flushes should go through the document
instead to avoid bugs like this and also other bugs related to subdocuments, and
all the stuff that nsIDocument::FlushPendingNotifications handles but the
presshell version doesn't. That's bug 1431852.
MozReview-Commit-ID: 1IJ4DBa3DCO
They used to do quote updates and such but they where moved long ago, and do
nothing now.
MozReview-Commit-ID: 188vzGctbty
--HG--
extra : rebase_source : dd638875f9ef9ceb2343df5f8677a23d820c7a36
I'm pretty sure this is not a problem now, since we don't mutate the DOM from
painting, and we don't have legacy extensions anymore.
Just to confirm, I did a try run with a RELEASE_ASSERT(!CheckDOMModified()), and
it passed.
MozReview-Commit-ID: HTekD8tsz9v
--HG--
extra : rebase_source : 3ae51ff73b921fd720bd09ae9e294f2d85c71644
Returning a zero-sized viewport in the case there's no shell / pres context.
For now, no other change yet. After this we can start tweaking the ShadowRoot
Stylist setup, and even try to return computed styles without a document \o/.
MozReview-Commit-ID: 3cT2PKQISri
In particular, we set the pres context visible area _before_ processing
restyles.
This causes inconsistencies when resolving viewport units. In particular, the
resulting style tree will have some units resolved in terms of the old size, and
some in terms of the new size, depending on whatever is dirty, because we don't
flush the pending media query changes.
Also, some sizes are resolved against the unconstrained size because of the
shrink-to-fit stuff. Fix this by flushing _before_ in this case, instead of
after, since we're going to set the size to an actual value later when reflowing
the root frame.
MozReview-Commit-ID: ExI5yTJCjGp
This patch makes 'Shift', 'Alt', 'Contorl' and 'AltGraph' been suppressed for content
when fingerprinting resistance is enabled. Chrome can still get these events.
The reason behind this is that websites can still observe key combinations to
tell which keyboard layout is using even we spoof the keyboardEvent.code,
keyboardEvent.keyCode and modifier states. For example, the AZERTY France
keyboard, the digit keys of it requires the user press the Shift key. So, it is
easy to differentiate AZERTY and QWERTY keyboard by observing whether a Shift key
generates its own before the digit keys. There are similar issues for 'Alt' and
'AltGraph' as well.
MozReview-Commit-ID: 3CwCgvey4lK
--HG--
extra : rebase_source : 225a34ab188f6cca288a6c0e9874261df7db629f