Bug 78722 - Expose Window constructor
Summary: Expose Window constructor
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Erik Arvidsson
URL: http://www.whatwg.org/specs/web-apps/...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-15 10:18 PST by Erik Arvidsson
Modified: 2012-02-16 08:36 PST (History)
6 users (show)

See Also:


Attachments
Patch (3.30 KB, patch)
2012-02-15 12:10 PST, Erik Arvidsson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Arvidsson 2012-02-15 10:18:15 PST
We currently do not expose the Window constructor. Other browsers do.

assertTrue(window.Window !== undefined)

This is related to bug 78721 which is about renaming the constructor.
Comment 1 Ian 'Hixie' Hickson 2012-02-15 11:32:06 PST
Constructor? You mean prototype object, right? Window shouldn't be a constructor.
Comment 2 Erik Arvidsson 2012-02-15 11:49:29 PST
(In reply to comment #1)
> Constructor? You mean prototype object, right? Window shouldn't be a constructor.

No. I mean constructor. It is not constructable but it is still a constructor. Just like Document and HTMLDocument are exposed.

IE and Mozilla pass the following

assertTrue(typeof Window !== 'undefined');
Comment 3 Erik Arvidsson 2012-02-15 12:10:19 PST
Created attachment 127211 [details]
Patch
Comment 4 WebKit Review Bot 2012-02-15 18:47:27 PST
Comment on attachment 127211 [details]
Patch

Clearing flags on attachment: 127211

Committed r107869: <http://trac.webkit.org/changeset/107869>
Comment 5 WebKit Review Bot 2012-02-15 18:47:32 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Csaba Osztrogonác 2012-02-16 01:39:20 PST
Reopen, because it broke 3 tests on Qt. I assume that on other platforms too, but unfortunately I can't check it, because build.webkit.org is unavailable.
- fast/dom/Window/window-properties.html - http://build.webkit.sed.hu/results/x86-64%20Linux%20Qt%20Release/r107900%20%2833816%29/fast/dom/Window/window-properties-pretty-diff.html
- fast/dom/Window/window-property-descriptors.html - http://build.webkit.sed.hu/results/x86-64%20Linux%20Qt%20Release/r107900%20(33816)/fast/dom/Window/window-property-descriptors-pretty-diff.html
- fast/js/global-constructors.html - http://build.webkit.sed.hu/results/x86-64%20Linux%20Qt%20Release/r107900%20%2833816%29/fast/js/global-constructors-pretty-diff.html

I think the first two tests only needs to be rebaselined. But the third one seems an error: +FAIL Window.toString() should be [object WindowConstructor]. Was [object DOMWindowConstructor].
Comment 7 Csaba Osztrogonác 2012-02-16 02:40:09 PST
I updated the 3 tests on Qt - http://trac.webkit.org/changeset/107916
Please check what should we do with the 3rd failing test.
Comment 8 Erik Arvidsson 2012-02-16 08:36:01 PST
Sorry about that. These tests where in the test_expectation.txt for chromium. I should have realized it would change the expectations for JSC based platforms.

(In reply to comment #7)
> I updated the 3 tests on Qt - http://trac.webkit.org/changeset/107916
> Please check what should we do with the 3rd failing test.

The FAIL in global-constructors-expected.txt is bug 78721

The changes to the Skipped file seems unrelated though.