Remove nsStyleImage.
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(5 files)
Assignee | ||
Comment 1•4 years ago
|
||
I need this to support individual #[cfg] in enum variants, which is used for
Image::PaintWorklet.
Assignee | ||
Comment 2•4 years ago
|
||
ImageLayer is almost the only usage of Image, so keeping them in the same enum
makes the resulting C++ struct smaller, and makes it map more cleanly to
nsStyleImage.
Depends on D62160
Assignee | ||
Comment 3•4 years ago
|
||
Storing it in the style value doesn't make much sense, specially since we store
drawing-dependent stuff there like the svg viewport size, which clearly depends
on the size of the frame.
This cache may not be very useful anymore, see the linked bug, but this unblocks
me with other style system cleanups and seems safer.
Depends on D62161
Assignee | ||
Comment 4•4 years ago
|
||
Tweak the ShapeSourceRepresentation so that it doesn't store Option<>s.
Some renames so that GeometryBox doesn't conflict with the Gecko type, and some
other usual bits / re-exports to deal with cbindgen and generics.
Also, drive-by derive parsing of GeometryBox as it's trivial.
Doing this unfortunately is not possible without removing nsStyleImage first, so
let's do that before.
This makes us serialize in the shortest form for shape-outside, but that's what
we should do anyway.
(aside: the shapes code is a bit too generic, maybe we should unify
ClippingShape and FloatAreaShape...)
Depends on D62162
Assignee | ||
Comment 5•4 years ago
|
||
The trickier part is that we represent -moz-image-rect as a Rect() type instead
of image with non-null clip-rect. So we need to add a bit of code to
distinguish "image request types" from other types of images.
But it's not too annoying, and we need to do the same for fancier images like
image-set and such whenever we implement it, so seems nice to get rid of
most explicit usages of nsStyleImage::GetType().
Depends on D62163
Assignee | ||
Comment 6•4 years ago
|
||
Comment 7•4 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)
This cache may not be very useful anymore, see the linked bug, but this unblocks me with other style system cleanups and seems safer.
Which bug?
Comment 8•4 years ago
|
||
How can we determine whether this cache is useful or not? I would rather remove it if, as you say, it might not be very useful any more, particularly as this change will make us hit the cache less (as each frame will have its own cache, rather than hopefully hitting the rule cache or style sharing cache across elements).
Assignee | ||
Comment 9•4 years ago
|
||
(In reply to Cameron McCormack (:heycam) from comment #8)
How can we determine whether this cache is useful or not? I would rather remove it if, as you say, it might not be very useful any more, particularly as this change will make us hit the cache less (as each frame will have its own cache, rather than hopefully hitting the rule cache or style sharing cache across elements).
Bug 1564526 (it's referenced from a comment).
It is mostly hit for tiling border images at this point, afaict, and even with that we may not be re-rasterizing (so we're just creating a cheap wrapper object).
That bug has links to more history. I'd rather not kill it just yet, but I do want to get back to that bug and measure it again, I'm sure I did do that talos try push and then forgot to check the results :(
But from my conversations with Andrew before filing that bug, I think most if not all of the performance issues that cache was working around have been fixed in imagelib.
Assignee | ||
Comment 10•4 years ago
|
||
I wonder how much of the potential sharing-across-frames is really sound, too... Seems to me those images are frame-size-dependent, right? At least the border slice depends on mImageSize
, which depends on mArea
, which depends on aBorderArea
which is just the frame size.
Comment 11•4 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/56117f18d262 Update cbindgen. r=heycam
Assignee | ||
Updated•4 years ago
|
Comment 12•4 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a3695dec8b66 Merge ImageLayer and Image. r=heycam
Comment 13•4 years ago
|
||
Backed out changeset a3695dec8b66 for causing bustages in ImageLayer
Backout link: https://hg.mozilla.org/integration/autoland/rev/fbe1f45b4c9c4f1a43f98234e1cbffd416b6b994
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=288252477&repo=autoland&lineNumber=14470
Assignee | ||
Updated•4 years ago
|
Comment 14•4 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b33496ddb1d9 Merge ImageLayer and Image. r=heycam
Comment 15•4 years ago
|
||
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/3eda66fbf7bb Remove trait bound and comment that snuck from a previous patch accidentally in a CLOSED TREE
Comment 16•4 years ago
|
||
bugherder |
Comment 17•4 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ae402b74010d Make CachedBorderImageData a frame property. r=aosmond https://hg.mozilla.org/integration/autoland/rev/c97286e92b25 Some preparation to start using cbindgen for shape-outside and clip-path. r=boris https://hg.mozilla.org/integration/autoland/rev/31f468c8c960 Use cbindgen instead of nsStyleImage. r=aosmond
Assignee | ||
Updated•4 years ago
|
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/21738 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Comment 20•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ae402b74010d
https://hg.mozilla.org/mozilla-central/rev/c97286e92b25
https://hg.mozilla.org/mozilla-central/rev/31f468c8c960
Upstream PR merged by moz-wptsync-bot
Description
•