Commit b8d23237 authored by weinig's avatar weinig

LayoutTests:

        Reviewed by Geoff.

        Updates tests for http://bugs.webkit.org/show_bug.cgi?id=14193
        Move the Screen object out of the JS bindings

        * fast/dom/Window/window-appendages-cleared-expected.txt:
        * fast/dom/Window/window-properties-expected.txt:

WebCore:

        Reviewed by Geoff.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=14193
        Move the Screen object out of the JS bindings

        - Renames Screen.h to PlatformScreen.h to accommodate new class.
        - Autogenerates JSScreen.

        * DerivedSources.make:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/kjs_window.cpp:
        (KJS::WindowPrivate::WindowPrivate):
        (KJS::Window::mark):
        (KJS::Window::getValueProperty):
        (KJS::Window::clearHelperObjectProperties):
        * bindings/js/kjs_window.h:
        (KJS::Window::):
        * css/MediaQueryEvaluator.cpp:
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::DOMWindow):
        (WebCore::DOMWindow::~DOMWindow):
        (WebCore::DOMWindow::frame):
        (WebCore::DOMWindow::disconnectFrame):
        (WebCore::DOMWindow::screen):
        * page/DOMWindow.h:
        * page/DOMWindow.idl:
        * page/Screen.cpp: Added.
        (WebCore::Screen::Screen):
        (WebCore::Screen::disconnectFrame):
        (WebCore::Screen::height):
        (WebCore::Screen::width):
        (WebCore::Screen::colorDepth):
        (WebCore::Screen::pixelDepth):
        (WebCore::Screen::availLeft):
        (WebCore::Screen::availTop):
        (WebCore::Screen::availHeight):
        (WebCore::Screen::availWidth):
        * page/Screen.h: Added.
        * page/Screen.idl: Added.
        * page/mac/WebCoreFrameBridge.mm:
        * platform/PlatformScreen.h: Copied from WebCore/platform/Screen.h.
        * platform/Screen.h: Removed.
        * platform/gdk/PlatformScreenGdk.cpp: Copied from WebCore/platform/gdk/ScreenGdk.cpp.
        * platform/gdk/ScreenGdk.cpp: Removed.
        * platform/mac/PlatformMouseEventMac.mm:
        * platform/mac/PlatformScreenMac.mm: Copied from WebCore/platform/mac/ScreenMac.mm.
        * platform/mac/ScreenMac.mm: Removed.
        * platform/qt/PlatformScreenQt.cpp: Added.
        (WebCore::WebCore::screenDepth):
        (WebCore::WebCore::screenDepthPerComponent):
        (WebCore::WebCore::screenIsMonochrome):
        (WebCore::WebCore::screenRect):
        (WebCore::WebCore::screenAvailableRect):
        * platform/qt/TemporaryLinkStubs.cpp:
        * platform/win/PlatformScreenWin.cpp: Copied from WebCore/platform/win/ScreenWin.cpp.
        * platform/win/ScreenWin.cpp: Removed.
        * rendering/RenderObject.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23576 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e0bb7192
2007-06-18 Sam Weinig <sam@webkit.org>
Reviewed by Geoff.
Updates tests for http://bugs.webkit.org/show_bug.cgi?id=14193
Move the Screen object out of the JS bindings
* fast/dom/Window/window-appendages-cleared-expected.txt:
* fast/dom/Window/window-properties-expected.txt:
2007-06-18 Sam Weinig <sam@webkit.org>
Reviewed by Darin.
......@@ -17,6 +17,14 @@ PASS location.toString == "LEFTOVER" is false
PASS locationbar.visible == "LEFTOVER" is false
PASS menubar.visible == "LEFTOVER" is false
PASS personalbar.visible == "LEFTOVER" is false
PASS screen.availHeight == "LEFTOVER" is false
PASS screen.availLeft == "LEFTOVER" is false
PASS screen.availTop == "LEFTOVER" is false
PASS screen.availWidth == "LEFTOVER" is false
PASS screen.colorDepth == "LEFTOVER" is false
PASS screen.height == "LEFTOVER" is false
PASS screen.pixelDepth == "LEFTOVER" is false
PASS screen.width == "LEFTOVER" is false
PASS scrollbars.visible == "LEFTOVER" is false
PASS statusbar.visible == "LEFTOVER" is false
PASS toolbar.visible == "LEFTOVER" is false
......
......@@ -1003,6 +1003,14 @@ window.removeEventListener [function]
window.resizeBy [function]
window.resizeTo [function]
window.screen [object Screen]
window.screen.availHeight [number]
window.screen.availLeft [number]
window.screen.availTop [number]
window.screen.availWidth [number]
window.screen.colorDepth [number]
window.screen.height [number]
window.screen.pixelDepth [number]
window.screen.width [number]
window.screenLeft [number]
window.screenTop [number]
window.screenX [number]
......
2007-06-18 Sam Weinig <sam@webkit.org>
Reviewed by Geoff.
Patch for http://bugs.webkit.org/show_bug.cgi?id=14193
Move the Screen object out of the JS bindings
- Renames Screen.h to PlatformScreen.h to accommodate new class.
- Autogenerates JSScreen.
* DerivedSources.make:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/kjs_window.cpp:
(KJS::WindowPrivate::WindowPrivate):
(KJS::Window::mark):
(KJS::Window::getValueProperty):
(KJS::Window::clearHelperObjectProperties):
* bindings/js/kjs_window.h:
(KJS::Window::):
* css/MediaQueryEvaluator.cpp:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::DOMWindow):
(WebCore::DOMWindow::~DOMWindow):
(WebCore::DOMWindow::frame):
(WebCore::DOMWindow::disconnectFrame):
(WebCore::DOMWindow::screen):
* page/DOMWindow.h:
* page/DOMWindow.idl:
* page/Screen.cpp: Added.
(WebCore::Screen::Screen):
(WebCore::Screen::disconnectFrame):
(WebCore::Screen::height):
(WebCore::Screen::width):
(WebCore::Screen::colorDepth):
(WebCore::Screen::pixelDepth):
(WebCore::Screen::availLeft):
(WebCore::Screen::availTop):
(WebCore::Screen::availHeight):
(WebCore::Screen::availWidth):
* page/Screen.h: Added.
* page/Screen.idl: Added.
* page/mac/WebCoreFrameBridge.mm:
* platform/PlatformScreen.h: Copied from WebCore/platform/Screen.h.
* platform/Screen.h: Removed.
* platform/gdk/PlatformScreenGdk.cpp: Copied from WebCore/platform/gdk/ScreenGdk.cpp.
* platform/gdk/ScreenGdk.cpp: Removed.
* platform/mac/PlatformMouseEventMac.mm:
* platform/mac/PlatformScreenMac.mm: Copied from WebCore/platform/mac/ScreenMac.mm.
* platform/mac/ScreenMac.mm: Removed.
* platform/qt/PlatformScreenQt.cpp: Added.
(WebCore::WebCore::screenDepth):
(WebCore::WebCore::screenDepthPerComponent):
(WebCore::WebCore::screenIsMonochrome):
(WebCore::WebCore::screenRect):
(WebCore::WebCore::screenAvailableRect):
* platform/qt/TemporaryLinkStubs.cpp:
* platform/win/PlatformScreenWin.cpp: Copied from WebCore/platform/win/ScreenWin.cpp.
* platform/win/ScreenWin.cpp: Removed.
* rendering/RenderObject.cpp:
2007-06-18 Sam Weinig <sam@webkit.org>
Reviewed by Geoff.
......@@ -408,7 +408,6 @@ all : \
JSRange.h \
JSRangeException.h \
JSRect.h \
JSSVGZoomEvent.h \
JSSVGAElement.h \
JSSVGAngle.h \
JSSVGAnimatedAngle.h \
......@@ -531,6 +530,8 @@ all : \
JSSVGMaskElement.h \
JSSVGMarkerElement.h \
JSSVGTransform.h \
JSSVGZoomEvent.h \
JSScreen.h \
JSStyleSheet.h \
JSText.h \
JSTextEvent.h \
......
......@@ -258,6 +258,7 @@ IDL_BINDINGS += \
html/HTMLUListElement.idl \
page/BarInfo.idl \
page/DOMWindow.idl \
page/Screen.idl \
xml/DOMParser.idl \
xml/XMLSerializer.idl
......@@ -570,6 +571,7 @@ SOURCES += \
page/FrameView.cpp \
page/MouseEventWithHitTestResults.cpp \
page/Page.cpp \
page/Screen.cpp \
page/Settings.cpp \
platform/Arena.cpp \
platform/ArrayImpl.cpp \
......@@ -765,12 +767,12 @@ qt-port:SOURCES += \
platform/qt/PasteboardQt.cpp \
platform/qt/PlatformKeyboardEventQt.cpp \
platform/qt/PlatformMouseEventQt.cpp \
platform/qt/PlatformScreenQt.cpp \
platform/qt/PlatformScrollBarQt.cpp \
platform/qt/PlugInInfoStoreQt.cpp \
platform/qt/PopupMenuQt.cpp \
platform/qt/QWebPopup.cpp \
platform/qt/RenderThemeQt.cpp \
platform/qt/ScreenQt.cpp \
platform/qt/ScrollViewQt.cpp \
platform/qt/SearchPopupMenuQt.cpp \
platform/qt/SharedTimerQt.cpp \
......@@ -821,11 +823,11 @@ gdk-port:SOURCES += \
platform/gdk/LoggingGdk.cpp \
platform/gdk/MimeTypeRegistryGdk.cpp \
platform/gdk/MouseEventGdk.cpp \
platform/gdk/PlatformScreenGdk.cpp \
platform/gdk/PlatformScrollBarGdk.cpp \
platform/gdk/PopupMenuGdk.cpp \
platform/gdk/RenderThemeGdk.cpp \
platform/gdk/ScrollViewGdk.cpp \
platform/gdk/ScreenGdk.cpp \
platform/gdk/SharedTimerLinux.cpp \
platform/gdk/SoundGdk.cpp \
platform/gdk/SystemTimeLinux.cpp \
......
......@@ -1198,6 +1198,14 @@
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSRect.h"
>
</File>
<File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSScreen.cpp"
>
</File>
<File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSScreen.h"
>
</File>
<File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSStyleSheet.cpp"
>
......@@ -2481,6 +2489,14 @@
RelativePath="..\page\Plugin.h"
>
</File>
<File
RelativePath="..\page\Screen.cpp"
>
</File>
<File
RelativePath="..\page\Screen.h"
>
</File>
<File
RelativePath="..\page\Settings.cpp"
>
......@@ -3058,7 +3074,7 @@
>
</File>
<File
RelativePath="..\platform\Screen.h"
RelativePath="..\platform\PlatformScreen.h"
>
</File>
<File
......@@ -3377,7 +3393,7 @@
>
</File>
<File
RelativePath="..\platform\win\ScreenWin.cpp"
RelativePath="..\platform\win\PlatformScreenWin.cpp"
>
</File>
<File
......
......@@ -40,7 +40,6 @@
06FC442D0BAE5A9E0090EDE1 /* JavaScriptStatistics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 06FC442B0BAE5A9E0090EDE1 /* JavaScriptStatistics.cpp */; };
06FC442E0BAE5A9E0090EDE1 /* JavaScriptStatistics.h in Headers */ = {isa = PBXBuildFile; fileRef = 06FC442C0BAE5A9E0090EDE1 /* JavaScriptStatistics.h */; settings = {ATTRIBUTES = (Private, ); }; };
1402645E0AFDC19B005919E2 /* LoggingMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1402645D0AFDC19B005919E2 /* LoggingMac.mm */; };
1402692D0AFE72D8005919E2 /* ScreenMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1402692C0AFE72D8005919E2 /* ScreenMac.mm */; };
1403B99709EB13AF00797C7F /* DOMWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 1403B99509EB13AF00797C7F /* DOMWindow.h */; };
1403B99809EB13AF00797C7F /* DOMWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1403B99609EB13AF00797C7F /* DOMWindow.cpp */; };
1403BA0C09EB18C700797C7F /* JSDOMWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1403BA0B09EB18C700797C7F /* JSDOMWindow.cpp */; };
......@@ -55,7 +54,6 @@
148A00110AF59F3F008CC700 /* FontPlatformData.h in Headers */ = {isa = PBXBuildFile; fileRef = 148A00100AF59F3F008CC700 /* FontPlatformData.h */; settings = {ATTRIBUTES = (Private, ); }; };
148AFDA50AF58360008CC700 /* ExceptionHandlers.h in Headers */ = {isa = PBXBuildFile; fileRef = 148AFDA30AF58360008CC700 /* ExceptionHandlers.h */; settings = {ATTRIBUTES = (Private, ); }; };
148AFDA60AF58360008CC700 /* ExceptionHandlers.mm in Sources */ = {isa = PBXBuildFile; fileRef = 148AFDA40AF58360008CC700 /* ExceptionHandlers.mm */; };
148CF65E0B00561400A997FC /* Screen.h in Headers */ = {isa = PBXBuildFile; fileRef = 148CF65D0B00561400A997FC /* Screen.h */; settings = {ATTRIBUTES = (Private, ); }; };
14993BE50B2F2B1C0050497F /* FocusController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14993BE30B2F2B1C0050497F /* FocusController.cpp */; };
14993BE60B2F2B1C0050497F /* FocusController.h in Headers */ = {isa = PBXBuildFile; fileRef = 14993BE40B2F2B1C0050497F /* FocusController.h */; settings = {ATTRIBUTES = (Private, ); }; };
14C9A5EA0B3D105F005A0232 /* Settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14C9A5E90B3D105F005A0232 /* Settings.cpp */; };
......@@ -2817,6 +2815,7 @@
BC7F44A80B9E324E00A9D081 /* ImageObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7F44A70B9E324E00A9D081 /* ImageObserver.h */; settings = {ATTRIBUTES = (Private, ); }; };
BC926F800C0552470082776B /* JSHTMLFrameSetElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC926F7E0C0552470082776B /* JSHTMLFrameSetElement.cpp */; };
BC926F810C0552470082776B /* JSHTMLFrameSetElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BC926F7F0C0552470082776B /* JSHTMLFrameSetElement.h */; };
BC94D1080C274F88006BC617 /* PlatformScreenMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC94D1070C274F88006BC617 /* PlatformScreenMac.mm */; };
BC98A27D0C0C9950004BEBF7 /* JSStyleSheetCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC98A27C0C0C9950004BEBF7 /* JSStyleSheetCustom.cpp */; };
BCA169A20BFD55B40019CA76 /* JSHTMLTableCaptionElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA169A00BFD55B40019CA76 /* JSHTMLTableCaptionElement.cpp */; };
BCA169A30BFD55B40019CA76 /* JSHTMLTableCaptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA169A10BFD55B40019CA76 /* JSHTMLTableCaptionElement.h */; };
......@@ -2940,6 +2939,12 @@
BCEA488E097D93020094C9E4 /* RenderTextFragment.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA484F097D93020094C9E4 /* RenderTextFragment.h */; };
BCEB377309B7BA3900CB38B1 /* FontMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCEB377209B7BA3900CB38B1 /* FontMac.mm */; };
BCEB377609B7BB0D00CB38B1 /* FontFallbackList.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEB377509B7BB0D00CB38B1 /* FontFallbackList.h */; };
BCEC01BD0C274DAC009F4EC9 /* Screen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEC01BA0C274DAC009F4EC9 /* Screen.cpp */; };
BCEC01BE0C274DAC009F4EC9 /* Screen.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEC01BB0C274DAC009F4EC9 /* Screen.h */; };
BCEC01BF0C274DAC009F4EC9 /* Screen.idl in Resources */ = {isa = PBXBuildFile; fileRef = BCEC01BC0C274DAC009F4EC9 /* Screen.idl */; };
BCEC01C20C274DDD009F4EC9 /* JSScreen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEC01C00C274DDD009F4EC9 /* JSScreen.cpp */; };
BCEC01C30C274DDD009F4EC9 /* JSScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEC01C10C274DDD009F4EC9 /* JSScreen.h */; };
BCEC01D70C274EB4009F4EC9 /* PlatformScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEC01D60C274EB4009F4EC9 /* PlatformScreen.h */; };
BCEF3434087B563E00BBF833 /* HTMLElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEF3432087B563E00BBF833 /* HTMLElementFactory.cpp */; };
BCEF3435087B563E00BBF833 /* HTMLElementFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEF3433087B563E00BBF833 /* HTMLElementFactory.h */; };
BCF7C0780A1680C00032F75B /* FontFallbackList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCF7C0770A1680C00032F75B /* FontFallbackList.cpp */; };
......@@ -3216,7 +3221,6 @@
06FC442B0BAE5A9E0090EDE1 /* JavaScriptStatistics.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JavaScriptStatistics.cpp; sourceTree = "<group>"; };
06FC442C0BAE5A9E0090EDE1 /* JavaScriptStatistics.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JavaScriptStatistics.h; sourceTree = "<group>"; };
1402645D0AFDC19B005919E2 /* LoggingMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = LoggingMac.mm; sourceTree = "<group>"; };
1402692C0AFE72D8005919E2 /* ScreenMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ScreenMac.mm; sourceTree = "<group>"; };
1403B90C09EB124500797C7F /* DOMWindow.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMWindow.idl; sourceTree = "<group>"; };
1403B99509EB13AF00797C7F /* DOMWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWindow.h; sourceTree = "<group>"; };
1403B99609EB13AF00797C7F /* DOMWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindow.cpp; sourceTree = "<group>"; };
......@@ -3237,7 +3241,6 @@
148A00100AF59F3F008CC700 /* FontPlatformData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FontPlatformData.h; sourceTree = "<group>"; };
148AFDA30AF58360008CC700 /* ExceptionHandlers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ExceptionHandlers.h; sourceTree = "<group>"; };
148AFDA40AF58360008CC700 /* ExceptionHandlers.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ExceptionHandlers.mm; sourceTree = "<group>"; };
148CF65D0B00561400A997FC /* Screen.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Screen.h; sourceTree = "<group>"; };
14993BE30B2F2B1C0050497F /* FocusController.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FocusController.cpp; sourceTree = "<group>"; };
14993BE40B2F2B1C0050497F /* FocusController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FocusController.h; sourceTree = "<group>"; };
14C9A5E90B3D105F005A0232 /* Settings.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Settings.cpp; sourceTree = "<group>"; };
......@@ -6116,6 +6119,7 @@
BC7F44A70B9E324E00A9D081 /* ImageObserver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ImageObserver.h; sourceTree = "<group>"; };
BC926F7E0C0552470082776B /* JSHTMLFrameSetElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLFrameSetElement.cpp; sourceTree = "<group>"; };
BC926F7F0C0552470082776B /* JSHTMLFrameSetElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLFrameSetElement.h; sourceTree = "<group>"; };
BC94D1070C274F88006BC617 /* PlatformScreenMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformScreenMac.mm; sourceTree = "<group>"; };
BC98A27C0C0C9950004BEBF7 /* JSStyleSheetCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSStyleSheetCustom.cpp; sourceTree = "<group>"; };
BCA169A00BFD55B40019CA76 /* JSHTMLTableCaptionElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLTableCaptionElement.cpp; sourceTree = "<group>"; };
BCA169A10BFD55B40019CA76 /* JSHTMLTableCaptionElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLTableCaptionElement.h; sourceTree = "<group>"; };
......@@ -6244,6 +6248,12 @@
BCEA484F097D93020094C9E4 /* RenderTextFragment.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderTextFragment.h; sourceTree = "<group>"; };
BCEB377209B7BA3900CB38B1 /* FontMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = FontMac.mm; sourceTree = "<group>"; };
BCEB377509B7BB0D00CB38B1 /* FontFallbackList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FontFallbackList.h; sourceTree = "<group>"; };
BCEC01BA0C274DAC009F4EC9 /* Screen.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Screen.cpp; sourceTree = "<group>"; };
BCEC01BB0C274DAC009F4EC9 /* Screen.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Screen.h; sourceTree = "<group>"; };
BCEC01BC0C274DAC009F4EC9 /* Screen.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Screen.idl; sourceTree = "<group>"; };
BCEC01C00C274DDD009F4EC9 /* JSScreen.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSScreen.cpp; sourceTree = "<group>"; };
BCEC01C10C274DDD009F4EC9 /* JSScreen.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSScreen.h; sourceTree = "<group>"; };
BCEC01D60C274EB4009F4EC9 /* PlatformScreen.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PlatformScreen.h; sourceTree = "<group>"; };
BCEF3432087B563E00BBF833 /* HTMLElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLElementFactory.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
BCEF3433087B563E00BBF833 /* HTMLElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = HTMLElementFactory.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
BCF7C0770A1680C00032F75B /* FontFallbackList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FontFallbackList.cpp; sourceTree = "<group>"; };
......@@ -6480,10 +6490,10 @@
14DFB33F0A7DF7630018F769 /* Derived Sources */ = {
isa = PBXGroup;
children = (
BC124EFD0C26447A009E2349 /* JSBarInfo.cpp */,
BC124EFE0C26447A009E2349 /* JSBarInfo.h */,
65DF31D809D1C122000BE325 /* JSAttr.cpp */,
65DF31D909D1C123000BE325 /* JSAttr.h */,
BC124EFD0C26447A009E2349 /* JSBarInfo.cpp */,
BC124EFE0C26447A009E2349 /* JSBarInfo.h */,
65DF323309D1DE65000BE325 /* JSCanvasGradient.cpp */,
65DF323409D1DE65000BE325 /* JSCanvasGradient.h */,
65DF323509D1DE65000BE325 /* JSCanvasPattern.cpp */,
......@@ -6694,6 +6704,8 @@
D23CA55C0AB0EAAE005108A5 /* JSRangeException.h */,
BCFE2F0F0C1B58370020235F /* JSRect.cpp */,
BCFE2F100C1B58370020235F /* JSRect.h */,
BCEC01C00C274DDD009F4EC9 /* JSScreen.cpp */,
BCEC01C10C274DDD009F4EC9 /* JSScreen.h */,
BCE013980C0BEF180043860A /* JSStyleSheet.cpp */,
BCE013990C0BEF180043860A /* JSStyleSheet.h */,
B20111050AB7740500DB0E68 /* JSSVGAElement.cpp */,
......@@ -7132,19 +7144,18 @@
6582A14809999D6C00BEEB6D /* mac */ = {
isa = PBXGroup;
children = (
AACF144C0BEC1EF000827982 /* TextBreakIteratorInternalICUMac.mm */,
A7CFB3D40B7ED1180070C32D /* DragImageMac.mm */,
A795463D0B5C4C80007B438F /* DragDataMac.mm */,
06027CB20B1CC03D00884B2D /* ContextMenuItemMac.mm */,
65A640F00533BB1F0085E777 /* BlockExceptions.h */,
65F80697054D9F86008BF776 /* BlockExceptions.mm */,
2D90660B0665D937006B6F1A /* ClipboardMac.h */,
2D90660C0665D937006B6F1A /* ClipboardMac.mm */,
06027CB20B1CC03D00884B2D /* ContextMenuItemMac.mm */,
93B6A0E90B0BCA8400F5027A /* ContextMenuMac.mm */,
9352087609BD453400F2038D /* CookieJar.mm */,
F58784F002DE375901EA4122 /* CursorMac.mm */,
651B4D8E09AC859F0029F1EF /* DeprecatedStringListMac.mm */,
6582A17709999EA000BEEB6D /* DeprecatedStringMac.mm */,
A795463D0B5C4C80007B438F /* DragDataMac.mm */,
A7CFB3D40B7ED1180070C32D /* DragImageMac.mm */,
066C772C0AB603D200238CC4 /* FileChooserMac.mm */,
BCF7C2330A16B5F80032F75B /* FontCacheMac.mm */,
BCC088850A1BD78D006189A6 /* FontDataMac.mm */,
......@@ -7164,16 +7175,16 @@
A7D3C5230B576B4B002CA450 /* PasteboardHelper.h */,
4B2709810AF2E5E00065127F /* PasteboardMac.mm */,
935C476F09AC4D7300A6AAB4 /* PlatformMouseEventMac.mm */,
BC94D1070C274F88006BC617 /* PlatformScreenMac.mm */,
BC3FCAA80AC3DB5800BA54AD /* PlatformScrollBar.h */,
BC7B2AF90450824100A8000F /* PlatformScrollBarMac.mm */,
A82398A709B3ACF500B60641 /* PlugInInfoStoreMac.mm */,
0668E18E0ADD9640004128E0 /* PopupMenuMac.mm */,
1402692C0AFE72D8005919E2 /* ScreenMac.mm */,
BCAA90C20A7EBA60008B1229 /* ScrollBar.cpp */,
9353676A09AED88B00D35CD6 /* ScrollViewMac.mm */,
AB71709F0B31193B0017123E /* SearchPopupMenuMac.mm */,
37919C1C0BF3762800956998 /* ShapeArabic.h */,
37919C180BF375DD00956998 /* ShapeArabic.c */,
37919C1C0BF3762800956998 /* ShapeArabic.h */,
1A4A95510B4EDCFF002D8C3C /* SharedBufferMac.mm */,
93309E9F099EB78C0056E581 /* SharedTimerMac.cpp */,
4B3043C80AE0371D00A82647 /* SoundMac.mm */,
......@@ -7182,6 +7193,7 @@
93B0FD890A759BED0080AD44 /* StringMac.mm */,
6582A15509999D6D00BEEB6D /* SystemTimeMac.cpp */,
9352071B09BD3BBB00F2038D /* TextBoundaries.mm */,
AACF144C0BEC1EF000827982 /* TextBreakIteratorInternalICUMac.mm */,
51DF6D7F0B92A18E00C2DC85 /* ThreadCheck.mm */,
F5517DC2031AB56301A80180 /* WebCoreHistory.h */,
F5517DC3031AB56301A80180 /* WebCoreHistory.m */,
......@@ -7189,8 +7201,8 @@
84B2B1F8056BEF3A00D2B771 /* WebCoreKeyGenerator.m */,
934D9BA60B8C1175007B42A9 /* WebCoreNSStringExtras.h */,
934D9BA40B8C116B007B42A9 /* WebCoreNSStringExtras.mm */,
DD05FE0B0B8BA3C6009ACDFE /* WebCoreObjCExtras.h */,
DD05FE0C0B8BA3C6009ACDFE /* WebCoreObjCExtras.c */,
DD05FE0B0B8BA3C6009ACDFE /* WebCoreObjCExtras.h */,
93EB169609F880C00091F8FF /* WebCoreSystemInterface.h */,
93EB169409F880B00091F8FF /* WebCoreSystemInterface.mm */,
BC066F6C09FEB2FA00C589A7 /* WebCoreTextRenderer.h */,
......@@ -7244,6 +7256,9 @@
65FEA86809833ADE00BED4AB /* Page.cpp */,
65A21467097A329100B9050A /* Page.h */,
65D1C1C909932B22000CB324 /* Plugin.h */,
BCEC01BA0C274DAC009F4EC9 /* Screen.cpp */,
BCEC01BB0C274DAC009F4EC9 /* Screen.h */,
BCEC01BC0C274DAC009F4EC9 /* Screen.idl */,
14C9A5E90B3D105F005A0232 /* Settings.cpp */,
F587863A02DE3A1401EA4122 /* Settings.h */,
);
......@@ -9480,6 +9495,7 @@
935C476609AC4D4300A6AAB4 /* PlatformKeyboardEvent.h */,
932871BF0B20DEB70049035A /* PlatformMenuDescription.h */,
935C476709AC4D4300A6AAB4 /* PlatformMouseEvent.h */,
BCEC01D60C274EB4009F4EC9 /* PlatformScreen.h */,
93CD4FEB0995FD2A007ECC97 /* PlatformString.h */,
935C476A09AC4D4F00A6AAB4 /* PlatformWheelEvent.h */,
A82398A509B3ACDB00B60641 /* PlugInInfoStore.h */,
......@@ -9487,7 +9503,6 @@
ABC128760B33AA6D00C693D5 /* PopupMenuClient.h */,
F587852B02DE375901EA4122 /* RegularExpression.cpp */,
F58786B302DE3B8601EA4122 /* RegularExpression.h */,
148CF65D0B00561400A997FC /* Screen.h */,
BC7B2AF80450824100A8000F /* ScrollBar.h */,
93C09C850B0657AA005ABD4D /* ScrollTypes.h */,
BC6D6E2509AF943500F59759 /* ScrollView.h */,
......@@ -11391,7 +11406,6 @@
65DADA000AFD86BF00CE53ED /* FormDataStreamMac.h in Headers */,
65DADA180AFD878000CE53ED /* FormData.h in Headers */,
651888890AFF3BF700164720 /* ResourceError.h in Headers */,
148CF65E0B00561400A997FC /* Screen.h in Headers */,
B27535570B053814002CE64F /* AffineTransform.h in Headers */,
B275355D0B053814002CE64F /* GraphicsContextPlatformPrivate.h in Headers */,
B27535650B053814002CE64F /* PDFDocumentImage.h in Headers */,
......@@ -11576,6 +11590,9 @@
BC4368E80C226E32005EFB5F /* Rect.h in Headers */,
BC124EE80C2641CD009E2349 /* BarInfo.h in Headers */,
BC124F000C26447A009E2349 /* JSBarInfo.h in Headers */,
BCEC01BE0C274DAC009F4EC9 /* Screen.h in Headers */,
BCEC01C30C274DDD009F4EC9 /* JSScreen.h in Headers */,
BCEC01D70C274EB4009F4EC9 /* PlatformScreen.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -11690,6 +11707,7 @@
1AB1AE7A0C051FDE00139F4F /* zoomInCursor.png in Resources */,
1AB1AE7B0C051FDE00139F4F /* zoomOutCursor.png in Resources */,
BC124EE90C2641CD009E2349 /* BarInfo.idl in Resources */,
BCEC01BF0C274DAC009F4EC9 /* Screen.idl in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -12762,7 +12780,6 @@
14D8238B0AF92DF60004F057 /* Chrome.cpp in Sources */,
AB247A6C0AFD6383003FA5FD /* RenderSlider.cpp in Sources */,
1402645E0AFDC19B005919E2 /* LoggingMac.mm in Sources */,
1402692D0AFE72D8005919E2 /* ScreenMac.mm in Sources */,
65DAD9FC0AFD86B400CE53ED /* FormData.cpp in Sources */,
65DADA010AFD86BF00CE53ED /* FormDataStreamMac.mm in Sources */,
A70023FD0B02BEAB00170215 /* MimeTypeRegistry.cpp in Sources */,
......@@ -13003,6 +13020,9 @@
BCFE2F110C1B58370020235F /* JSRect.cpp in Sources */,
BC124EE70C2641CD009E2349 /* BarInfo.cpp in Sources */,
BC124EFF0C26447A009E2349 /* JSBarInfo.cpp in Sources */,
BCEC01BD0C274DAC009F4EC9 /* Screen.cpp in Sources */,
BCEC01C20C274DDD009F4EC9 /* JSScreen.cpp in Sources */,
BC94D1080C274F88006BC617 /* PlatformScreenMac.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -52,9 +52,9 @@
#include "JSXMLHttpRequest.h"
#include "Logging.h"
#include "Page.h"
#include "PlatformScreen.h"
#include "PlugInInfoStore.h"
#include "RenderView.h"
#include "Screen.h"
#include "SelectionController.h"
#include "Settings.h"
#include "WindowFeatures.h"
......@@ -82,8 +82,7 @@ const double cMinimumTimerInterval = 0.010;
struct WindowPrivate {
WindowPrivate()
: screen(0)
, history(0)
: history(0)
, loc(0)
, m_selection(0)
, m_evt(0)
......@@ -95,7 +94,6 @@ struct WindowPrivate {
Window::ListenersMap jsHTMLEventListeners;
Window::UnprotectedListenersMap jsUnprotectedEventListeners;
Window::UnprotectedListenersMap jsUnprotectedHTMLEventListeners;
mutable Screen* screen;
mutable History* history;
mutable Location* loc;
mutable Selection* m_selection;
......@@ -167,61 +165,6 @@ public:
namespace KJS {
////////////////////// Screen Object ////////////////////////
// table for screen object
/*
@begin ScreenTable 7
height Screen::Height DontEnum|ReadOnly
width Screen::Width DontEnum|ReadOnly
colorDepth Screen::ColorDepth DontEnum|ReadOnly
pixelDepth Screen::PixelDepth DontEnum|ReadOnly
availLeft Screen::AvailLeft DontEnum|ReadOnly
availTop Screen::AvailTop DontEnum|ReadOnly
availHeight Screen::AvailHeight DontEnum|ReadOnly
availWidth Screen::AvailWidth DontEnum|ReadOnly
@end
*/
const ClassInfo Screen::info = { "Screen", 0, &ScreenTable, 0 };
// We set the object prototype so that toString is implemented
Screen::Screen(ExecState* exec, Frame* f)
: m_frame(f)
{
setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype());
}
bool Screen::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot)
{
return getStaticValueSlot<Screen, JSObject>(exec, &ScreenTable, this, propertyName, slot);
}
JSValue* Screen::getValueProperty(ExecState*, int token) const
{
Widget* widget = m_frame ? m_frame->view() : 0;
switch (token) {
case Height:
return jsNumber(screenRect(widget).height());
case Width:
return jsNumber(screenRect(widget).width());
case ColorDepth:
case PixelDepth:
return jsNumber(screenDepth(widget));
case AvailLeft:
return jsNumber(screenAvailableRect(widget).x());
case AvailTop:
return jsNumber(screenAvailableRect(widget).y());
case AvailHeight:
return jsNumber(screenAvailableRect(widget).height());
case AvailWidth:
return jsNumber(screenAvailableRect(widget).width());
default:
return jsUndefined();
}
}
////////////////////// Window Object ////////////////////////
const ClassInfo Window::info = { "Window", 0, &WindowTable, 0 };
......@@ -269,7 +212,6 @@ const ClassInfo Window::info = { "Window", 0, &WindowTable, 0 };
self Window::Self DontDelete|ReadOnly
window Window::Window_ DontDelete|ReadOnly
top Window::Top DontDelete|ReadOnly
screen Window::Screen_ DontDelete|ReadOnly
Image Window::Image DontDelete
Option Window::Option DontDelete
XMLHttpRequest Window::XMLHttpRequest DontDelete
......@@ -414,8 +356,6 @@ bool Window::find(const String& string, bool caseSensitive, bool backwards, bool
void Window::mark()
{
JSObject::mark();
if (d->screen && !d->screen->marked())
d->screen->mark();
if (d->history && !d->history->marked())
d->history->mark();
if (d->loc && !d->loc->marked())
......@@ -722,10 +662,6 @@ JSValue *Window::getValueProperty(ExecState *exec, int token) const
return retrieve(m_frame);
case Top:
return retrieve(m_frame->page()->mainFrame());
case Screen_:
if (!d->screen)
d->screen = new Screen(exec, m_frame);
return d->screen;
case Image:
// FIXME: this property (and the few below) probably shouldn't create a new object every
// time
......@@ -1286,7 +1222,6 @@ JSUnprotectedEventListener *Window::findOrCreateJSUnprotectedEventListener(JSVal
void Window::clearHelperObjectProperties()
{
d->screen = 0;
d->history = 0;
d->loc = 0;
d->m_selection = 0;
......
......@@ -67,19 +67,6 @@ namespace KJS {
class DOMWindowTimer;
class Screen : public DOMObject {
public:
enum { Height, Width, ColorDepth, PixelDepth, AvailLeft, AvailTop, AvailHeight, AvailWidth };
virtual bool getOwnPropertySlot(ExecState *, const Identifier&, PropertySlot&);
JSValue *getValueProperty(ExecState *exec, int token) const;
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
private:
friend class Window;
Screen(ExecState*, WebCore::Frame*);
WebCore::Frame* m_frame;
};
class WindowPrivate;
class Window : public DOMObject {
......@@ -168,7 +155,7 @@ namespace KJS {
OffscreenBuffering, Opener, OuterHeight, OuterWidth, PageXOffset, PageYOffset,
Parent, ScreenX, ScreenY, Scroll, ScrollBy,
ScreenTop, ScreenLeft,
ScrollTo, ScrollX, ScrollY, MoveBy, MoveTo, ResizeBy, ResizeTo, Self, Window_, Top, Screen_,
ScrollTo, ScrollX, ScrollY, MoveBy, MoveTo, ResizeBy, ResizeTo, Self, Window_, Top,
Image, Option, Alert, Confirm, Prompt, Open, Print, SetTimeout, ClearTimeout,
Focus, GetSelection, Blur, Close, SetInterval, ClearInterval, CaptureEvents,
ReleaseEvents, AddEventListener, RemoveEventListener,
......
......@@ -42,7 +42,7 @@
#include "MediaQueryExp.h"
#include "Page.h"
#include "RenderStyle.h"
#include "Screen.h"
#include "PlatformScreen.h"
#include <wtf/HashMap.h>
namespace WebCore {
......
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -35,13 +35,14 @@
#include "Frame.h"
#include "FrameLoader.h"
#include "Page.h"
#include "PlatformScreen.h"
#include "Screen.h"
#include "cssstyleselector.h"
namespace WebCore {
DOMWindow::DOMWindow(Frame* f)
: m_frame(f)
DOMWindow::DOMWindow(Frame* frame)
: m_frame(frame)
{
}
......@@ -57,6 +58,8 @@ Frame* DOMWindow::frame()
void DOMWindow::disconnectFrame()
{
m_frame = 0;
if (m_screen)
m_screen->disconnectFrame();
if (m_locationbar)
m_locationbar->disconnectFrame();
if (m_menubar)
......@@ -71,6 +74,13 @@ void DOMWindow::disconnectFrame()
m_toolbar->disconnectFrame();
}
Screen* DOMWindow::screen() const
{
if (!m_screen)
m_screen = new Screen(m_frame);
return m_screen.get();
}
BarInfo* DOMWindow::locationbar() const
{
if (!m_locationbar)
......
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without