Adding checks for existence of DOM when calling CPPlatformWindow+DOM-only methods

Conflicts:

	AppKit/CPWindow/CPWindow.j
This commit is contained in:
Saikat Chakrabarti authored and Ross Boucher committed 2010-06-06 11:48:15 -07:00
1 parent ab3d648244
commit c8759babae
3 files changed
+15 -1

No files matched your search

+4
View File
@@ -615,7 +615,11 @@ CPRunContinuesResponse = -1002;
*/
- (CPArray)orderedWindows
{
#if PLATFORM(DOM)
return CPWindowObjectList();
#else
return [];
#endif
}
- (void)hide:(id)aSender
+8
View File
@@ -742,8 +742,10 @@ CPTexturedBackgroundWindowMask
*/
- (void)orderFront:(id)aSender
{
#if PLATFORM(DOM)
[_platformWindow orderFront:self];
[_platformWindow order:CPWindowAbove window:self relativeTo:nil];
#endif
if (_firstResponder === self || !_firstResponder)
[self makeFirstResponder:[self initialFirstResponder]];
@@ -771,13 +773,17 @@ CPTexturedBackgroundWindowMask
*/
- (void)orderOut:(id)aSender
{
#if PLATFORM(DOM)
if ([self _sharesChromeWithPlatformWindow])
[_platformWindow orderOut:self];
#endif
if ([_delegate respondsToSelector:@selector(windowWillClose:)])
[_delegate windowWillClose:self];
#if PLATFORM(DOM)
[_platformWindow order:CPWindowOut window:self relativeTo:nil];
#endif
[self _updateMainAndKeyWindows];
}
@@ -789,7 +795,9 @@ CPTexturedBackgroundWindowMask
*/
- (void)orderWindow:(CPWindowOrderingMode)aPlace relativeTo:(int)otherWindowNumber
{
#if PLATFORM(DOM)
[_platformWindow order:aPlace window:self relativeTo:CPApp._windows[otherWindowNumber]];
#endif
}
/*!
+3 -1
View File
@@ -160,7 +160,9 @@ var PrimaryPlatformWindow = NULL;
_contentRect = _CGRectMakeCopy(aRect);
[self updateNativeContentRect];
#if PLATFORM(DOM)
[self updateNativeContentRect];
#endif
}
- (void)updateFromNativeContentRect