Closed Bug 1239683 Opened 4 years ago Closed 4 years ago
"error C2065: 'NS
_UNCONSTRAINEDSIZE' : undeclared identifier" ns Window .cpp bustage with --disable-accessibility
mozilla-central/widget/windows/nsWindow.cpp(1427) : error C2065: 'NS_UNCONSTRAINEDSIZE' : undeclared identifier mozilla-central/widget/windows/nsWindow.cpp(1430) : error C2065: 'NS_UNCONSTRAINEDSIZE' : undeclared identifier mozilla-central/widget/windows/nsWindow.cpp(1433) : error C2065: 'NS_UNCONSTRAINEDSIZE' : undeclared identifier mozilla-central/widget/windows/nsWindow.cpp(1436) : error C2065: 'NS_UNCONSTRAINEDSIZE' : undeclared identifier I think the reason is that nsIFrame.h is where NS_UNCONSTRAINEDSIZE is defined, but it isn't directly included. Looks like it's included indirectly via mozilla/a11y/DocAccessible.h, which of course then breaks when a11y is disabled. I've confirmed that adding the nsIFrame.h #include directly to nsWindow.cpp fixes it locally.
Attachment #8707868 - Flags: review?(jfkthame) → review+
Adding a nsIFrame.h dependency here seems like it goes in the wrong direction. I'd really like to avoid that if we can. Looking at the widget code that uses NS_UNCONSTRAINEDSIZE: http://hg.mozilla.org/mozilla-central/annotate/27eb5e90eeee/widget/windows/nsWindow.cpp#l1427 that seems wrong given that the SizeConstraints members are LayoutDeviceIntSize: http://hg.mozilla.org/mozilla-central/annotate/27eb5e90eeee/widget/nsIWidget.h#l246 I don't think NS_UNCONSTRAINEDSIZE is meant to be used with anything other than app units (nscoord). As you can see from the ctor above, the members are initialized to NS_MAXSIZE which is defined in gfx/src/nsSize.h. (nsIFrame.h simply makes NS_UNCONSTRAINEDSIZE a synonym for that). So I think we should instead replace NS_UNCONSTRAINEDSIZE with NS_MAXSIZE here. Does that make it compile without the added #include?
Yep, that works too.
Comment on attachment 8707954 [details] [diff] [review] replace NS_UNCONSTRAINEDSIZE with NS_MAXSIZE in windows/nsWidget.cpp r=mats (assuming that you also revert the previous patch)
Attachment #8707954 - Flags: review?(mats) → review+
Yeah, that's better - thanks Mats.
Backed out of aurora-46, see bug 890156 comment 168. Bumping target milestone to 47.
You need to log in before you can comment on or make changes to this bug.