Closed Bug 1239683 Opened 9 years ago Closed 9 years ago

"error C2065: 'NS_UNCONSTRAINEDSIZE' : undeclared identifier" nsWindow.cpp bustage with --disable-accessibility

Categories

(Core :: Widget: Win32, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47

People

(Reporter: RyanVM, Assigned: RyanVM)

References

Details

Attachments

(1 file, 1 obsolete file)

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.
Attached patch add nsIFrame.h include to nsWindow.cpp (obsolete) (deleted) — Splinter Review
Attachment #8707868 - Flags: review?(jfkthame)
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?
Flags: needinfo?(ryanvm)
Yep, that works too.
Attachment #8707868 - Attachment is obsolete: true
Flags: needinfo?(ryanvm)
Attachment #8707954 - Flags: review?(mats)
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.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Backed out of aurora-46, see bug 890156 comment 168. Bumping target milestone to 47.
Target Milestone: mozilla46 → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: