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

39 Коммитов

Автор SHA1 Сообщение Дата
Sean Feng 71ce0cfc2a Bug 1687358 - Implement telemetry probes to determine the best possible threshold for <lazyload> r=emilio
This patch implements five telemetry probes to help us learn how
lazyload thresholds perform in the wild.

Differential Revision: https://phabricator.services.mozilla.com/D102845
2021-01-29 17:03:25 +00:00
Bogdan Tara a9b6b7cff8 Backed out changeset a77ccd1c1659 (bug 1687358) for browser_lazyload_telemetry.js failures CLOSED TREE 2021-01-27 02:46:06 +02:00
Sean Feng 14dee2e52c Bug 1687358 - Implement telemetry probes to determine the best possible threshold for <lazyload> r=emilio
This patch implements five telemetry probes to help us learn how
lazyload thresholds perform in the wild.

Differential Revision: https://phabricator.services.mozilla.com/D102845
2021-01-26 21:54:33 +00:00
Emilio Cobos Álvarez 039592f4d8 Bug 1682003 - Avoid UTF-8 -> UTF-16 conversion during CSSOM serialization. r=heycam
This lifts a bunch of string conversions higher up the stack, but allows
us to make the servo code use utf-8 unconditionally, and seemed faster
in my benchmarking (see comment 0).

It should also make a bunch of attribute setters faster too (like
setting .cssText), now that we use UTF8String for them (we couldn't
because we couldn't specify different string types for the getter and
setters).

Differential Revision: https://phabricator.services.mozilla.com/D99590
2020-12-17 14:04:35 +00:00
Simon Giesecke 5bfbb2a572 Bug 1673931 - Avoid including Document.h from header files. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D95046

Depends on D95045
2020-11-23 16:07:43 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Emilio Cobos Álvarez c6bcab8a5c Bug 1611204 - Fix IntersectionObserverEntry.isIntersecting to match other browsers. r=mstange
Note that no browser matches the spec (see
https://github.com/w3c/IntersectionObserver/issues/432), but that our
behavior is reasonably close to them. So do this to match them.

Differential Revision: https://phabricator.services.mozilla.com/D76603
2020-05-28 10:38:51 +00:00
Razvan Maries 42c461fb61 Backed out changeset 0dba60796753 (bug 1611204) for perma failures on isIntersecting-threshold.html. CLOSED TREE 2020-05-28 05:33:20 +03:00
Emilio Cobos Álvarez 42b26c66a8 Bug 1611204 - Fix IntersectionObserverEntry.isIntersecting to match other browsers. r=mstange
Note that no browser matches the spec (see
https://github.com/w3c/IntersectionObserver/issues/432), but that our
behavior is reasonably close to them. So do this to match them.

Differential Revision: https://phabricator.services.mozilla.com/D76603
2020-05-28 01:10:35 +00:00
Emilio Cobos Álvarez 6974cefbeb Bug 1619858 - Minimal cleanup of the image lazy loading code. r=hiro
We don't really need to wait till we have an inner window, really.

The mOwner is only used to create a reflector, and we don't even want to expose
this observer to script, so we could leave it null if we wanted.

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

--HG--
extra : moz-landing-system : lando
2020-03-04 21:34:20 +00:00
Frederic Wang f70d494fe7 Bug 1617154 - [intersection-observer] Accept a Document as an explicit root. r=emilio,bzbarsky
This patch allows users to specify a Document as an explicit root of an
intersection observer. For rationale, see the intent-to thread:
https://groups.google.com/forum/#!topic/mozilla.dev.platform/64nDLTAZGzY

It is implemented under a preference option enabled in Nightly:
dom.IntersectionObserverExplicitDocumentRoot.enabled
When disabled, the current TypeError exception is preserved so that
people can continue to feature detect the support.

The enhancement is tested by and enabled for the following test:
https://w3c-test.org/intersection-observer/document-scrolling-element-root.html

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

--HG--
extra : moz-landing-system : lando
2020-03-03 12:25:30 +00:00
Simon Giesecke d94419173b Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/base. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D63102

--HG--
extra : moz-landing-system : lando
2020-02-21 10:41:47 +00:00
Hiroyuki Ikezoe bd45d3d3af Bug 1613294 - Drop IntersectionObserver.callback. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62678

--HG--
extra : moz-landing-system : lando
2020-02-13 02:43:25 +00:00
Hiroyuki Ikezoe 8398acfafe Bug 1542784 - Implement lazy loading for images. r=emilio,hsivonen
Though with this initial implementation, we do create an IntersectionObserver
only for the root document in each processes, once we found issues on this
model, we can create an IntersectionObserver in each _document_.

Depends on D61437

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

--HG--
extra : moz-landing-system : lando
2020-02-12 21:31:48 +00:00
Hiroyuki Ikezoe 878e272a90 Bug 1542784 - Make DOMIntersectionObserver::mCallback Variant. r=emilio,bzbarsky
So that it can accept a callback function implemented in C++ for lazy-loading.

Depends on D61435

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

--HG--
extra : moz-landing-system : lando
2020-02-12 21:29:19 +00:00
Emilio Cobos Álvarez 3c12d374bc Bug 1600362 - Cleanup IntersectionObserver. r=smaug
Initially this was going to be a simple cleanup: Remove some useless namespaces
here and there and so on, remove `using` statements from the header and so on.

But unfortunately, DOMIntersectionObserver.h (which is included in Element.h,
unnecessarily) ended up exposing `Element` unnamespaced to a lot of code, so I
had to fix that.

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

--HG--
extra : moz-landing-system : lando
2019-11-29 20:39:36 +00:00
Emilio Cobos Álvarez b1ca51fe1e Bug 1561738 - Remove nsStyleCoord. r=boris
And move the useful bits of it somewhere else (ServoStyleConstInlines.h for the
inline function definitions, and nsFrame.cpp for the static assertions).

Differential Revision: https://phabricator.services.mozilla.com/D36120
2019-06-28 12:44:44 +02:00
Cosmin Sabou 2fa2a56685 Backed out 3 changesets (bug 1561738) for causing build bustages on nsGridContainerFrame.cpp CLOSED TREE
Backed out changeset 98f100abc2ba (bug 1561738)
Backed out changeset 9ed20d0fb9ba (bug 1561738)
Backed out changeset 483b1e134ace (bug 1561738)
2019-06-28 13:27:09 +03:00
Emilio Cobos Álvarez e023916761 Bug 1561738 - Remove nsStyleCoord. r=boris
And move the useful bits of it somewhere else (ServoStyleConstInlines.h for the
inline function definitions, and nsFrame.cpp for the static assertions).

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

--HG--
extra : moz-landing-system : lando
2019-06-28 09:46:26 +00:00
Boris Zbarsky 1c3e10afc5 Bug 1535384 part 1. Eliminate some easy cases of MOZ_CAN_RUN_SCRIPT_BOUNDARY on webidl callbacks. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D23771

--HG--
extra : moz-landing-system : lando
2019-03-19 05:24:39 +00:00
Emilio Cobos Álvarez 8101ae2ea8 Bug 1523071 - Use Rust lengths for margin / padding / inset. r=jwatt
Also for the intersection observer root margin, since it was easier to fix it
up and clean it up than not doing it.

This is the first big step to get rid of nscoord. It duplicates a bit of logic
in nsLayoutUtils since for now max/min-width/height are still represented with
nsStyleCoord, but I think I prefer to land this incrementally.

I didn't add helpers for the physical accessors of the style rect sides that
nsStyleSides has (top/bottom/left/right) since I think we generally should
encourage the logical versions, but let me know if you want me to do that.

Differential Revision: https://phabricator.services.mozilla.com/D17739
2019-02-10 04:11:58 +01:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jeff Gilbert 5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Xidorn Quan 65a9ee4d6a Bug 1448763 part 1 - Make DOMIntersectionObserver use nsStyleSides for mRootMargin, and use Servo code to serialize it. r=emilio
MozReview-Commit-ID: 8RsoLflRtzE

--HG--
extra : rebase_source : 7e9c53dafe473e77087c880ab39e5265638f0f7e
2018-04-05 18:27:33 +10:00
Olli Pettay 2acfb90235 Bug 1422092 - Revert the changes made by bug 1399603. r=mrbkap 2017-12-10 14:52:49 -05:00
Tobias Schneider ec303fba5c Bug 1399603 - [intersection-observer] Stop observing a target when intersection root is deleted. r=mrbkap
--HG--
extra : rebase_source : 2a24e8f42eb493ce8af1b2321cdec422080cf7d0
2017-10-06 07:39:54 -07:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Tobias Schneider b411281ed7 Bug 1359311 - (intersection-observer) Send update notifications in same order as observed. r=smaug
--HG--
extra : rebase_source : 36dc59e18178204e01d293db177664ca994d5117
2017-06-25 19:35:21 -07:00
Tobias Schneider b7b6c5f6b1 Bug 1319137 - (intersection-observer) Add isIntersecting property to IntersectionObserverEntry r=mrbkap,mstange
MozReview-Commit-ID: GmwpD0FYWAa

--HG--
extra : rebase_source : b87bff385f10ee97d491548d98557e0e2cd2ad21
2017-02-08 11:22:53 -08:00
Tobias Schneider 5167bc2af8 Bug 1337936 - (intersection-observer) Revise lifetime management. r=smaug
MozReview-Commit-ID: 4pzm00igBLR

--HG--
extra : rebase_source : ad9c5581f991c392f431793fde289b8ca8245bd0
2017-02-22 10:45:13 -08:00
Sebastian Hengst ae051c91a0 Backed out changeset 5f93d62d9229 (bug 1337936) for asserting in crashtest 869038.html. r=backout 2017-02-22 14:06:26 +01:00
Tobias Schneider 0da735fe74 Bug 1337936 - (intersection-observer) Revise lifetime management. r=smaug
MozReview-Commit-ID: AvdDJaRELXm

--HG--
extra : rebase_source : a3e8705822545fd4c1cee688939c617a419d3936
2017-02-21 03:13:39 -08:00
Tobias Schneider 93adeed0fe Bug 1333580 - Properly unregister last unobserved target. r=mrbkap
MozReview-Commit-ID: FfPJFSXeT98

--HG--
extra : rebase_source : d902715f419a4e3e1249d4e1d424953cbe8931e3
2017-01-24 14:11:34 -08:00
Tobias Schneider eef5af1c91 Bug 1322717 - Disconnect/Unlink in the proper order to avoid crashes in mozilla::dom::DOMIntersectionObserver::UnlinkTarget. r=mrbkap 2016-12-08 18:54:07 -08:00
Tobias Schneider bff9de0c6e Bug 1315837 - Crash in mozilla::dom::Element::UpdateIntersectionObservation. r=mrbkap 2016-11-15 15:49:00 +01:00
Andrew McCreight 12eaf5ca37 Backed out changeset 63cafb0c2f0f (bug 1315837) for causing bug 1317415. 2016-11-15 07:59:24 -08:00
Tobias Schneider 0cb90d5992 Bug 1315837 - Fix crash in mozilla::dom::Element::UpdateIntersectionObservation. r=mrbkap
--HG--
extra : rebase_source : 77edac309414e61dd103bc60668351d6e3548890
2016-11-09 09:10:00 -05:00
Tobias Schneider 5b2ef3c1db Bug 1243846 - Implement Intersection Observer API. r=mrbkap, r=mstange 2016-10-28 10:24:00 -04:00