-
ggaren authored
Reviewed by Maciej, Anders, Darin. Removed the Page bridge. Beefed up Chrome. Added Screen and ScreenClient. Fixed a minor where WebCore would always assume it was displayed on the monitor containing the menubar. window.open and window.showModalDialog are now cross-platform. Layout tests, manual-tests/show-modal-dialog, and manual-tests/ window-open-features-parsing all pass. I verified the new screen functionality by running in DRT, and checking whether WebCore knew it was off-screen. Some refactoring remains, as all were not pleased by this design. I see in my future another patch. * bindings/js/kjs_window.cpp: Screen is now a stand-alone object with a client, to encapsulate asking the platform questions about the screen occupied by the page. (Previously, we always assumed we were on screen 0, which was a bug.) * bridge/mac/WebCoreFrameBridge.mm: (createMouseEventFromDraggingInfo): Reversed argument order, to match other functions. (-[WebCoreFrameBridge dragSourceMovedTo:]): ditto (-[WebCoreFrameBridge dragSourceEndedAt:operation:]): ditto * bridge/mac/WebCoreFrameNamespaces.h: Removed. Dead Code. * bridge/mac/WebCoreFrameNamespaces.mm: Removed. Dead Code. * bridge/mac/WebCorePageBridge.h: Removed. Dead Code. * bridge/mac/WebCorePageBridge.mm: Removed. Dead Code. * manual-tests/window-open-features-parsing.html: Updated for accuracy. (In this case, neither size nor position is specified, so you should get the default window size and position.) * page/Screen.cpp: Added. Includes screen-related helper functions used in WebCore and WebKit. * platform/PlatformMouseEvent.h: Exported common code so it doesn't have to be duplicated. Renamed "position" to "point" since both were used, and "point" seemed clearer. * platform/Screen.h: Removed. Dead Code. * platform/mac/LoggingMac.mm: Added. Moved code here from WebCorePageBridge initialization. WebKit: Reviewed by Maciej, Darin, Anders. Removed the Page bridge. Beefed up Chrome. Added Screen and ScreenClient. (WebChromeClient::pageRect): It may seem weird for the page to ask the Chrome/ChromeClient about its own dimensions. The idea here is that we're asking the Chrome how much space it has devoted to the page. We have API for this (-webViewContentRect), but it was documented incorrectly (even Safari used it wrong), so we don't use it anymore. Once we fix our API/documentation, we can return to making a delegate callback to ask for the page's size. (WebChromeClient::createWindow): Changed to take a FrameLoadRequest with an appropriate referrer, instead of making up its own. (WebChromeClient::createModalDialog): Changed to take a FrameLoadRequest with an appropriate referrer, instead of broken out parcels. * WebCoreSupport/WebPageBridge.h: Removed. Dead Code. * WebCoreSupport/WebPageBridge.mm: Removed. Dead Code. * WebCoreSupport/WebScreenClient.h: Added. * WebCoreSupport/WebScreenClient.mm: Added. * WebView/WebView.mm: Added NULL checks for new _private->page, since it's not NULL-safe like the bridge was, and it gets cleared before dealloc. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
52fd1079