Closed Bug 1472403 Opened Last year Closed Last year

Simplify generated image content.


(Core :: Layout, enhancement, P3)




Tracking Status
firefox63 --- fixed


(Reporter: emilio, Assigned: emilio)




(1 file, 1 obsolete file)

And also avoid crashing when this runs:

<!doctype html>
<div id="target"></div>
  let element = document.createElement('_moz_generated_content_image');
This way we reuse the same machinery everywhere for the content property.

The only difference is that we need to look at the parent style for content
instead of just our style, and at a given index.

Again, this is fine because changing content reframes, so no chance to mess up.

This allows the generated content stuff to not implement nsImageLoadingContent
and all that stuff, nor deal with events, which makes it much simpler IMO.

Now it just tracks an index. We may not even need for it to be an HTML element,
but I've kept that for now.

I added a crashtest that used to crash because of the bogus
nsCSSFrameConstructor code which trusted the node name without checking it was
native anonymous.
The ::after pseudo-element will already have an image frame for it if there's
only one content entry, so no point in doing this.
I messed up while pushing the patches, but 'Don't create an nsGenConImageContent for ::after { content: url(..) }. r=dholbert' should be before 'Simplify generated image content.'.

I think I did put the relation correctly in Phabricator though.
> And also avoid crashing when this runs:

Ouch.  So we used to fail to init the image frame, but replaced that with a RUNTIMEABORT in bug 852428....   At least it was a safe crash.  Now I guess we get null-derefs...
Attachment #8988969 - Attachment is obsolete: true
Comment on attachment 8988968 [details]
Bug 1472403: Simplify generated image content.

Daniel Holbert [:dholbert] has approved the revision.
Attachment #8988968 - Flags: review+
Flags: needinfo?(bzbarsky)
Priority: -- → P3
(sorry for unexplained needinfo -- I initially added that to mirror the pending review on phabricator, but then thought better of it because emilio might want to update the patch before bz takes a look [not sure].  But then I forgot to clear the needinfo field before hitting save. :) Doing that now.)
Flags: needinfo?(bzbarsky)
Comment on attachment 8988968 [details]
Bug 1472403: Simplify generated image content.

Boris Zbarsky [:bz] (no decent commit message means r-) has approved the revision.
Attachment #8988968 - Flags: review+
Pushed by
Simplify generated image content. r=bz,dholbert
Backed out 2 changesets (bug 1473813, bug 1472403) for bustages in /builds/worker/workspace/build/src/dom/base/MessageSender.cpp:24:19 on a CLOSED TREE

Problematic push:

[task 2018-07-16T15:43:18.277Z] 15:43:18     INFO -  In file included from /builds/worker/workspace/build/src/obj-firefox/dom/base/Unified_cpp_dom_base3.cpp:2:
[task 2018-07-16T15:43:18.278Z] 15:43:18     INFO -  /builds/worker/workspace/build/src/dom/base/MessageSender.cpp:24:19: error: member access into incomplete type 'mozilla::dom::MessageBroadcaster'
[task 2018-07-16T15:43:18.279Z] 15:43:18     INFO -      mParentManager->AddChildManager(this);
[task 2018-07-16T15:43:18.279Z] 15:43:18     INFO -                    ^
[task 2018-07-16T15:43:18.281Z] 15:43:18     INFO -  /builds/worker/workspace/build/src/dom/base/nsFrameMessageManager.h:52:7: note: forward declaration of 'mozilla::dom::MessageBroadcaster'
[task 2018-07-16T15:43:18.282Z] 15:43:18     INFO -  class MessageBroadcaster;
[task 2018-07-16T15:43:18.283Z] 15:43:18     INFO -        ^
[task 2018-07-16T15:43:18.284Z] 15:43:18     INFO -  1 error generated.
[task 2018-07-16T15:43:18.285Z] 15:43:18     INFO -  /builds/worker/workspace/build/src/config/ recipe for target 'Unified_cpp_dom_base3.o' failed
[task 2018-07-16T15:43:18.286Z] 15:43:18     INFO -  make[4]: *** [Unified_cpp_dom_base3.o] Error 1
[task 2018-07-16T15:43:18.286Z] 15:43:18     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/dom/base'
[task 2018-07-16T15:43:18.287Z] 15:43:18     INFO -  make[4]: *** Waiting for unfinished jobs....
Flags: needinfo?(emilio)
Flags: needinfo?(emilio)
Pushed by
Simplify generated image content. r=bz,dholbert
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.