Closed Bug 414568 Opened 13 years ago Closed 13 years ago
Duplicate content created with xml template
1.07 KB, patch
|Details | Diff | Splinter Review|
267 bytes, text/xml
544 bytes, application/vnd.mozilla.xul+xml
The menuitem content in this XUL template is created twice.
The problem occurs because a call to nsXULElement::GetChildCount occurs while processing the template query which in turn calls nsXULElement::EnsureContentsGenerated which ends up trying to build the template again, causing two sets of content to be output. This patch clears the lazy state before parsing the query.
The testcases seems to work here; I get a menu which has three different items. Do I need to run it locally or as chrome?
Bah, looks like you need to save the test locally, or run from chrome.
Status: NEW → ASSIGNED
ok, I can reproduce this only when run locally as chrome. (-chrome)
Comment on attachment 300021 [details] [diff] [review] fix I was wondering whether GetChildCount would return wrong value with this change, but as far as I see no. The query part isn't generated.
Attachment #300021 - Flags: review?(Olli.Pettay) → review+
Neil - why is this nomed for blocking?
Actually, this doesn't need to be blocking.
Attachment #300021 - Flags: superreview?(peterv) → superreview+
Comment on attachment 300021 [details] [diff] [review] fix Test will be added after bug 378893 is in
Attachment #300021 - Flags: approval1.9?
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.