Commit 740fffc6 authored by eric@webkit.org's avatar eric@webkit.org

2010-04-22 Kenneth Rohde Christiansen <kenneth@webkit.org>

        Unreviewed expected results update.

        Rename window.media to window.styleMedia
        https://bugs.webkit.org/show_bug.cgi?id=36187

        * fast/dom/Window/window-properties-expected.txt:
        * fast/dom/Window/window-property-descriptors-expected.txt:
        * fast/dom/prototype-inheritance-2-expected.txt:
        * fast/dom/prototype-inheritance-expected.txt:
        * fast/media/print-restores-previous-mediatype-expected.txt:
        * platform/chromium/fast/dom/prototype-inheritance-expected.txt:
        * platform/gtk/fast/dom/Window/window-properties-expected.txt:
        * platform/gtk/fast/dom/Window/window-property-descriptors-expected.txt:
        * platform/gtk/fast/dom/prototype-inheritance-expected.txt:
        * platform/qt/fast/dom/Window/window-properties-expected.txt:
        * platform/qt/fast/dom/Window/window-property-descriptors-expected.txt:
        * platform/qt/fast/dom/prototype-inheritance-expected.txt:
        * platform/win/fast/dom/Window/window-property-descriptors-expected.txt:
        * platform/win/fast/dom/prototype-inheritance-2-expected.txt:
        * platform/win/fast/dom/prototype-inheritance-expected.txt:
2010-04-22  Kenneth Rohde Christiansen  <kenneth@webkit.org>

        Reviewed by Simon Fraser.

        Rename window.media to window.styleMedia
        https://bugs.webkit.org/show_bug.cgi?id=36187

        It has been defined that the AbstractView media extension
        defined in the CSSOM View spec should be renamed to styleMedia.
        This patch does that and updates the current layout tests
        making use of it.

        * page/AbstractView.idl:
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::styleMedia):
        * page/DOMWindow.h:
        * page/DOMWindow.idl:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7076f1fc
2010-04-22 Kenneth Rohde Christiansen <kenneth@webkit.org>
Unreviewed expected results update.
Rename window.media to window.styleMedia
https://bugs.webkit.org/show_bug.cgi?id=36187
* fast/dom/Window/window-properties-expected.txt:
* fast/dom/Window/window-property-descriptors-expected.txt:
* fast/dom/prototype-inheritance-2-expected.txt:
* fast/dom/prototype-inheritance-expected.txt:
* fast/media/print-restores-previous-mediatype-expected.txt:
* platform/chromium/fast/dom/prototype-inheritance-expected.txt:
* platform/gtk/fast/dom/Window/window-properties-expected.txt:
* platform/gtk/fast/dom/Window/window-property-descriptors-expected.txt:
* platform/gtk/fast/dom/prototype-inheritance-expected.txt:
* platform/qt/fast/dom/Window/window-properties-expected.txt:
* platform/qt/fast/dom/Window/window-property-descriptors-expected.txt:
* platform/qt/fast/dom/prototype-inheritance-expected.txt:
* platform/win/fast/dom/Window/window-property-descriptors-expected.txt:
* platform/win/fast/dom/prototype-inheritance-2-expected.txt:
* platform/win/fast/dom/prototype-inheritance-expected.txt:
2010-04-20 Kenneth Rohde Christiansen <kenneth@webkit.org>
Reviewed by Simon Fraser
Rename window.media to window.styleMedia
https://bugs.webkit.org/show_bug.cgi?id=36187
Update layout tests.
* fast/media/lifetime.html:
* fast/media/matchmedium-query-api.html:
* fast/media/print-restores-previous-mediatype.html:
2010-04-22 Adam Barth <abarth@webkit.org>
Unreviewed, rolling out r58069.
......
......@@ -2101,9 +2101,6 @@ window.locationbar.visible [boolean]
window.log [function]
window.logProperties [function]
window.logValue [function]
window.media [object Media]
window.media.matchMedium [function]
window.media.type [string]
window.menubar [object BarInfo]
window.menubar.visible [boolean]
window.moveBy [function]
......@@ -2223,6 +2220,9 @@ window.status [string]
window.statusbar [object BarInfo]
window.statusbar.visible [boolean]
window.stop [function]
window.styleMedia [object Media]
window.styleMedia.matchMedium [function]
window.styleMedia.type [string]
window.toolbar [object BarInfo]
window.toolbar.visible [boolean]
window.top [printed above as window]
......
......@@ -351,7 +351,6 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'length') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'localStorage') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'location') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'locationbar') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'media') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'menubar') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'name') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'names') is 'object'
......@@ -459,6 +458,7 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'shouldThrow') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'status') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'statusbar') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'stringify') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'styleMedia') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'successfullyParsed') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'testFailed') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'testPassed') is 'object'
......
......@@ -142,12 +142,12 @@ PASS History from inner.document.forms.testForm.0.ownerDocument.defaultView.hist
PASS HistoryPrototype from inner.document.forms.testForm.0.ownerDocument.defaultView.history.__proto__
PASS Location from inner.document.location
PASS LocationPrototype from inner.document.location.__proto__
PASS Media from inner.document.forms.testForm.0.ownerDocument.defaultView.media
PASS MediaConstructor from inner.document.forms.testForm.0.ownerDocument.defaultView.media.constructor
PASS Media from inner.document.forms.testForm.0.ownerDocument.defaultView.styleMedia
PASS MediaConstructor from inner.document.forms.testForm.0.ownerDocument.defaultView.styleMedia.constructor
PASS MediaList from inner.document.forms.testForm.0.ownerDocument.styleSheets.0.media
PASS MediaListConstructor from inner.document.forms.testForm.0.ownerDocument.styleSheets.0.media.constructor
PASS MediaListPrototype from inner.document.forms.testForm.0.ownerDocument.styleSheets.0.media.__proto__
PASS MediaPrototype from inner.document.forms.testForm.0.ownerDocument.defaultView.media.__proto__
PASS MediaPrototype from inner.document.forms.testForm.0.ownerDocument.defaultView.styleMedia.__proto__
PASS MimeType from inner.document.forms.testForm.0.ownerDocument.defaultView.clientInformation.mimeTypes.0
PASS MimeTypeArray from inner.document.forms.testForm.0.ownerDocument.defaultView.clientInformation.mimeTypes
PASS MimeTypeArrayConstructor from inner.document.forms.testForm.0.ownerDocument.defaultView.clientInformation.mimeTypes.constructor
......
......@@ -669,8 +669,6 @@ PASS inner.location.isInner is true
PASS inner.location.constructor.isInner is true
PASS inner.locationbar.isInner is true
PASS inner.locationbar.constructor.isInner is true
PASS inner.media.isInner is true
PASS inner.media.constructor.isInner is true
PASS inner.menubar.isInner is true
PASS inner.menubar.constructor.isInner is true
FAIL inner.moveBy.isInner should be true. Was false.
......@@ -747,6 +745,8 @@ PASS inner.statusbar.isInner is true
PASS inner.statusbar.constructor.isInner is true
FAIL inner.stop.isInner should be true. Was false.
FAIL inner.stop.constructor.isInner should be true. Was false.
PASS inner.styleMedia.isInner is true
PASS inner.styleMedia.constructor.isInner is true
PASS inner.toolbar.isInner is true
PASS inner.toolbar.constructor.isInner is true
FAIL inner.webkitConvertPointFromNodeToPage.isInner should be true. Was false.
......
......@@ -20,19 +20,19 @@ function gc()
function test()
{
if (!window.media) {
document.getElementById("result").innerHTML = "FAIL - window.media is not supported.";
if (!window.styleMedia) {
document.getElementById("result").innerHTML = "FAIL - window.styleMedia is not supported.";
return;
}
media.foo = "bar";
styleMedia.foo = "bar";
gc();
if (media.foo != "bar") {
document.getElementById("result").innerHTML = "FAIL - Window.media doesn't return the same object each time.";
if (styleMedia.foo != "bar") {
document.getElementById("result").innerHTML = "FAIL - window.styelMedia doesn't return the same object each time.";
return;
}
var m = frames[0].media;
var m = frames[0].styleMedia;
document.body.removeChild(document.getElementsByTagName("iframe")[0]);
try { m.matchMedium("foobar") } catch (ex) { }
setTimeout(function() {
......
......@@ -16,7 +16,7 @@
function testQuery(query, expected)
{
var isTrue = document.defaultView.media.matchMedium(query);
var isTrue = window.styleMedia.matchMedium(query);
var message = '\"' + query + '\" evaluates to ' + (isTrue ? 'true' : 'false');
message += (isTrue == expected) ? ': PASS' : ': FAIL';
......
Media type is set to 'handheld' to be different than the default 'screen'
PASS: window.media.type should be 'handheld' and is.
PASS: window.styleMedia.type should be 'handheld' and is.
The page is printed, which changes the media type to 'print', and then back
PASS: window.media.type should be 'handheld' and is.
PASS: window.styleMedia.type should be 'handheld' and is.
......@@ -28,10 +28,10 @@
function runTests()
{
log("Media type is set to 'handheld' to be different than the default 'screen'");
shouldBe("window.media.type", window.media.type, "handheld");
shouldBe("window.styleMedia.type", window.styleMedia.type, "handheld");
log("<br>The page is printed, which changes the media type to 'print', and then back");
window.print();
shouldBe("window.media.type", window.media.type, "handheld");
shouldBe("window.styleMedia.type", window.styleMedia.type, "handheld");
}
</script>
</head>
......
......@@ -659,8 +659,6 @@ FAIL inner.location.isInner should be true. Was false.
FAIL inner.location.constructor.isInner should be true. Was false.
FAIL inner.locationbar.isInner should be true. Was false.
FAIL inner.locationbar.constructor.isInner should be true. Was false.
FAIL inner.media.isInner should be true. Was false.
FAIL inner.media.constructor.isInner should be true. Was false.
FAIL inner.menubar.isInner should be true. Was false.
FAIL inner.menubar.constructor.isInner should be true. Was false.
PASS inner.moveBy.isInner is true
......@@ -739,6 +737,8 @@ FAIL inner.statusbar.isInner should be true. Was false.
FAIL inner.statusbar.constructor.isInner should be true. Was false.
PASS inner.stop.isInner is true
PASS inner.stop.constructor.isInner is true
FAIL inner.styleMedia.isInner should be true. Was false.
FAIL inner.styleMedia.constructor.isInner should be true. Was false.
FAIL inner.toolbar.isInner should be true. Was false.
FAIL inner.toolbar.constructor.isInner should be true. Was false.
PASS inner.webkitConvertPointFromNodeToPage.isInner is true
......
......@@ -1722,9 +1722,6 @@ window.locationbar.visible [boolean]
window.log [function]
window.logProperties [function]
window.logValue [function]
window.media [object Media]
window.media.matchMedium [function]
window.media.type [string]
window.menubar [object BarInfo]
window.menubar.visible [boolean]
window.moveBy [function]
......@@ -1843,6 +1840,9 @@ window.status [string]
window.statusbar [object BarInfo]
window.statusbar.visible [boolean]
window.stop [function]
window.styleMedia [object Media]
window.styleMedia.matchMedium [function]
window.styleMedia.type [string]
window.toolbar [object BarInfo]
window.toolbar.visible [boolean]
window.top [printed above as window]
......
......@@ -350,7 +350,6 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'length') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'localStorage') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'location') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'locationbar') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'media') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'menubar') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'name') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'names') is 'object'
......@@ -458,6 +457,7 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'shouldThrow') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'status') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'statusbar') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'stringify') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'styleMedia') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'successfullyParsed') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'testFailed') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'testPassed') is 'object'
......
......@@ -667,8 +667,6 @@ PASS inner.location.isInner is true
PASS inner.location.constructor.isInner is true
PASS inner.locationbar.isInner is true
PASS inner.locationbar.constructor.isInner is true
PASS inner.media.isInner is true
PASS inner.media.constructor.isInner is true
PASS inner.menubar.isInner is true
PASS inner.menubar.constructor.isInner is true
FAIL inner.moveBy.isInner should be true. Was false.
......@@ -745,6 +743,8 @@ PASS inner.statusbar.isInner is true
PASS inner.statusbar.constructor.isInner is true
FAIL inner.stop.isInner should be true. Was false.
FAIL inner.stop.constructor.isInner should be true. Was false.
PASS inner.styleMedia.isInner is true
PASS inner.styleMedia.constructor.isInner is true
PASS inner.toolbar.isInner is true
PASS inner.toolbar.constructor.isInner is true
FAIL inner.webkitConvertPointFromNodeToPage.isInner should be true. Was false.
......
......@@ -2073,9 +2073,6 @@ window.locationbar.visible [boolean]
window.log [function]
window.logProperties [function]
window.logValue [function]
window.media [object Media]
window.media.matchMedium [function]
window.media.type [string]
window.menubar [object BarInfo]
window.menubar.visible [boolean]
window.moveBy [function]
......@@ -2195,6 +2192,9 @@ window.status [string]
window.statusbar [object BarInfo]
window.statusbar.visible [boolean]
window.stop [function]
window.styleMedia [object Media]
window.styleMedia.matchMedium [function]
window.styleMedia.type [string]
window.toolbar [object BarInfo]
window.toolbar.visible [boolean]
window.top [printed above as window]
......
......@@ -337,7 +337,6 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'length') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'localStorage') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'location') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'locationbar') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'media') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'menubar') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'name') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'names') is 'object'
......@@ -449,6 +448,7 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'shouldThrow') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'status') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'statusbar') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'stringify') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'styleMedia') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'successfullyParsed') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'testFailed') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'testPassed') is 'object'
......
......@@ -641,8 +641,6 @@ PASS inner.location.isInner is true
PASS inner.location.constructor.isInner is true
PASS inner.locationbar.isInner is true
PASS inner.locationbar.constructor.isInner is true
PASS inner.media.isInner is true
PASS inner.media.constructor.isInner is true
PASS inner.menubar.isInner is true
PASS inner.menubar.constructor.isInner is true
FAIL inner.moveBy.isInner should be true. Was false.
......@@ -721,6 +719,8 @@ PASS inner.statusbar.isInner is true
PASS inner.statusbar.constructor.isInner is true
FAIL inner.stop.isInner should be true. Was false.
FAIL inner.stop.constructor.isInner should be true. Was false.
PASS inner.styleMedia.isInner is true
PASS inner.styleMedia.constructor.isInner is true
PASS inner.toolbar.isInner is true
PASS inner.toolbar.constructor.isInner is true
FAIL inner.webkitConvertPointFromNodeToPage.isInner should be true. Was false.
......
......@@ -350,7 +350,6 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'length') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'localStorage') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'location') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'locationbar') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'media') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'menubar') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'name') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'names') is 'object'
......@@ -458,6 +457,7 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'shouldThrow') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'status') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'statusbar') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'stringify') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'styleMedia') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'successfullyParsed') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'testFailed') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'testPassed') is 'object'
......
......@@ -142,12 +142,12 @@ PASS History from inner.document.forms.testForm.0.ownerDocument.defaultView.hist
PASS HistoryPrototype from inner.document.forms.testForm.0.ownerDocument.defaultView.history.__proto__
PASS Location from inner.document.location
PASS LocationPrototype from inner.document.location.__proto__
PASS Media from inner.document.forms.testForm.0.ownerDocument.defaultView.media
PASS MediaConstructor from inner.document.forms.testForm.0.ownerDocument.defaultView.media.constructor
PASS Media from inner.document.forms.testForm.0.ownerDocument.defaultView.styleMedia
PASS MediaConstructor from inner.document.forms.testForm.0.ownerDocument.defaultView.styleMedia.constructor
PASS MediaList from inner.document.forms.testForm.0.ownerDocument.styleSheets.0.media
PASS MediaListConstructor from inner.document.forms.testForm.0.ownerDocument.styleSheets.0.media.constructor
PASS MediaListPrototype from inner.document.forms.testForm.0.ownerDocument.styleSheets.0.media.__proto__
PASS MediaPrototype from inner.document.forms.testForm.0.ownerDocument.defaultView.media.__proto__
PASS MediaPrototype from inner.document.forms.testForm.0.ownerDocument.defaultView.styleMedia.__proto__
PASS MimeType from inner.document.forms.testForm.0.ownerDocument.defaultView.clientInformation.mimeTypes.0
PASS MimeTypeArray from inner.document.forms.testForm.0.ownerDocument.defaultView.clientInformation.mimeTypes
PASS MimeTypeArrayConstructor from inner.document.forms.testForm.0.ownerDocument.defaultView.clientInformation.mimeTypes.constructor
......
......@@ -667,8 +667,6 @@ PASS inner.location.isInner is true
PASS inner.location.constructor.isInner is true
PASS inner.locationbar.isInner is true
PASS inner.locationbar.constructor.isInner is true
PASS inner.media.isInner is true
PASS inner.media.constructor.isInner is true
PASS inner.menubar.isInner is true
PASS inner.menubar.constructor.isInner is true
FAIL inner.moveBy.isInner should be true. Was false.
......@@ -745,6 +743,8 @@ PASS inner.statusbar.isInner is true
PASS inner.statusbar.constructor.isInner is true
FAIL inner.stop.isInner should be true. Was false.
FAIL inner.stop.constructor.isInner should be true. Was false.
PASS inner.styleMedia.isInner is true
PASS inner.styleMedia.constructor.isInner is true
PASS inner.toolbar.isInner is true
PASS inner.toolbar.constructor.isInner is true
FAIL inner.webkitConvertPointFromNodeToPage.isInner should be true. Was false.
......
2010-04-22 Kenneth Rohde Christiansen <kenneth@webkit.org>
Reviewed by Simon Fraser.
Rename window.media to window.styleMedia
https://bugs.webkit.org/show_bug.cgi?id=36187
It has been defined that the AbstractView media extension
defined in the CSSOM View spec should be renamed to styleMedia.
This patch does that and updates the current layout tests
making use of it.
* page/AbstractView.idl:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::styleMedia):
* page/DOMWindow.h:
* page/DOMWindow.idl:
2010-04-22 Anton Muhin <antonm@chromium.org>
Reviewed by Adam Barth.
......@@ -32,7 +32,7 @@ module views {
OmitConstructor
] AbstractView {
readonly attribute Document document;
readonly attribute Media media;
readonly attribute Media styleMedia;
};
}
......@@ -1136,7 +1136,7 @@ Document* DOMWindow::document() const
return m_frame->document();
}
PassRefPtr<Media> DOMWindow::media() const
PassRefPtr<Media> DOMWindow::styleMedia() const
{
if (!m_media)
m_media = Media::create(m_frame);
......
......@@ -187,7 +187,7 @@ namespace WebCore {
// DOM Level 2 AbstractView Interface
Document* document() const;
// CSSOM View Module
PassRefPtr<Media> media() const;
PassRefPtr<Media> styleMedia() const;
// DOM Level 2 Style Interface
PassRefPtr<CSSStyleDeclaration> getComputedStyle(Element*, const String& pseudoElt) const;
......
......@@ -141,7 +141,7 @@ module window {
readonly attribute Document document;
// CSSOM View Module
readonly attribute Media media;
readonly attribute Media styleMedia;
// DOM Level 2 Style Interface
CSSStyleDeclaration getComputedStyle(in Element element,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment