Closed Bug 1472403 Opened 6 years ago Closed 6 years ago

Simplify generated image content.

Categories

(Core :: Layout, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(1 file, 1 obsolete file)

And also avoid crashing when this runs:

<!doctype html>
<div id="target"></div>
<script>
  let element = document.createElement('_moz_generated_content_image');
  target.appendChild(element);
</script>
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.

https://phabricator.services.mozilla.com/D1897
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.

https://phabricator.services.mozilla.com/D1897
Attachment #8988968 - Flags: review+
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/mozilla-inbound/rev/365a0841117a
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: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=63239b786a26cfd8778106916eb21ddf4fa67bed&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-classifiedState=unclassified
Bustage: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-classifiedState=unclassified&selectedJob=188374654
Backout: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=63239b786a26cfd8778106916eb21ddf4fa67bed&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-classifiedState=unclassified
Log: https://treeherder.mozilla.org/logviewer.html#?job_id=188374654&repo=mozilla-inbound&lineNumber=1106

[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/rules.mk:1052: 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 emilio@crisal.io:
https://hg.mozilla.org/integration/mozilla-inbound/rev/64e944f41cd5
Simplify generated image content. r=bz,dholbert
https://hg.mozilla.org/mozilla-central/rev/64e944f41cd5
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: