Commit graph

1301 commits

Author SHA1 Message Date
Tiaan Louw
6798545271 Bug 1846249 - Change color functions to constants r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D184929
2023-08-01 13:14:32 +00:00
Cristian Tuns
df732c7c7c Backed out changeset 9763c9244933 (bug 1846249) for causing build bustages in StyleColorInlines.h CLOSED TREE 2023-08-01 07:16:19 -04:00
Tiaan Louw
cfd3c0c4e5 Bug 1846249 - Change color functions to constants r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D184929
2023-08-01 10:35:38 +00:00
Iulian Moraru
9b86bfb258 Backed out changeset 2c6e9abd5c86 (bug 1846249) for causing build bustages on ServoStyleConsts.h. CLOSED TREE 2023-07-31 22:06:34 +03:00
Tiaan Louw
54b0405222 Bug 1846249 - Change color functions to constants r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D184929
2023-07-31 18:22:46 +00:00
Emilio Cobos Álvarez
b5d6ad43a2 Bug 1844832 - Share document-independent struct allocations. r=boris
In bug 1844755, a bunch of the time is spent allocating initial values.

There used to be more document-dependent initial values before
bug 1834487, but now that's only about default-font and direction.

This improves the situation by sharing initial structs that don't depend
on the document.

Differential Revision: https://phabricator.services.mozilla.com/D184256
2023-07-26 09:16:26 +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
Emilio Cobos Álvarez
d0ceb7d44f Bug 1831850 - Remove force_inline_alttext pref. r=karlt
It's not really web compatible nor turned on by default anywhere.

Differential Revision: https://phabricator.services.mozilla.com/D177373
2023-05-08 21:38:33 +00:00
Timothy Nikkel
515fd0c083 Bug 1827318. Restore hunk from bug 1820709 that accidentally got rebased away in bug 1817360. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D175086
2023-04-11 01:03:41 +00:00
Emilio Cobos Álvarez
93a0510070 Bug 1817360 - Lazily load broken image icon. r=tnikkel
With the patches of bug 1815229, these errors appear:

browser/base/content/test/performance/browser_startup_images.js | Loaded image resource://gre-resources/loading-image.png should have been shown

It's a real issue, where we eagerly load the broken image icon and so on
even though we don't use them.

This fixes it by lazily-loading the icon once, only when needed.

Differential Revision: https://phabricator.services.mozilla.com/D170159
2023-03-24 14:56:34 +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
5c659eb4ed Bug 1823764 - Use HasNonEmptyAttr to choose between XUL src and list-style-image. r=tnikkel,layout-reviewers
This preserves the previous behavior more exactly and fixes the display
of the icons, which have src="" but expect list-style-image to take
effect.

Depends on D173265

Differential Revision: https://phabricator.services.mozilla.com/D173266
2023-03-22 11:50:06 +00:00
Emilio Cobos Álvarez
8d249fa588 Bug 1684958 - Support rendering content: <gradient> images. r=dholbert,devtools-reviewers
We implemented support for list-style-image anyways.

Differential Revision: https://phabricator.services.mozilla.com/D172343
2023-03-14 12:11:34 +00:00
Emilio Cobos Álvarez
77551e3034 Bug 1817219 - Remove ContentUrlOnImageContent telemetry. r=layout-reviewers,tnikkel
Bug 1484928 is fixed, we should've removed this then.

Differential Revision: https://phabricator.services.mozilla.com/D172106
2023-03-09 11:43:41 +00:00
Timothy Nikkel
b340c8b127 Bug 1820709. Make nsImageFrame use nsDisplayListBuilder::GetImageDecodeFlags. r=emilio
This will mean we always pass FLAG_SYNC_DECODE_IF_FAST (unless we are already passing the sync decode flag). The fact that we weren't doing this already is an oversight, we want to do this for all images we paint on the normal painting path. However what makes this more important is that we folded nsImageBoxFrame into nsImageFrame recently (bug 1815229), and nsImageBoxFrame eagerly decodes all its images and keeps them decoded, and also uses FLAG_SYNC_DECODE_IF_FAST (because with multiple sized decodes eager decodes don't cover everything). So this should help us avoid regressing visually with xul images.

Differential Revision: https://phabricator.services.mozilla.com/D171828
2023-03-07 10:16:46 +00:00
Timothy Nikkel
4b73051e3b Bug 1820709. Make nsDisplayAltFeedback::CreateWebRenderCommands sync decode just like nsDisplayAltFeedback::Paint. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171827
2023-03-07 10:16:02 +00:00
Emilio Cobos Álvarez
0179d6715f Bug 1818432 - Provide intrinsic size from theme for xul images that are themed but don't have any images. r=tnikkel,layout-reviewers
This restores previous behavior of <xul:image>.

Differential Revision: https://phabricator.services.mozilla.com/D170743
2023-02-23 12:49:12 +00:00
Emilio Cobos Álvarez
4238513610 Bug 1818141 - Update image when going from non-null to null XUL image request. r=tnikkel
Otherwise we end up with a stale intrinsic size.

Differential Revision: https://phabricator.services.mozilla.com/D170594
2023-02-22 12:50:23 +00:00
Emilio Cobos Álvarez
a228002bd2 Bug 1815229 - Remove nsImageBoxFrame. r=tnikkel,layout-reviewers
nsImageFrame has support for displaying style URIs / an owned image
request, so use it.

The main behavior difference is that we don't fire `load` / `error`
events for those images anymore, but I don't see any event listener for
those around, so I think they can go.

Differential Revision: https://phabricator.services.mozilla.com/D168958
2023-02-21 17:36:11 +00:00
Jonathan Kew
4594ae314a Bug 1815404 - Replace most uses of gfxContext::CreateOrNull with stack-allocated contexts. r=gfx-reviewers,lsalzman
Depends on D170370

Differential Revision: https://phabricator.services.mozilla.com/D170371
2023-02-21 07:28:25 +00:00
Jonathan Kew
1b3e69f8aa Bug 1815404 - Remove refcounting from gfxContext. r=gfx-reviewers,lsalzman
Depends on D170367

Differential Revision: https://phabricator.services.mozilla.com/D170369
2023-02-21 07:28:24 +00:00
Emilio Cobos Álvarez
5514dadfb2 Bug 1817360 - Remove browser.display.show_loading_image_placeholder. r=tnikkel
This pref has been false since forever, completely untested, and I see
no references to it anywhere. I'm pretty sure having a loading image
placeholder wouldn't be web compatible, particularly in the current days
with all the lazy-loading shenanigans etc.

I propose just removing this code, and simplifying surrounding code for
clarity.

Differential Revision: https://phabricator.services.mozilla.com/D170158
2023-02-17 09:25:20 +00:00
Emilio Cobos Álvarez
631d4770aa Bug 1817360 - Clean-up image icon loading code. r=tnikkel
* Use static prefs.
 * Move IconLoad to the cpp file since it's only used in one translation
   unit.

This is in preparation to make the image loads lazy.

Differential Revision: https://phabricator.services.mozilla.com/D170157
2023-02-17 09:25:19 +00:00
Emilio Cobos Álvarez
d957332938 Bug 1815229 - Factor out owned request clean-up into its own method. r=tnikkel,layout-reviewers
We're about to use it a bit more.

Switch to CancelAndForgetObserver, since we will call it in the future from
other places that aren't frame destruction. This doesn't change behavior of the
existing caller because we call mListener->SetFrame(nullptr), which effectively
no-ops the listener

Differential Revision: https://phabricator.services.mozilla.com/D169985
2023-02-17 01:53:24 +00:00
Emilio Cobos Álvarez
45abd683e8 Bug 1815229 - Use member initializers a bit more in nsImageFrame. r=tnikkel,layout-reviewers
Depends on D169985

Differential Revision: https://phabricator.services.mozilla.com/D169986
2023-02-16 22:40:46 +00:00
Emilio Cobos Álvarez
19336bc7fa Bug 1815229 - Factor out a few PresContext() calls in nsImageFrame::Init. r=tnikkel,layout-reviewers
Depends on D169983

Differential Revision: https://phabricator.services.mozilla.com/D169984
2023-02-16 12:10:09 +00:00
Emilio Cobos Álvarez
c55000c6b8 Bug 1815229 - Implement nsImageFrame::GetImageFromStyle with a switch statement. r=tnikkel,layout-reviewers
We're about to add a new Kind, so this makes it a bit easier to follow
once that's done, IMO. Also prevents people from forgetting to update
that method in the future.

Depends on D169982

Differential Revision: https://phabricator.services.mozilla.com/D169983
2023-02-16 12:10:09 +00:00
Emilio Cobos Álvarez
fb091b8e13 Bug 1815229 - Rename nsImageFrame::mContentURLRequest and related members. r=tnikkel,layout-reviewers
It's not for content: url() only anymore (we also use it for
list-style-image, and soon for XUL images too). The difference is that
the frame owns that request (vs. the image content).

Depends on D169981

Differential Revision: https://phabricator.services.mozilla.com/D169982
2023-02-16 12:10:09 +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
Robert Longson
2ec308723b Bug 1651129 - Convert uses of mState to various StateBits methods and make mState private r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D169943
2023-02-15 21:35:46 +00:00
Sean Feng
8f0d50d3c1 Bug 1815913 - Init nsImageMap more eagerly r=emilio
Since we are initializing nsImageMap lazily, it's possible for area elements
stays non-focusable when autofocus code tries to focus it. So to fix
this, we need to ensure nsImageMap is initialized early enough.

Differential Revision: https://phabricator.services.mozilla.com/D168166
2023-02-13 15:52:40 +00:00
Noemi Erli
7b9b08a5ed Backed out changeset b7c94e151005 (bug 1815913) for causing failures in test_HTMLSpec.html CLOSED TREE 2023-02-09 23:52:01 +02:00
Sean Feng
a91a861e4b Bug 1815913 - Init nsImageMap more eagerly r=emilio
Since we are initializing nsImageMap lazily, it's possible for area elements
stays non-focusable when autofocus code tries to focus it. So to fix
this, we need to ensure nsImageMap is initialized early enough.

Differential Revision: https://phabricator.services.mozilla.com/D168166
2023-02-09 17:05:34 +00:00
Manuel Bucher
17df5816aa Bug 1771867 - Early Hints Phase 2 - Part 7: Pass early hint preload to image preloader r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161177
2022-12-02 16:15:55 +00:00
Martin Robinson
abb5044ca7 Bug 1803377 - Rename the values of the IntrinsicDirty enum r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163607
2022-12-02 12:27:31 +00:00
Csoregi Natalia
5a260d61a4 Backed out 13 changesets (bug 1771867) for causing CanonicalBrowsingContext crashes. CLOSED TREE
Backed out changeset 120838b58449 (bug 1771867)
Backed out changeset aea7ca0bbd17 (bug 1771867)
Backed out changeset 2fe2afdee09d (bug 1771867)
Backed out changeset 8bdb1f682d22 (bug 1771867)
Backed out changeset a9f3158ed688 (bug 1771867)
Backed out changeset 1177913e1edf (bug 1771867)
Backed out changeset d33ccbbf407d (bug 1771867)
Backed out changeset 110ac12e16f5 (bug 1771867)
Backed out changeset 7f20525f5e94 (bug 1771867)
Backed out changeset b3d65b1aa872 (bug 1771867)
Backed out changeset 7cdf3cef2773 (bug 1771867)
Backed out changeset 5090eae24a5c (bug 1771867)
Backed out changeset f8a03d226c73 (bug 1771867)
2022-12-02 13:44:55 +02:00
Manuel Bucher
e4a53f90d5 Bug 1771867 - Early Hints Phase 2 - Part 7: Pass early hint preload to image preloader r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161177
2022-12-02 09:45:26 +00:00
Razvan Cojocaru
1629218702 Bug 1060421 - Change the type of [Int]PointTyped::[x|y] back to [Int]CoordTyped. r=botond
[Int]CoordTyped no longer inherits Units because otherwise
instances of [Int]IntPointTyped may get one Base subobject because
it inherits Units, and others because of BasePoint's Coord members,
which end up increasing the [Int]CoordTyped's objects size (since
according to the ISO C++ standard, different Base subobject are
required to have different addresses).

Differential Revision: https://phabricator.services.mozilla.com/D160713
2022-11-04 18:29:35 +00:00
Timothy Nikkel
a8037fdc9b Bug 1795990. Remove unused nsImageFrame/nsImageBoxFrame::RestartAnimation/StopAnimation. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D159630
2022-10-21 06:03:52 +00:00
Dan Robertson
2eb1b8240a Bug 1655598 - Cross origin image request should not respect image orientation. r=emilio
A cross origin image request should not respect the given style image
orientation, but should use any image orientation provided by the image.

Differential Revision: https://phabricator.services.mozilla.com/D156919
2022-09-28 03:56:57 +00:00
Dan Robertson
b7b30e5a1d Bug 1655598 - The imgIRequest uri attribute should be infallible. r=emilio
The implementation of GetURI always returns NS_OK, and therefore the URI can
be marked as infallible.

Differential Revision: https://phabricator.services.mozilla.com/D157009
2022-09-28 03:56:57 +00:00
Butkovits Atila
d45dd05bf4 Backed out 2 changesets (bug 1655598) for causing Bug 1792435. a=backout
Backed out changeset 9eb3b3e7295b (bug 1655598)
Backed out changeset 052c6f05c623 (bug 1655598)
2022-09-27 12:37:10 +03:00
Dan Robertson
607672e1b4 Bug 1655598 - Cross origin image request should not respect image orientation. r=emilio
A cross origin image request should not respect the given style image
orientation, but should use any image orientation provided by the image.

Differential Revision: https://phabricator.services.mozilla.com/D156919
2022-09-25 00:07:56 +00:00
Dan Robertson
6b7a505d18 Bug 1655598 - The imgIRequest uri attribute should be infallible. r=emilio
The implementation of GetURI always returns NS_OK, and therefore the URI can
be marked as infallible.

Differential Revision: https://phabricator.services.mozilla.com/D157009
2022-09-25 00:07:55 +00:00
Martin Robinson
3b0ff9fae9 Bug 1791760 - Move GetContainSizeAxes to nsIFrame r=emilio
This will allow this function to eventually return an appropriate value
depending on whether or not content is skipped via `content-visibility:
auto`. This change also starts looking directly at whether
content-visibility is skipping content or not, which should make it
compatible with a future `content-visibility: auto` implementation.

Differential Revision: https://phabricator.services.mozilla.com/D157831
2022-09-22 12:11:09 +00:00
Martin Robinson
f943c5f18d Bug 1789255: Anonymous children of elements with content-visibility should not be skipped for layout r=emilio
Some anonymous children are important for properly sizing their parents
even when those parents hide content with `content-visibility`. This is
shown by regressions in the proper layout of some form elements with
`content-visibility`.

This change introduces a more conservative approach for avoiding layout
of hidden content. Instead of leaving all children dirty during reflow,
reflow anonymous frames (and nsComboboxDisplayFrame, a specialized kind
of anonymous frame). This change means that frames may only lay out some
of their children, so it must introduce some more changes to assumptions
during line layout.

In addition, this change renames `content-visibility` related methods in
nsIFrame in order to make it more obvious what they do.

Differential Revision: https://phabricator.services.mozilla.com/D157306
2022-09-15 20:32:27 +00:00
Norisz Fay
fd54c095de Backed out changeset c3780baf6f24 (bug 1789255) for causing build bustages CLOSED TREE 2022-09-15 21:14:04 +03:00
Martin Robinson
631f1807ed Bug 1789255: Anonymous children of elements with content-visibility should not be skipped for layout r=emilio
Some anonymous children are important for properly sizing their parents
even when those parents hide content with `content-visibility`. This is
shown by regressions in the proper layout of some form elements with
`content-visibility`.

This change introduces a more conservative approach for avoiding layout
of hidden content. Instead of leaving all children dirty during reflow,
reflow anonymous frames (and nsComboboxDisplayFrame, a specialized kind
of anonymous frame). This change means that frames may only lay out some
of their children, so it must introduce some more changes to assumptions
during line layout.

In addition, this change renames `content-visibility` related methods in
nsIFrame in order to make it more obvious what they do.

Differential Revision: https://phabricator.services.mozilla.com/D157306
2022-09-15 17:56:42 +00:00
Sandor Molnar
4009825526 Backed out changeset 3a5759eabb42 (bug 1789255) for causing wpt failures in netwerk/protocol/http/Http2Session.cpp CLOSED TREE 2022-09-14 02:01:36 +03:00