Commit graph

254 commits

Author SHA1 Message Date
Sean Feng
539e32202b Bug 1722322 - Implement LargestContentfulPaint r=emilio
Spec: https://w3c.github.io/largest-contentful-paint

Differential Revision: https://phabricator.services.mozilla.com/D151079
2023-11-02 20:53:36 +00:00
Sandor Molnar
a4163792c6 Backed out 7 changesets (bug 1722322) for causing bp-nu bustages
Backed out changeset 0ebd32e273b8 (bug 1722322)
Backed out changeset 7a75717f127c (bug 1722322)
Backed out changeset c2a6440a83d7 (bug 1722322)
Backed out changeset 9955756855bd (bug 1722322)
Backed out changeset 37fccb407777 (bug 1722322)
Backed out changeset f52b1f28f753 (bug 1722322)
Backed out changeset 0121c8cf5d2f (bug 1722322)
2023-11-02 21:27:24 +02:00
Sean Feng
611093989e Bug 1722322 - Implement LargestContentfulPaint r=emilio
Spec: https://w3c.github.io/largest-contentful-paint

Differential Revision: https://phabricator.services.mozilla.com/D151079
2023-11-02 17:04:47 +00:00
CanadaHonk
2e45b3450f Bug 1622090 - Implement loading=lazy for <iframe> r=emilio
Initial implementation for <iframe loading=lazy>

Also cleaned up some image lazy loading to be generalised
(sharing an intersection observer and some enums/funcs in Element).

Unimplemented details:
 - Window load should not wait for in view lazy loading iframes.
   Unplanned for this patch and ship for now.
   (Chromium fail, WebKit pass)

We also pass some other WPTs other engines do not too already too.
Also added a WPT to ensure using parse-time base URI for lazy -> eager iframes.

Differential Revision: https://phabricator.services.mozilla.com/D190662
2023-10-18 14:13:29 +00:00
Sylvestre Ledru
d0f6c7fc66 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan
6a90f5eded Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru
cc8a0ee742 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
Timothy Nikkel
a26b77250a Bug 1857503. Avoid QI and addref when checking if an img has an imagemap. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D190286
2023-10-07 04:46:14 +00:00
Emilio Cobos Álvarez
1258d560fb Bug 1850238 - Make BROKEN state non-intrinsic. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D187108
2023-08-31 09:20:40 +00:00
Cristina Horotan
4487727b74 Backed out 3 changesets (bug 1850238, bug 1850161) for causing multiple failures at Element.cpp CLOSED TREE
Backed out changeset 30526c800ca7 (bug 1850161)
Backed out changeset ebc81e5e7750 (bug 1850161)
Backed out changeset e66a62c2f8c5 (bug 1850238)
2023-08-31 12:12:05 +03:00
Emilio Cobos Álvarez
cbfc2b9552 Bug 1850238 - Make BROKEN state non-intrinsic. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D187108
2023-08-31 07:46:24 +00:00
Emilio Cobos Álvarez
6070e00f0a Bug 1850342 - Remove non-standard, un-tested :-moz-loading pseudo-class. r=layout-reviewers,jfkthame
This is technically web-exposed, but if we needed to introduce it for
compat we could always re-introduce it matching false.

Differential Revision: https://phabricator.services.mozilla.com/D186938
2023-08-30 10:38:52 +00:00
Iulian Moraru
9a9b90c906 Backed out changeset f0edb489e577 (bug 1850342) for causing dt failures on browser_rules_inactive_css_visited.js. CLOSED TREE 2023-08-30 01:24:44 +03:00
Emilio Cobos Álvarez
afdec6f2a3 Bug 1850342 - Remove non-standard, un-tested :-moz-loading pseudo-class. r=layout-reviewers,jfkthame
This is technically web-exposed, but if we needed to introduce it for
compat we could always re-introduce it matching false.

Differential Revision: https://phabricator.services.mozilla.com/D186938
2023-08-29 20:57:30 +00:00
Cosmin Sabou
5b129b77c5 Backed out changeset f14569b8319b (bug 1850342) for causing dt failures on browser_rules_inactive_css_visited.js. CLOSED TREE 2023-08-29 21:14:42 +03:00
Emilio Cobos Álvarez
286082f4f1 Bug 1850342 - Remove non-standard, un-tested :-moz-loading pseudo-class. r=layout-reviewers,jfkthame
This is technically web-exposed, but if we needed to introduce it for
compat we could always re-introduce it matching false.

Differential Revision: https://phabricator.services.mozilla.com/D186938
2023-08-29 16:56:37 +00:00
Natalia Csoregi
62728fe34c Backed out changeset b387df97a255 (bug 392994) for causing failures on test_interactive_content_in_label.html. CLOSED TREE 2023-07-19 09:19:56 +03:00
Jonathan Kingston
1018b9b1fe Bug 392994 - Remove support for usemap for Object and Input elements. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D182684
2023-07-19 05:22:06 +00:00
Emilio Cobos Álvarez
4cc6758558 Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar
We have more readable and faster versions (that just omit the namespace
arg).

Mostly done via sed, with a couple helpers to use the faster lookups
where possible.

Differential Revision: https://phabricator.services.mozilla.com/D181795
2023-06-23 10:01:32 +00:00
Cristina Horotan
360049e026 Backed out changeset ade350a1d864 (bug 1818141) for causing multiple failures at RestyleManager.cpp 2023-05-18 01:49:46 +03:00
Emilio Cobos Álvarez
e8ac6a8503 Bug 1818141 - Clean up a bit image updates. r=tnikkel
This shouldn't change behavior but reduces the amount of code paths
where we update the internal image state.

Depends on D170594

Differential Revision: https://phabricator.services.mozilla.com/D170595
2023-05-17 21:13:07 +00:00
Karl Tomlinson
18b008f783 Bug 1822404 don't force image state for poster anonymous img r=emilio
so that the nsImageFrame can release a previous image and trigger reflow on
BROKEN state change when src is removed.

Differential Revision: https://phabricator.services.mozilla.com/D177360
2023-05-10 00:42:47 +00:00
Emilio Cobos Álvarez
91e6e4c5d4 Bug 1823686 - Share URLExtraData between SVG attribute mapping and style attribute. r=smaug
I don't think there's ever a way these should differ.

Got some include hell from removing ReferrerInfo.h from Document.h but
hopefully should be straight-forward to review.

Depends on D173154

Differential Revision: https://phabricator.services.mozilla.com/D173155
2023-03-22 14:54:43 +00:00
Emilio Cobos Álvarez
d75756ca11 Bug 1815229 - Rename nsImageFrame::Kind::ImageElement to ImageLoadingContent. r=tnikkel,layout-reviewers
We are about to introduce a kind for <xul:image> elements, so this makes
the naming less confusing.

Differential Revision: https://phabricator.services.mozilla.com/D169981
2023-02-16 12:10:08 +00:00
Emilio Cobos Álvarez
131e185fbc Bug 1797798 - Make sync load of images when there's no existing image work too. r=tnikkel
Otherwise the image frame doesn't get the image until the OnImageLoaded
notification arrives. See the test-case on why does this matter.

Differential Revision: https://phabricator.services.mozilla.com/D160659
2022-10-28 21:56:05 +00:00
Olli Pettay
35083f75e6 Bug 1574487 - Remove loadstart and loadend event from <img>, r=edgar
Depends on D159930

Differential Revision: https://phabricator.services.mozilla.com/D159931
2022-10-25 08:27:02 +00:00
Norisz Fay
81c86f9a79 Backed out 3 changesets (bug 1644658, bug 1574487, bug 1644656) for causing mochitest failures on browser_staticPartition_saveAs.js CLOSED TREE
Backed out changeset ccd076f67748 (bug 1574487)
Backed out changeset 2235323f0cf9 (bug 1644656)
Backed out changeset 7fe2c7526246 (bug 1644658)
2022-10-25 02:22:37 +03:00
Olli Pettay
00ec8a85bc Bug 1574487 - Remove loadstart and loadend event from <img>, r=edgar
Depends on D159930

Differential Revision: https://phabricator.services.mozilla.com/D159931
2022-10-24 20:33:04 +00:00
Emilio Cobos Álvarez
9897cb6fe5 Bug 1781096 - Fix decoding="sync" when the frame is created after the image attribute. r=tnikkel
The fix is the one line in
nsImageLoadingContent::MaybeForceSyncDecoding, but I added new asserts
that should prevent this from regressing in the future.

Differential Revision: https://phabricator.services.mozilla.com/D154815
2022-08-17 10:10:26 +00:00
Greg Tatum
3c686461e9 Bug 1782579 - Pass languages to the text recognition api; r=nordzilla,emilio
Differential Revision: https://phabricator.services.mozilla.com/D153668
2022-08-10 19:38:46 +00:00
Greg Tatum
d2d1bca50b Bug 1782578 - Put the img shadow DOM behind a preference r=nordzilla
This code will most likely be removed, but for now I am putting it
behind a pref so that it won't be activated when the modal is being
created.

See Bug 1782582 for the removal of the code.

Differential Revision: https://phabricator.services.mozilla.com/D153393
2022-08-10 19:38:44 +00:00
Norisz Fay
8bc30afa79 Backed out 6 changesets (bug 1782578, bug 1782579) for causing mochitest failures on browser_parsable_css.js CLOSED TREE
Backed out changeset bdb42cfe6213 (bug 1782579)
Backed out changeset 5f17ee4cc4df (bug 1782578)
Backed out changeset 4f969d46dd37 (bug 1782578)
Backed out changeset b4c51d1ffa99 (bug 1782578)
Backed out changeset 98d0d6bcd37b (bug 1782578)
Backed out changeset 8332d678079e (bug 1782578)
2022-08-10 20:19:31 +03:00
Greg Tatum
980c8191a3 Bug 1782579 - Pass languages to the text recognition api; r=nordzilla,emilio
Differential Revision: https://phabricator.services.mozilla.com/D153668
2022-08-10 16:08:46 +00:00
Greg Tatum
2ab79f551c Bug 1782578 - Put the img shadow DOM behind a preference r=nordzilla
This code will most likely be removed, but for now I am putting it
behind a pref so that it won't be activated when the modal is being
created.

See Bug 1782582 for the removal of the code.

Differential Revision: https://phabricator.services.mozilla.com/D153393
2022-08-10 16:08:43 +00:00
Emilio Cobos Álvarez
3840211485 Bug 1782247 - Don't track images if our frame is not associated to them. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D153474
2022-08-03 18:23:43 +00:00
Marian-Vasile Laza
2fcc83a357 Backed out changeset cebf54456944 (bug 1782247) for causing bc failures on browser_windowopen.js. CLOSED TREE 2022-08-03 06:10:05 +03:00
Emilio Cobos Álvarez
327f798d53 Bug 1782247 - Don't track images if our frame is not associated to them. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D153474
2022-08-03 01:40:37 +00:00
Emilio Cobos Álvarez
255763ef57 Bug 1773070 - Unify Gecko and Servo EventState/ElementState bits. r=smaug
Add a dom/base/rust crate called just "dom" where we can share these.

Most of the changes are automatic:

  s/mozilla::EventStates/mozilla::dom::ElementState/
  s/EventStates/ElementState/
  s/NS_EVENT_STATE_/ElementState::/
  s/NS_DOCUMENT_STATE_/DocumentState::/

And so on. This requires a new cbindgen version to avoid ugly casts for
large shifts.

Differential Revision: https://phabricator.services.mozilla.com/D148537
2022-06-07 23:09:52 +00:00
Greg Tatum
6de8a36757 Bug 1759504 - Return the ImageText results from recognizeCurrentImageText r=emilio,nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D143423
2022-06-03 16:01:33 +00:00
Greg Tatum
b0b5b0333b Bug 1759504 - Prototype a UAWidget for TextRecognition r=emilio,nordzilla
Note this is an experiment in getting functionality going for text
recognition. It may be possible to do this more efficiently from
the C++ side of things, but this will allow for rapid experimentation
while working with UX.

Differential Revision: https://phabricator.services.mozilla.com/D143422
2022-06-03 16:01:33 +00:00
criss
6362d2b06a Backed out 7 changesets (bug 1759504) for causing Android build bustages on NodeListBinding.cpp
Backed out changeset d1f1173aecfc (bug 1759504)
Backed out changeset a14a874c57b0 (bug 1759504)
Backed out changeset b9beaecf9708 (bug 1759504)
Backed out changeset dc1be2f0e0b6 (bug 1759504)
Backed out changeset a0b089fb747b (bug 1759504)
Backed out changeset b5f762f1f22e (bug 1759504)
Backed out changeset a21b8153ca2a (bug 1759504)
2022-06-02 19:52:05 +03:00
Greg Tatum
9011e6d570 Bug 1759504 - Return the ImageText results from recognizeCurrentImageText r=emilio,nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D143423
2022-06-02 14:31:42 +00:00
Greg Tatum
952a336446 Bug 1759504 - Prototype a UAWidget for TextRecognition r=emilio,nordzilla
Note this is an experiment in getting functionality going for text
recognition. It may be possible to do this more efficiently from
the C++ side of things, but this will allow for rapid experimentation
while working with UX.

Differential Revision: https://phabricator.services.mozilla.com/D143422
2022-06-02 14:31:42 +00:00
Emilio Cobos Álvarez
d8e66dd689 Bug 1759204 - Add an HTMLImageElement.recognizeCurrentImageText ChromeOnly API to test text recognition and create the shadow root. r=aosmond
We could expose the text recognition values to JS if need be, but
there's no reason to do that for now. We expose them via the UA
widget DOM for now.

We can trivially do that if we want to build the Shadow DOM in JS
or what not. I decided to still return a promise so that we can
expose errors though.

Differential Revision: https://phabricator.services.mozilla.com/D141113
2022-03-15 18:14:08 +00:00
Emilio Cobos Álvarez
369b7d355a Bug 1759204 - Minor drive-by nsImageLoadingContent cleanups. r=aosmond
There's no need to QI etc to go from nsImageLoadingContent to
nsINode/nsIContent.

Depends on D141110

Differential Revision: https://phabricator.services.mozilla.com/D141111
2022-03-15 18:14:08 +00:00
Emilio Cobos Álvarez
3e6347714a Bug 1753453 - Don't send OnUnlockedDraw for non-animated images. r=aosmond
We're checking animation consumers, not locked status. We don't care
about animation consumer count of non-animated images.

Depends on D137765

Differential Revision: https://phabricator.services.mozilla.com/D137766
2022-02-03 17:31:42 +00:00
Emilio Cobos Álvarez
2875aa2568 Bug 1753453 - Cache animated image status in nsImageLoadingContent. r=aosmond
Depends on D137764

Differential Revision: https://phabricator.services.mozilla.com/D137765
2022-02-03 17:31:41 +00:00
Emilio Cobos Álvarez
03edb20cd4 Bug 1753453 - Don't go to the underlying image to check animated status. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D137762
2022-02-03 17:31:41 +00:00
Olli Pettay
a20bf5465f Bug 1731132, unsuppress painting on top level content presshells sooner, r=emilio
Unsuppressing is done only if the page can use stylesheet cache. That should mean the
load isn't a cold load and also some other resources may be cached and thus
painting could happen sooner.

There is currently a regression around dom.ipc.processCount.webIsolated handling, but the
testing has been done with dom.ipc.processCount.webIsolated==1, and the patch for bug 1731792
should give back similar behavior as what process count 1 has.

Differential Revision: https://phabricator.services.mozilla.com/D125878
2021-09-28 12:04:42 +00:00
Emilio Cobos Álvarez
1a9f151583 Bug 1709577 - Fix invalid src events for images. r=edgar
My previous patch still causes one WPT regression (invalid-src.html),
because we stopped firing error event for src="". However that test
times out because it doesn't correctly handle the invalid URI case. This
patch fixes it and cleans up the code a bit.

This fixes bug 1466138 too, and matches Chrome.

Differential Revision: https://phabricator.services.mozilla.com/D114495
2021-05-07 13:56:33 +00:00