AnonymousContent::GetElementById skips the root node

RESOLVED FIXED in Firefox 51

Status

()

defect
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: mstange, Assigned: mstange)

Tracking

Trunk
mozilla51
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox51 fixed)

Details

Attachments

(2 attachments, 2 obsolete attachments)

This required the following workaround in FinderHighlighter.jsm:

    // The outline needs to be sitting inside a container, otherwise the anonymous
    // content API won't find it by its ID later...
    let container = document.createElementNS(kNSHTML, "div");
    let outlineBox = document.createElementNS(kNSHTML, "div");
    outlineBox.setAttribute("id", kModalOutlineId);
    container.appendChild(outlineBox);
[...]
      document.insertAnonymousContent(container);
[...]
    modalHighlightOutline.setAttributeForElement(kModalOutlineId, "style", ...);

setAttributeForElement and friends should be able to find the element that document.insertAnonymousContent was called with.
Assignee: nobody → mstange
Status: NEW → ASSIGNED
Attachment #8790975 - Flags: review?(ehsan)
Comment on attachment 8790976 [details] [diff] [review]
21-Bug_1302556___Remove_the_workaround_from_FinderHighlighter_jsm__r_mikedeboer.diff

Review of attachment 8790976 [details] [diff] [review]:
-----------------------------------------------------------------

Yeah, I like this better :)
Attachment #8790976 - Flags: review?(mdeboer) → review+
Attachment #8790975 - Flags: review?(ehsan) → review?(bugs)
Attachment #8790975 - Flags: review?(bugs) → review+
Attachment #8790975 - Attachment is obsolete: true
Attachment #8790976 - Attachment is obsolete: true
Attachment #8792112 - Flags: review?(bugs)
Attachment #8792113 - Flags: review?(mdeboer)
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/59935b389c87
Start AnonymousContent::GetElementById iteration at mContentNode. r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/7fb647a90a46
Remove the workaround from FinderHighlighter.jsm. r=mikedeboer
https://hg.mozilla.org/mozilla-central/rev/59935b389c87
https://hg.mozilla.org/mozilla-central/rev/7fb647a90a46
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.