Commit 2f4e6fc9 authored by steveblock@google.com's avatar steveblock@google.com
Browse files

2010-05-20 Steve Block <steveblock@google.com>

        Reviewed by Jeremy Orlow.

        Provide bindings for DeviceOrientation
        https://bugs.webkit.org/show_bug.cgi?id=39210

        Adds ENABLE_DEVICE_ORIENTATION to XCode project file, always disabled.

        * Configurations/FeatureDefines.xcconfig:
2010-05-20  Steve Block  <steveblock@google.com>

        Reviewed by Jeremy Orlow.

        Provide bindings for DeviceOrientation
        https://bugs.webkit.org/show_bug.cgi?id=39210

        Adds ENABLE_DEVICE_ORIENTATION to VisualStudio project files, always disabled.

        * win/tools/vsprops/FeatureDefines.vsprops:
        * win/tools/vsprops/FeatureDefinesCairo.vsprops:
2010-05-20  Steve Block  <steveblock@google.com>

        Reviewed by Jeremy Orlow.

        Provide bindings for DeviceOrientation
        https://bugs.webkit.org/show_bug.cgi?id=39210

        Adds ENABLE_DEVICE_ORIENTATION to XCode project file, always disabled.

        * Configurations/FeatureDefines.xcconfig:
2010-05-20  Steve Block  <steveblock@google.com>

        Reviewed by Jeremy Orlow.

        Provide bindings for DeviceOrientation
        https://bugs.webkit.org/show_bug.cgi?id=39210

        Tests: fast/dom/DeviceOrientation/window-property.html
               fast/dom/Window/window-properties-on-device-orientation.html

        Adds bindings for DeviceOrientation as defined in
        http://dev.w3.org/geo/api/spec-source-orientation.html
        This is guarded by ENABLE(DEVICE_ORIENTATION) which is currently disabled on
        all platforms but Android.

        * Android.derived.jscbindings.mk:
        * Android.derived.v8bindings.mk:
        * Android.mk:
        * Configurations/FeatureDefines.xcconfig:
        * DerivedSources.cpp:
        * DerivedSources.make:
        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pri:
        * WebCore.pro:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSEventCustom.cpp:
        (WebCore::toJS):
        * bindings/v8/custom/V8EventCustom.cpp:
        (WebCore::toV8):
        * dom/DeviceOrientationEvent.cpp: Added.
        (WebCore::DeviceOrientationEvent::DeviceOrientationEvent):
        (WebCore::DeviceOrientationEvent::initDeviceOrientationEvent):
        * dom/DeviceOrientationEvent.h: Added.
        (WebCore::DeviceOrientationEvent::create):
        (WebCore::DeviceOrientationEvent::alpha):
        (WebCore::DeviceOrientationEvent::beta):
        (WebCore::DeviceOrientationEvent::gamma):
        (WebCore::DeviceOrientationEvent::isDeviceOrientationEvent):
        * dom/DeviceOrientationEvent.idl: Added.
        * dom/Event.cpp:
        (WebCore::Event::isDeviceOrientationEvent):
        * dom/Event.h:
        * dom/EventNames.h:
        * page/DOMWindow.h:
        * page/DOMWindow.idl:
2010-05-20  Steve Block  <steveblock@google.com>

        Reviewed by Jeremy Orlow.

        Provide bindings for DeviceOrientation
        https://bugs.webkit.org/show_bug.cgi?id=39210

        Modifies existing fast/dom/Window tests to skip window.ondeviceorientation until
        it is widely supported.
        Adds new fast/dom/Window/window-properties-on-device-orientation.html to test
        type and presence of window.ondeviceorientation.
        Adds new fast/dom/DeviceOrientation directory and initial test.
        Adds all DeviceOrientation tests to all skipped lists.

        * fast/dom/DeviceOrientation: Added.
        * fast/dom/DeviceOrientation/script-tests: Added.
        * fast/dom/DeviceOrientation/script-tests/TEMPLATE.html: Added.
        * fast/dom/DeviceOrientation/script-tests/window-property.js: Added.
        (hasOnDeviceOrientationProperty):
        * fast/dom/DeviceOrientation/window-property-expected.txt: Added.
        * fast/dom/DeviceOrientation/window-property.html: Added.
        * fast/dom/Window/script-tests/window-property-descriptors.js:
        * fast/dom/Window/window-properties-on-device-orientation-expected.txt: Added.
        * fast/dom/Window/window-properties-on-device-orientation.html: Added.
        * fast/dom/Window/window-properties.html:
        * platform/chromium/test_expectations.txt:
        * platform/gtk/Skipped:
        * platform/mac/Skipped:
        * platform/qt/Skipped:
        * platform/win/Skipped:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent fb767332
2010-05-20 Steve Block <steveblock@google.com>
Reviewed by Jeremy Orlow.
Provide bindings for DeviceOrientation
https://bugs.webkit.org/show_bug.cgi?id=39210
Adds ENABLE_DEVICE_ORIENTATION to XCode project file, always disabled.
* Configurations/FeatureDefines.xcconfig:
2010-05-19 Gavin Barraclough <barraclough@apple.com>
 
Reviewed by Geoff Garen.
......
......@@ -47,6 +47,7 @@ ENABLE_CLIENT_BASED_GEOLOCATION = ENABLE_CLIENT_BASED_GEOLOCATION;
ENABLE_DATABASE = ENABLE_DATABASE;
ENABLE_DATAGRID = ;
ENABLE_DATALIST = ENABLE_DATALIST;
ENABLE_DEVICE_ORIENTATION = ;
ENABLE_DOM_STORAGE = ENABLE_DOM_STORAGE;
ENABLE_EVENTSOURCE = ENABLE_EVENTSOURCE;
ENABLE_FILTERS = ENABLE_FILTERS;
......@@ -78,4 +79,4 @@ ENABLE_XHTMLMP = ;
ENABLE_XPATH = ENABLE_XPATH;
ENABLE_XSLT = ENABLE_XSLT;
FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB_SLICE) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_READER) $(ENABLE_FILE_WRITER) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB_SLICE) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_READER) $(ENABLE_FILE_WRITER) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
2010-05-20 Steve Block <steveblock@google.com>
Reviewed by Jeremy Orlow.
Provide bindings for DeviceOrientation
https://bugs.webkit.org/show_bug.cgi?id=39210
Modifies existing fast/dom/Window tests to skip window.ondeviceorientation until
it is widely supported.
Adds new fast/dom/Window/window-properties-on-device-orientation.html to test
type and presence of window.ondeviceorientation.
Adds new fast/dom/DeviceOrientation directory and initial test.
Adds all DeviceOrientation tests to all skipped lists.
* fast/dom/DeviceOrientation: Added.
* fast/dom/DeviceOrientation/script-tests: Added.
* fast/dom/DeviceOrientation/script-tests/TEMPLATE.html: Added.
* fast/dom/DeviceOrientation/script-tests/window-property.js: Added.
(hasOnDeviceOrientationProperty):
* fast/dom/DeviceOrientation/window-property-expected.txt: Added.
* fast/dom/DeviceOrientation/window-property.html: Added.
* fast/dom/Window/script-tests/window-property-descriptors.js:
* fast/dom/Window/window-properties-on-device-orientation-expected.txt: Added.
* fast/dom/Window/window-properties-on-device-orientation.html: Added.
* fast/dom/Window/window-properties.html:
* platform/chromium/test_expectations.txt:
* platform/gtk/Skipped:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
2010-05-20 Martin Robinson <mrobinson@webkit.org>
 
Reviewed by Ojan Vafai.
<html>
<head>
<link rel="stylesheet" href="../../js/resources/js-test-style.css">
<script src="../../js/resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script src="YOUR_JS_FILE_HERE"></script>
<script src="../../js/resources/js-test-post.js"></script>
</body>
</html>
description("Tests that the window.ondeviceorientation property is present.");
function hasOnDeviceOrientationProperty()
{
for (var property in window) {
if (property == "ondeviceorientation")
return true;
}
return false;
}
shouldBeTrue("typeof window.ondeviceorientation == 'object'");
shouldBeTrue("hasOnDeviceOrientationProperty()");
shouldBeTrue("'ondeviceorientation' in window");
shouldBeTrue("window.hasOwnProperty('ondeviceorientation')");
window.successfullyParsed = true;
Tests that the window.ondeviceorientation property is present.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS typeof window.ondeviceorientation == 'object' is true
PASS hasOnDeviceOrientationProperty() is true
PASS 'ondeviceorientation' in window is true
PASS window.hasOwnProperty('ondeviceorientation') is true
PASS successfullyParsed is true
TEST COMPLETE
<html>
<head>
<link rel="stylesheet" href="../../js/resources/js-test-style.css">
<script src="../../js/resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script src="script-tests/window-property.js"></script>
<script src="../../js/resources/js-test-post.js"></script>
</body>
</html>
......@@ -37,6 +37,7 @@ var __skip__ = {
"FloatArray" : 1,
"FileError" : 1,
"FileReader" : 1,
"ondeviceorientation" : 1,
// Ignore this property because it only appears in debug builds and not in release.
"jscprint" : 1
};
......
This test dumps all of the properties that are reachable from the window.ondeviceorientation object, along with their types.
window.ondeviceorientation [null]
<p>This test dumps all of the properties that are reachable from the window.ondeviceorientation
object, along with their types.</p>
<hr>
<pre id="pre"></pre>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
var logBuffer = [];
function log(s)
{
logBuffer.push(s);
}
var pre = document.getElementById('pre');
function flushLog()
{
var logMessage = logBuffer.join("");
pre.appendChild(document.createTextNode(logMessage));
}
function tryEval(string)
{
try {
return eval(string);
} catch (e) {
return new String("Caught exception: " + e);
}
}
function typeOfNullAware(value)
{
if (typeof value == "object" && value == null) //;
return "null";
return typeof value;
}
function typeStringNullAware(value)
{
var valueType = typeOfNullAware(value);
return valueType == "object"
? Object.prototype.toString.call(value)
: "[" + valueType + "]";
}
function logValue(valueName)
{
var value = tryEval(valueName);
var valueType = typeOfNullAware(value);
// Don't taint the test with our own variables
if (value == logBuffer || value == pre)
return;
// Don't taint the test with our own properties
if (/__visitedByLogValue__/.test(valueName) || /__nameWhenVisitedByLogValue__/.test(valueName))
return;
// Work around Firefox infinite recursion
if (/\.[0-9]/.test(valueName))
return;
// Avoid infinite recursion
if (valueType == "object" && value.__visitedByLogValue__) { //;
log(valueName + " [printed above as " + value.__nameWhenVisitedByLogValue__ + "]\n");
return;
}
log(valueName + " " + typeStringNullAware(value) + "\n");
if (valueType == "object") {
value.__visitedByLogValue__ = true;
value.__nameWhenVisitedByLogValue__ = valueName;
logProperties(value, valueName);
}
}
function logProperties(object, objectName)
{
var array = new Array;
for (var property in object) {
array.push(property);
}
array.sort();
for (var i = 0; i < array.length; i++) {
var property = array[i];
logValue(objectName + "." + property);
}
}
logValue('window.ondeviceorientation');
flushLog();
</script>
......@@ -82,7 +82,8 @@ var __skip__ = {
"window.clientInformation.geolocation" : 1,
"window.Blob.prototype.slice" : 1,
"window.FileError" : 1,
"window.FileReader" : 1
"window.FileReader" : 1,
"window.ondeviceorientation" : 1
};
function logValue(valueName)
......
......@@ -2838,3 +2838,7 @@ BUGWK39105 WIN LINUX : editing/spelling/context-menu-suggestions.html = MISSING
// Flaky tests
BUG44229 WIN LINUX : fast/loader/recursive-before-unload-crash.html = PASS TEXT
// DeviceOrientation API not yet implemented.
BUG44654 SKIP : fast/dom/DeviceOrientation = TEXT
BUG44654 SKIP : fast/dom/Window/window-properties-on-device-orientation.html = TEXT
......@@ -1179,6 +1179,7 @@ fast/dom/client-width-height-quirks.html
fast/dom/client-width-height.html
fast/dom/cssTarget-crash.html
fast/dom/frame-loading-via-document-write.html
fast/dom/DeviceOrientation/window-property.html
fast/dom/Geolocation/callback-exception.html
fast/dom/Geolocation/error.html
fast/dom/Geolocation/permission-denied-already-clear-watch.html
......@@ -1204,6 +1205,7 @@ fast/dom/SelectorAPI/resig-SelectorsAPI-test.xhtml
fast/dom/Window/new-window-opener.html
fast/dom/Window/webkitConvertPoint.html
fast/dom/Window/window-onFocus.html
fast/dom/Window/window-properties-on-device-orientation.html
fast/dom/Window/window-resize-and-move-arguments.html
fast/dom/Window/window-resize.html
fast/dom/Window/window-xy-properties.html
......
......@@ -188,3 +188,7 @@ scrollbars/scrollbar-click-does-not-blur-content.html
# IndexedDB is not yet enabled.
storage/indexeddb
# This port doesn't support DeviceOrientation.
fast/dom/DeviceOrientation
fast/dom/Window/window-properties-on-device-orientation.html
......@@ -5088,3 +5088,7 @@ editing/spelling/context-menu-suggestions.html
# IndexedDB is not yet enabled.
storage/indexeddb
# This port doesn't support DeviceOrientation.
fast/dom/DeviceOrientation
fast/dom/Window/window-properties-on-device-orientation.html
......@@ -883,3 +883,7 @@ editing/spelling/context-menu-suggestions.html
# IndexedDB is not yet enabled.
storage/indexeddb
# This port doesn't support DeviceOrientation.
fast/dom/DeviceOrientation
fast/dom/Window/window-properties-on-device-orientation.html
......@@ -49,7 +49,7 @@ js_binding_scripts := $(addprefix $(LOCAL_PATH)/,\
bindings/scripts/generate-bindings.pl \
)
FEATURE_DEFINES := ANDROID_ORIENTATION_SUPPORT ENABLE_TOUCH_EVENTS=1 ENABLE_DATABASE=1 ENABLE_OFFLINE_WEB_APPLICATIONS=1 ENABLE_DOM_STORAGE=1 ENABLE_VIDEO=1 ENABLE_WORKERS=1 ENABLE_GEOLOCATION=1 ENABLE_CHANNEL_MESSAGING=1
FEATURE_DEFINES := ANDROID_ORIENTATION_SUPPORT ENABLE_TOUCH_EVENTS=1 ENABLE_DATABASE=1 ENABLE_OFFLINE_WEB_APPLICATIONS=1 ENABLE_DOM_STORAGE=1 ENABLE_VIDEO=1 ENABLE_WORKERS=1 ENABLE_GEOLOCATION=1 ENABLE_CHANNEL_MESSAGING=1 ENABLE_DEVICE_ORIENTATION=1
# CSS
GEN := \
......@@ -103,6 +103,7 @@ GEN := \
$(intermediates)/dom/JSComment.h \
$(intermediates)/dom/JSDOMCoreException.h \
$(intermediates)/dom/JSDOMImplementation.h \
$(intermediates)/dom/JSDeviceOrientationEvent.h \
$(intermediates)/dom/JSDocument.h \
$(intermediates)/dom/JSDocumentFragment.h \
$(intermediates)/dom/JSDocumentType.h \
......
......@@ -30,7 +30,8 @@ js_binding_scripts := \
$(LOCAL_PATH)/bindings/scripts/IDLStructure.pm \
$(LOCAL_PATH)/bindings/scripts/generate-bindings.pl
FEATURE_DEFINES := ANDROID_ORIENTATION_SUPPORT ENABLE_TOUCH_EVENTS=1 V8_BINDING ENABLE_DATABASE=1 ENABLE_OFFLINE_WEB_APPLICATIONS=1 ENABLE_DOM_STORAGE=1 ENABLE_VIDEO=1 ENABLE_WORKERS=1 ENABLE_GEOLOCATION=1
FEATURE_DEFINES := ANDROID_ORIENTATION_SUPPORT ENABLE_TOUCH_EVENTS=1 ENABLE_DATABASE=1 ENABLE_OFFLINE_WEB_APPLICATIONS=1 ENABLE_DOM_STORAGE=1 ENABLE_VIDEO=1 ENABLE_WORKERS=1 ENABLE_GEOLOCATION=1 ENABLE_DEVICE_ORIENTATION=1
FEATURE_DEFINES += V8_BINDING
# CSS
GEN := \
......@@ -84,6 +85,7 @@ GEN := \
$(intermediates)/bindings/V8Comment.h \
$(intermediates)/bindings/V8DOMCoreException.h \
$(intermediates)/bindings/V8DOMImplementation.h \
$(intermediates)/bindings/V8DeviceOrientationEvent.h \
$(intermediates)/bindings/V8Document.h \
$(intermediates)/bindings/V8DocumentFragment.h \
$(intermediates)/bindings/V8DocumentType.h \
......
......@@ -145,6 +145,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
dom/Notation.cpp \
dom/OptionElement.cpp \
dom/OptionGroupElement.cpp \
dom/DeviceOrientationEvent.cpp \
dom/OverflowEvent.cpp \
dom/PageTransitionEvent.cpp \
dom/Position.cpp \
......
2010-05-20 Steve Block <steveblock@google.com>
Reviewed by Jeremy Orlow.
Provide bindings for DeviceOrientation
https://bugs.webkit.org/show_bug.cgi?id=39210
Tests: fast/dom/DeviceOrientation/window-property.html
fast/dom/Window/window-properties-on-device-orientation.html
Adds bindings for DeviceOrientation as defined in
http://dev.w3.org/geo/api/spec-source-orientation.html
This is guarded by ENABLE(DEVICE_ORIENTATION) which is currently disabled on
all platforms but Android.
* Android.derived.jscbindings.mk:
* Android.derived.v8bindings.mk:
* Android.mk:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.am:
* WebCore.gypi:
* WebCore.pri:
* WebCore.pro:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSEventCustom.cpp:
(WebCore::toJS):
* bindings/v8/custom/V8EventCustom.cpp:
(WebCore::toV8):
* dom/DeviceOrientationEvent.cpp: Added.
(WebCore::DeviceOrientationEvent::DeviceOrientationEvent):
(WebCore::DeviceOrientationEvent::initDeviceOrientationEvent):
* dom/DeviceOrientationEvent.h: Added.
(WebCore::DeviceOrientationEvent::create):
(WebCore::DeviceOrientationEvent::alpha):
(WebCore::DeviceOrientationEvent::beta):
(WebCore::DeviceOrientationEvent::gamma):
(WebCore::DeviceOrientationEvent::isDeviceOrientationEvent):
* dom/DeviceOrientationEvent.idl: Added.
* dom/Event.cpp:
(WebCore::Event::isDeviceOrientationEvent):
* dom/Event.h:
* dom/EventNames.h:
* page/DOMWindow.h:
* page/DOMWindow.idl:
2010-05-20 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
 
Rubberstamped by Antti Koivisto.
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