Merge gklayout atom lists

RESOLVED FIXED

Status

()

Core
DOM
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: sicking, Assigned: sicking)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

We currently have quite a few atom lists in gklayout, nsHTMLAtoms, nsXULAtoms, nsXBLAtoms, nsLayoutAtoms, etc. This leads to a fair amout of duplication of string data as well as differences in naming of the same value ("*" and "class" both have three different names in different classes).

The various lists also leaves some usecases without an obvious list to use. For example XMLEvents uses nsHTMLAtoms although it's not HTML specific in any way.

Patch comming up to merge all these lists into a single list, nsGkAtoms.
Created attachment 208879 [details] [diff] [review]
Patch to fix

This patch creates a single list, but makes the old code work by typedefing nsLayoutAtoms etc to nsGkAtoms. At a later point we should create a separate search-n-replace patch that changes all users to use nsGkAtoms directly.

I removed all duplicate atoms which meant that I had to rename a few atoms, like ::templateAtom into ::_template. However in most cases the duplicates had the same name across the different atom lists.

The content/xslt changes are slightly different then the changes to the other atom lists since transformiix standalone still needs its own atom lists. That's all #ifdef'ed though.
Attachment #208879 - Flags: superreview?(jst)
Attachment #208879 - Flags: review?(jst)
Created attachment 208881 [details] [diff] [review]
With whitespace fixes

Forgot to run a last diff after I had done some whitespace fixes.
Attachment #208879 - Attachment is obsolete: true
Attachment #208881 - Flags: superreview?(jst)
Attachment #208881 - Flags: review?(jst)
Attachment #208879 - Flags: superreview?(jst)
Attachment #208879 - Flags: review?(jst)
Comment on attachment 208881 [details] [diff] [review]
With whitespace fixes

+		nsGkAtomList.h \
+		nsGkAtoms.h \

maybe nsGeckoAtoms would be more readable?
I went for something short, but I can't say I feel super strongly about it.
Created attachment 208898 [details] [diff] [review]
This one's golden

I realized that the previous patch doesn't build when MOZ_XUL is undefined. The only difference is that this one won't create a library for content/xul/content/src when MOZ_XUL isn't defined
Attachment #208881 - Attachment is obsolete: true
Attachment #208898 - Flags: superreview?(jst)
Attachment #208898 - Flags: review?(jst)
Attachment #208881 - Flags: superreview?(jst)
Attachment #208881 - Flags: review?(jst)
Comment on attachment 208898 [details] [diff] [review]
This one's golden

Yeah, golden :) r+sr=jst
Attachment #208898 - Flags: superreview?(jst)
Attachment #208898 - Flags: superreview+
Attachment #208898 - Flags: review?(jst)
Attachment #208898 - Flags: review+
Checked in, saved just under 3k
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED

Updated

11 years ago
Blocks: 355300
You need to log in before you can comment on or make changes to this bug.