From 2e37945b4f9680d30c4a3fbba094191a39c9e22a Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Sun, 26 Jul 2009 18:49:41 -0700 Subject: [PATCH] Removed remaining references to CPDOMWindowBridge. Reviewed by me. --- AppKit/CPDragServer.j | 4 ++-- AppKit/CPMenu.j | 10 +++++----- AppKit/CPView.j | 2 +- AppKit/CPWindow/_CPWindowView.j | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/AppKit/CPDragServer.j b/AppKit/CPDragServer.j index 337c13a99..60a23f06e 100644 --- a/AppKit/CPDragServer.j +++ b/AppKit/CPDragServer.j @@ -112,7 +112,7 @@ var CPDragServerUpdateDragging = function(anEvent) bridgeLocation = [[anEvent window] convertBaseToBridge:location]; // We have to convert base to bridge since the drag event comes from the source window, not the drag window. - var draggingDestination = [[CPDOMWindowBridge sharedDOMWindowBridge] _dragHitTest:bridgeLocation pasteboard:CPDragServerPasteboard]; + var draggingDestination = [[CPPlatformWindow primaryPlatformWindow] _dragHitTest:bridgeLocation pasteboard:CPDragServerPasteboard]; CPDragServerLocation = [DRAGGING_WINDOW(draggingDestination) convertBridgeToBase:bridgeLocation]; @@ -326,7 +326,7 @@ var CPDragServerUpdateDragging = function(anEvent) return nil; // We don't need to do this because the only place this gets called -// -_dragHitTest: in CPDOMWindowBridge does this already. Perhaps to +// -_dragHitTest: in CPPlatformWindow does this already. Perhaps to // be safe? // if (![self containsPoint:aPoint]) // return nil; diff --git a/AppKit/CPMenu.j b/AppKit/CPMenu.j index 46e415468..8e7ab43e1 100644 --- a/AppKit/CPMenu.j +++ b/AppKit/CPMenu.j @@ -119,7 +119,7 @@ var _CPMenuBarVisible = NO, // FIXME: There must be a better way to do this. #if PLATFORM(DOM) - [window.platformWindow resizeEvent:nil]; + [[CPPlatformWindow primaryPlatformWindow] resizeEvent:nil]; #endif } @@ -1078,7 +1078,7 @@ var STICKY_TIME_INTERVAL = 500, { _unconstrainedFrame = CGRectMakeCopy([self frame]); - var screenBounds = CGRectInset([[CPDOMWindowBridge sharedDOMWindowBridge] contentBounds], 5.0, 5.0), + var screenBounds = CGRectInset([[self platformWindow] contentBounds], 5.0, 5.0), constrainedFrame = CGRectIntersection(_unconstrainedFrame, screenBounds), menuViewOrigin = [self convertBaseToBridge:CGPointMake(LEFT_MARGIN, TOP_MARGIN)]; @@ -1158,7 +1158,7 @@ var STICKY_TIME_INTERVAL = 500, if (type == CPPeriodic) { - var constrainedBounds = CGRectInset([[CPDOMWindowBridge sharedDOMWindowBridge] contentBounds], 5.0, 5.0); + var constrainedBounds = CGRectInset([[self platformWindow] contentBounds], 5.0, 5.0); if (_scrollingState == _CPMenuWindowScrollingStateUp) { @@ -1447,9 +1447,9 @@ var _CPMenuBarWindowBackgroundColor = nil, - (id)init { - var bridgeWidth = CGRectGetWidth([[CPDOMWindowBridge sharedDOMWindowBridge] contentBounds]); + var platformWindowWidth = CGRectGetWidth([[CPPlatformWindow primaryPlatformWindow] contentBounds]); - self = [super initWithContentRect:CGRectMake(0.0, 0.0, bridgeWidth, MENUBAR_HEIGHT) styleMask:CPBorderlessWindowMask]; + self = [super initWithContentRect:CGRectMake(0.0, 0.0, platformWindowWidth, MENUBAR_HEIGHT) styleMask:CPBorderlessWindowMask]; if (self) { diff --git a/AppKit/CPView.j b/AppKit/CPView.j index 0121e9f6b..289e69fe3 100644 --- a/AppKit/CPView.j +++ b/AppKit/CPView.j @@ -970,7 +970,7 @@ var DOMElementPrototype = nil, { _fullScreenModeState = _CPViewFullScreenModeStateMake(self); - var fullScreenWindow = [[CPWindow alloc] initWithContentRect:[[CPDOMWindowBridge sharedDOMWindowBridge] contentBounds] styleMask:CPBorderlessWindowMask]; + var fullScreenWindow = [[CPWindow alloc] initWithContentRect:[[CPPlatformWindow primaryPlatformWindow] contentBounds] styleMask:CPBorderlessWindowMask]; [fullScreenWindow setLevel:CPScreenSaverWindowLevel]; [fullScreenWindow setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable]; diff --git a/AppKit/CPWindow/_CPWindowView.j b/AppKit/CPWindow/_CPWindowView.j index 7bbfaf22b..fe2d1ca4d 100644 --- a/AppKit/CPWindow/_CPWindowView.j +++ b/AppKit/CPWindow/_CPWindowView.j @@ -145,7 +145,7 @@ var _CPWindowViewResizeIndicatorImage = nil; var visibleFrame = _cachedScreenFrame; if (!visibleFrame) - visibleFrame = [[CPDOMWindowBridge sharedDOMWindowBridge] visibleFrame]; + visibleFrame = [[CPPlatformWindow primaryPlatformWindow] usableContentFrame]; var restrictedPoint = CGPointMake(0, 0); @@ -167,7 +167,7 @@ var _CPWindowViewResizeIndicatorImage = nil; else if (type === CPLeftMouseDown) { _mouseDraggedPoint = [[self window] convertBaseToBridge:[anEvent locationInWindow]]; - _cachedScreenFrame = [[CPDOMWindowBridge sharedDOMWindowBridge] visibleFrame]; + _cachedScreenFrame = [[CPPlatformWindow primaryPlatformWindow] usableContentFrame]; } else if (type === CPLeftMouseDragged) {