Граф коммитов

30 Коммитов

Автор SHA1 Сообщение Дата
Cosmin Sabou 476c8e75fb Backed out changeset 4c37121d2837 (bug 1788741) for causing focus and ResizeObserver wpt related failures. CLOSED TREE 2023-02-11 06:52:27 +02:00
Emilio Cobos Álvarez 75d8636439 Bug 1788741 - Test and fix timing of focus fixup rule. r=smaug
To do this we change the timing at which ResizeObserver fires with
respect to the refresh driver last layout update, which is what the spec
says to do, in order for the focus fixup rule to fire after
ResizeObserver.

Bug 1790150 would make this more explicit.

Differential Revision: https://phabricator.services.mozilla.com/D156219
2023-02-10 23:04:54 +00:00
Marian-Vasile Laza 74bb5c8e29 Backed out changeset b85b6264ef4b (bug 1788741) for causing multiple wpt failures. CLOSED TREE 2023-01-19 20:16:52 +02:00
Emilio Cobos Álvarez 64cfafb570 Bug 1788741 - Test and fix timing of focus fixup rule. r=smaug
To do this we change the timing at which ResizeObserver fires with
respect to the refresh driver last layout update, which is what the spec
says to do, in order for the focus fixup rule to fire after
ResizeObserver.

Bug 1790150 would make this more explicit.

Differential Revision: https://phabricator.services.mozilla.com/D156219
2023-01-19 15:10:48 +00:00
Emilio Cobos Álvarez 2e14680300 Bug 1685038 - Flush layout _before_ gathering observations in ResizeObserverController. r=dshin
I couldn't reproduce this, but this matches the specification.

https://drafts.csswg.org/resize-observer/#html-event-loop:

 1. Recalc styles
 2. Update layout
 3. Set depth to 0
 4. Gather active observations at depth depth for Document
 5. Repeat while document has active observations
   2. Set depth to broadcast active observations.
   3. Recalc styles
   4. Update layout
   5. Gather active observations at depth depth for Document

This matches the spec, tweaked a bit to avoid duplication.

I haven't been able to reproduce the original issue, but flushing
upfront should make sure that delayed resizes are processed given we
flush the browsing context tree in pre-order.

Differential Revision: https://phabricator.services.mozilla.com/D155064
2022-08-19 13:58:24 +00:00
Olli Pettay bb0eb3cf5d Bug 1756118, stop observing RefreshDriver if there are no resize observers, r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D139109
2022-02-22 11:46:16 +00:00
Boris Chiou f5ebaf749a Bug 1689099 - Schedule resize observers for the whole browsing context tree. r=emilio
It's possible to observe an element in the iframe while the
ResizeObserver object lives in the outer document, so we have to make
sure we also schedule the observer for all documents in the same
BrowsingContext tree.

Differential Revision: https://phabricator.services.mozilla.com/D119843
2021-08-09 19:48:13 +00:00
Emilio Cobos Álvarez a7273a0cfc Bug 1717620 - ResizeObserverController shouldn't need to keep observers alive. r=smaug
The observers take care of unregistering when they need to. Instead,
make the ResizeObservation keep the element alive just like
nsMutationReceiver keeps the mutation observer alive.

Differential Revision: https://phabricator.services.mozilla.com/D118477
2021-07-09 09:29:18 +00:00
Marian-Vasile Laza 62e5bd4ede Backed out changeset 5a4f865e6d5d (bug 1717620) for causing crashes in Bug 1718286. a=backout DONTBUILD 2021-06-26 00:37:43 +03:00
Emilio Cobos Álvarez e19569fbb1 Bug 1717620 - ResizeObserverController shouldn't need to keep observers alive. r=smaug
The observers take care of unregistering when they need to. Instead,
make the ResizeObservation keep the element alive just like
nsMutationReceiver keeps the mutation observer alive.

Differential Revision: https://phabricator.services.mozilla.com/D118477
2021-06-24 15:01:05 +00:00
Sean Feng e58bb429df Bug 1690905 - Factors DOM memory sizes out to its own struct r=mccr8
This patch factors the DOM related sizes in nsWindowSizes to its own
struct, such that callers can easily acess DOM memory sizes.

Differential Revision: https://phabricator.services.mozilla.com/D111317
2021-05-27 17:55:44 +00:00
Sylvestre Ledru fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila 964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru 5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00
Cameron McCormack 18ffe7c642 Bug 1656114 - Part 4: Accumulate page use counters in the parent process. r=emilio,nika
This changes the way we deal with page use counters so that we can
handle out of process iframes.

Currently, when a parent document is being destroyed, we poke into all
of the sub-documents to merge their use counters into the parent's page
use counters, which we then report via Telemetry.  With Fission enabled,
the sub-documents may be out of process.  We can't simply turn these
into async IPC calls, since the parent document will be destroyed
shortly, as might the content processes holding the sub-documents.

So instead, each document during its initialization identifies which
ancestor document it will contribute its page use counters to, and
stores its WindowContext id to identify that ancestor.  A message is
sent to the parent process to notify it that page use counter data will
be sent at some later point.  That later point is when the document
loses its window.  It doesn't matter if the ancestor document has
already been destroyed at this point, since all we need is its
WindowContext id to uniquely identify it.  Once the parent process has
received all of the use counters it expects to accumulate to a given
WindowContext Id, it reports them via Telemetry.

Reporting of document use counters remains unchanged and is done by each
document in their content process.

While we're here, we also:

* Limit use counters to be reported for a pre-defined set of document
  URL schemes, rather than be based on the document principal.

* Add proper MOZ_LOG logging for use counters instead of printfs.

Differential Revision: https://phabricator.services.mozilla.com/D87188
2020-10-11 22:03:43 +00:00
Markus Stange 41c70bcd59 Bug 1666617 - Add an observer description argument to AddRefreshObserver. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D91082
2020-09-25 02:36:29 +00:00
Simon Giesecke f458cd246a Bug 1626570 - Improve handling of copying arrays in dom/base/. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D73625
2020-05-05 10:08:02 +00:00
Boris Zbarsky c6c4a83796 Bug 1535530. Fix can-run-script analysis to not mishandle on-stack refs to RefPtrs. r=andi,masayuki
The key here is to test the type of the variable declaration for being a
smartptr type, instead of testing the type of the variable _use_.

Differential Revision: https://phabricator.services.mozilla.com/D65581

--HG--
extra : moz-landing-system : lando
2020-03-06 09:57:45 +00:00
Emilio Cobos Álvarez b7065132eb Bug 1597958 - Measure memory usage of the ResizeObserverController. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D53950

--HG--
extra : moz-landing-system : lando
2019-11-20 14:04:47 +00:00
Emilio Cobos Álvarez f81ed0918a Bug 1596992 - Avoid leaking ResizeObserver entries without active observations for the lifetime of the document. r=smaug
By adding / removing to the observer list on observe() / unobserve()
respectively, rather than only adding on construction per spec.

See https://github.com/w3c/csswg-drafts/issues/4518 for the relevant spec issue.

Differential Revision: https://phabricator.services.mozilla.com/D53816

--HG--
extra : moz-landing-system : lando
2019-11-19 16:45:15 +00:00
Boris Chiou 65d67a409f Bug 1555786 - Get inner window from doc directly for resize observer. r=smaug
In Notify(), we should guarantee that the inner window we get is for the
document, and avoid using null outer window pointer.

Differential Revision: https://phabricator.services.mozilla.com/D35727

--HG--
extra : moz-landing-system : lando
2019-06-25 20:07:03 +00:00
Sylvestre Ledru d57d4905f1 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D30883

--HG--
extra : moz-landing-system : lando
2019-05-25 17:46:15 +00:00
arthur.iakab af8e458c5f Backed out changeset a296439a25ff (bug 1519636) for frequent Windows cppunit failures CLOSED TREE 2019-05-24 14:26:01 +03:00
Sylvestre Ledru c82ea97226 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D30883

--HG--
extra : moz-landing-system : lando
2019-05-24 09:59:17 +00:00
Julien Cristau cd18b00642 Bug 1548513 - fix bustage in ResizeObserver with diagnostic asserts disabled. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D29677

--HG--
extra : moz-landing-system : lando
2019-05-03 05:38:00 +00:00
Emilio Cobos Álvarez 81f4733d9e Bug 1548057 - followup: Unbust opt builds. r=me
CLOSED TREE
2019-05-01 17:01:56 +02:00
Emilio Cobos Álvarez 069fbaa157 Bug 1548057 - Properly unregister the resize observer helpers when the shell goes away. r=dholbert,boris
Need to write a test for this. Also, as a matter of preventive measure, null out
mOwner when it dies.

That may matter in the case where the controller dies while the observer is
getting notified. In that case, somebody still keeps a reference to the
controller. Right now is fine because nothing will touch it again (the
destructor doesn't), but that's not great, and it's better to just clear the
pointer.

Differential Revision: https://phabricator.services.mozilla.com/D29395

--HG--
extra : moz-landing-system : lando
2019-04-30 19:44:55 +00:00
Fariskhi Vidyan b2dd73fd98 Bug 1272409 - Part 3: Add ResizeObserverController. r=dholbert,smaug
Use ResizeObserverController to schedule the observers and manage them.
Document will hold this controller in the later patch.

Depends on D27616

Differential Revision: https://phabricator.services.mozilla.com/D27617

--HG--
extra : moz-landing-system : lando
2019-04-26 20:29:16 +00:00
Daniel Varga 46db25d004 Backed out 5 changesets (bug 1272409) for build bustage at /builds/worker/workspace/build/src/dom/base/nsGlobalWindowCommands. On a CLOSED TREE
Backed out changeset 2ad8260489d6 (bug 1272409)
Backed out changeset 224dad4cbdc3 (bug 1272409)
Backed out changeset 72775dbf35c8 (bug 1272409)
Backed out changeset c331a4a8b343 (bug 1272409)
Backed out changeset d817fbfc52b6 (bug 1272409)
2019-04-26 02:41:43 +03:00
Fariskhi Vidyan 68460618c3 Bug 1272409 - Part 3: Add ResizeObserverController. r=dholbert,smaug
Use ResizeObserverController to schedule the observers and manage them.
Document will hold this controller in the later patch.

Depends on D27616

Differential Revision: https://phabricator.services.mozilla.com/D27617

--HG--
extra : moz-landing-system : lando
2019-04-25 18:30:36 +00:00