User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Adding a new CSS Pseudo-Element for <meter> made this assert to fault during compilation : (nsStyleContext.cpp, line 79)
PR_STATIC_ASSERT((PR_UINT32_MAX >> NS_STYLE_CONTEXT_TYPE_SHIFT) >=
Uh... this is not a 32-bit vs 64-bit issue.
Right now nsStyleContext stores the pseudo-element type in mBits. It also stores the NS_STYLE_INHERIT_MASK and some additional boolean bits there. That leaves 4 bits for the pseudo-element type. So your pseudo-element enum needs to fit in 4 bits right now.
I believe that we currently have 23 style structs but NS_STYLE_INHERIT_MASK is 0x00ffffff. So what you could do is change NS_STYLE_INHERIT_MASK to 0x008fffff (if this is not safe the static assert in nsStyleStruct.cpp will tell you) and then shift down by one the 4 style context boolean bits and change NS_STYLE_CONTEXT_TYPE_SHIFT to 27. That will give you 5 bits for the pseudo-element type, which should be good enough for now.
Created attachment 534824 [details] [diff] [review]
Changed NS_STYLE_INHERIT_MASK to 0x007fffff and adjusted the other masks.
NS_STYLE_HAS_TEXT_DECORATION_LINES seems to be pretty wrong with that patch.
Comment on attachment 534824 [details] [diff] [review]
That said, since I suggested the approach better to have dbaron review.
Created attachment 535017 [details] [diff] [review]
Sorry for this stupid mistake...
Comment on attachment 535017 [details] [diff] [review]
This is ready to be pushed, isn't it?
This patch has been pushed to cedar repository.
Could anyone provide a test case or some STR to verify this issue?
There is no need to verify this.
This change does not affect user-visible behavior.
It does allow new pseudo-elements to be added.