Create Document exitPointerLock and pointerLockElement API methods.
Part of the larger task of creating an unprefixed Pointer Lock API.
Intent to Implement and Ship approved April 21 2014
http://goo.gl/uQTJjH.
BUG=359738
Review URL: https://codereview.chromium.org/279313003
git-svn-id: svn://svn.chromium.org/blink/trunk@174201 bbb929c8-8fbe-4397-9dbb-9b2b20218538
diff --git a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-allow-pointer-lock-expected.txt b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-allow-pointer-lock-expected.txt
index 2da0071b..c22acc9 100644
--- a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-allow-pointer-lock-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-allow-pointer-lock-expected.txt
@@ -3,7 +3,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS message is "inner-iframe.html onpointerlockchange, document.webkitPointerLockElement = [object HTMLBodyElement]"
+PASS message is "inner-iframe.html onpointerlockchange, document.pointerLockElement = [object HTMLBodyElement]"
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-allow-pointer-lock.html b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-allow-pointer-lock.html
index 4afe42c..318ab17 100644
--- a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-allow-pointer-lock.html
+++ b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-allow-pointer-lock.html
@@ -18,10 +18,10 @@
todo = [
function () {
- iframe.contentWindow.postMessage(["eval", 'document.body.webkitRequestPointerLock()'], "*");
+ iframe.contentWindow.postMessage(["eval", 'document.body.requestPointerLock()'], "*");
window.onmessage = function (messageEvent) {
message = messageEvent.data;
- shouldBeEqualToString("message", "inner-iframe.html onpointerlockchange, document.webkitPointerLockElement = [object HTMLBodyElement]");
+ shouldBeEqualToString("message", "inner-iframe.html onpointerlockchange, document.pointerLockElement = [object HTMLBodyElement]");
window.onmessage = null;
doNextStep();
}
diff --git a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-nested-allow-pointer-lock-expected.txt b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-nested-allow-pointer-lock-expected.txt
index ddfaf8f..a047fc5cb 100644
--- a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-nested-allow-pointer-lock-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-nested-allow-pointer-lock-expected.txt
@@ -3,7 +3,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS message is "inner-iframe.html onpointerlockchange, document.webkitPointerLockElement = [object HTMLBodyElement]"
+PASS message is "inner-iframe.html onpointerlockchange, document.pointerLockElement = [object HTMLBodyElement]"
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-nested-allow-pointer-lock.html b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-nested-allow-pointer-lock.html
index a9f921d9..21ac77f5 100644
--- a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-nested-allow-pointer-lock.html
+++ b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-nested-allow-pointer-lock.html
@@ -18,10 +18,10 @@
todo = [
function () {
- iframe.contentWindow.postMessage(["pass message down", "eval", 'document.body.webkitRequestPointerLock()'], "*");
+ iframe.contentWindow.postMessage(["pass message down", "eval", 'document.body.requestPointerLock()'], "*");
window.onmessage = function (messageEvent) {
message = messageEvent.data;
- shouldBeEqualToString("message", "inner-iframe.html onpointerlockchange, document.webkitPointerLockElement = [object HTMLBodyElement]");
+ shouldBeEqualToString("message", "inner-iframe.html onpointerlockchange, document.pointerLockElement = [object HTMLBodyElement]");
window.onmessage = null;
doNextStep();
}
diff --git a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-nested-disallow-then-allow-pointer-lock.html b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-nested-disallow-then-allow-pointer-lock.html
index f45c3ad..c9d8a6b6 100644
--- a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-nested-disallow-then-allow-pointer-lock.html
+++ b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-nested-disallow-then-allow-pointer-lock.html
@@ -18,7 +18,7 @@
todo = [
function () {
- iframe.contentWindow.postMessage(["pass message down", "eval", 'document.body.webkitRequestPointerLock()'], "*");
+ iframe.contentWindow.postMessage(["pass message down", "eval", 'document.body.requestPointerLock()'], "*");
window.onmessage = function (messageEvent) {
message = messageEvent.data;
shouldBeEqualToString("message", "inner-iframe.html onpointerlockerror");
diff --git a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed.html b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed.html
index a9d3380..b9d0b6b2 100644
--- a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed.html
+++ b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/iframe-sandboxed.html
@@ -18,7 +18,7 @@
todo = [
function () {
- iframe.contentWindow.postMessage(["eval", 'document.body.webkitRequestPointerLock()'], "*");
+ iframe.contentWindow.postMessage(["eval", 'document.body.requestPointerLock()'], "*");
window.onmessage = function (messageEvent) {
message = messageEvent.data;
shouldBeEqualToString("message", "inner-iframe.html onpointerlockerror");
diff --git a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/pointerlockelement-different-origin-expected.txt b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/pointerlockelement-different-origin-expected.txt
index a6b2ddc..d950246 100644
--- a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/pointerlockelement-different-origin-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/pointerlockelement-different-origin-expected.txt
@@ -1,12 +1,12 @@
-Test iframe from different origin can not access webkitPointerLockElement.
+Test iframe from different origin can not access pointerLockElement.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Lock targetDiv1.
PASS onpointerlockchange received after: Lock targetDiv1.
-PASS document.webkitPointerLockElement is targetDiv1
-PASS message is "inner-iframe.html document.webkitPointerLockElement = null"
+PASS document.pointerLockElement is targetDiv1
+PASS message is "inner-iframe.html document.pointerLockElement = null"
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/pointerlockelement-different-origin.html b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/pointerlockelement-different-origin.html
index 547c9743..63c2587 100644
--- a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/pointerlockelement-different-origin.html
+++ b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/pointerlockelement-different-origin.html
@@ -10,7 +10,7 @@
<iframe src="http://localhost:8080/resources/pointer-lock/inner-iframe.html" onload="doNextStepWithUserGesture()"></iframe>
</div>
<script>
- description("Test iframe from different origin can not access webkitPointerLockElement.")
+ description("Test iframe from different origin can not access pointerLockElement.")
window.jsTestIsAsync = true;
targetDiv1 = document.getElementById("target1");
@@ -19,18 +19,18 @@
todo = [
function () {
expectOnlyChangeEvent("Lock targetDiv1.");
- targetDiv1.webkitRequestPointerLock();
+ targetDiv1.requestPointerLock();
// doNextStep called by event handler.
},
function () {
- shouldBe("document.webkitPointerLockElement", "targetDiv1");
+ shouldBe("document.pointerLockElement", "targetDiv1");
doNextStep();
},
function () {
- iframe.contentWindow.postMessage(["eval", 'parent.postMessage(thisFileName() + " document.webkitPointerLockElement = " + document.webkitPointerLockElement, "*")'], "*");
+ iframe.contentWindow.postMessage(["eval", 'parent.postMessage(thisFileName() + " document.pointerLockElement = " + document.pointerLockElement, "*")'], "*");
window.onmessage = function (messageEvent) {
message = messageEvent.data;
- shouldBeEqualToString("message", "inner-iframe.html document.webkitPointerLockElement = null");
+ shouldBeEqualToString("message", "inner-iframe.html document.pointerLockElement = null");
window.onmessage = null;
doNextStep();
}
diff --git a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/pointerlockelement-same-origin-expected.txt b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/pointerlockelement-same-origin-expected.txt
index ec2066a..4663e9e 100644
--- a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/pointerlockelement-same-origin-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/pointerlockelement-same-origin-expected.txt
@@ -1,12 +1,12 @@
-Test iframe from same origin can not access webkitPointerLockElement.
+Test iframe from same origin can not access pointerLockElement.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Lock targetDiv1.
PASS onpointerlockchange received after: Lock targetDiv1.
-PASS document.webkitPointerLockElement is targetDiv1
-PASS message is "inner-iframe.html document.webkitPointerLockElement = null"
+PASS document.pointerLockElement is targetDiv1
+PASS message is "inner-iframe.html document.pointerLockElement = null"
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/pointerlockelement-same-origin.html b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/pointerlockelement-same-origin.html
index 4e000680..641b78b6 100644
--- a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/pointerlockelement-same-origin.html
+++ b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/pointerlockelement-same-origin.html
@@ -10,7 +10,7 @@
<iframe src="../resources/pointer-lock/inner-iframe.html" onload="doNextStepWithUserGesture()"></iframe>
</div>
<script>
- description("Test iframe from same origin can not access webkitPointerLockElement.")
+ description("Test iframe from same origin can not access pointerLockElement.")
window.jsTestIsAsync = true;
targetDiv1 = document.getElementById("target1");
@@ -19,18 +19,18 @@
todo = [
function () {
expectOnlyChangeEvent("Lock targetDiv1.");
- targetDiv1.webkitRequestPointerLock();
+ targetDiv1.requestPointerLock();
// doNextStep called by event handler.
},
function () {
- shouldBe("document.webkitPointerLockElement", "targetDiv1");
+ shouldBe("document.pointerLockElement", "targetDiv1");
doNextStep();
},
function () {
- iframe.contentWindow.postMessage(["eval", 'parent.postMessage(thisFileName() + " document.webkitPointerLockElement = " + document.webkitPointerLockElement, "*")'], "*");
+ iframe.contentWindow.postMessage(["eval", 'parent.postMessage(thisFileName() + " document.pointerLockElement = " + document.pointerLockElement, "*")'], "*");
window.onmessage = function (messageEvent) {
message = messageEvent.data;
- shouldBeEqualToString("message", "inner-iframe.html document.webkitPointerLockElement = null");
+ shouldBeEqualToString("message", "inner-iframe.html document.pointerLockElement = null");
window.onmessage = null;
doNextStep();
}
diff --git a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/requestPointerLock-can-not-transfer-between-documents-expected.txt b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/requestPointerLock-can-not-transfer-between-documents-expected.txt
index 17ca916..72f225fc 100644
--- a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/requestPointerLock-can-not-transfer-between-documents-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/requestPointerLock-can-not-transfer-between-documents-expected.txt
@@ -5,7 +5,7 @@
Lock targetDiv1.
PASS onpointerlockchange received after: Lock targetDiv1.
-PASS document.webkitPointerLockElement is targetDiv1
+PASS document.pointerLockElement is targetDiv1
PASS message is "inner-iframe.html onpointerlockerror"
PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/requestPointerLock-can-not-transfer-between-documents.html b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/requestPointerLock-can-not-transfer-between-documents.html
index 003e6b2..d82b0716 100644
--- a/third_party/WebKit/LayoutTests/http/tests/pointer-lock/requestPointerLock-can-not-transfer-between-documents.html
+++ b/third_party/WebKit/LayoutTests/http/tests/pointer-lock/requestPointerLock-can-not-transfer-between-documents.html
@@ -19,15 +19,15 @@
todo = [
function () {
expectOnlyChangeEvent("Lock targetDiv1.");
- targetDiv1.webkitRequestPointerLock();
+ targetDiv1.requestPointerLock();
// doNextStep called by event handler.
},
function () {
- shouldBe("document.webkitPointerLockElement", "targetDiv1");
+ shouldBe("document.pointerLockElement", "targetDiv1");
doNextStep();
},
function () {
- iframe.contentWindow.postMessage(["eval", 'document.body.webkitRequestPointerLock()'], "*");
+ iframe.contentWindow.postMessage(["eval", 'document.body.requestPointerLock()'], "*");
window.onmessage = function (messageEvent) {
message = messageEvent.data;
shouldBeEqualToString("message", "inner-iframe.html onpointerlockerror");
@@ -36,9 +36,9 @@
}
},
function () {
- iframe.contentWindow.postMessage(["eval", 'document.webkitExitPointerLock()'], "*");
+ iframe.contentWindow.postMessage(["eval", 'document.exitPointerLock()'], "*");
window.onmessage = function (messageEvent) {
- testFailed("webkitExitPointerLock from a document that doesn't have a lock caused an event " + messageEvent.data);
+ testFailed("exitPointerLock from a document that doesn't have a lock caused an event " + messageEvent.data);
finishJSTest();
}
doNextStep();
diff --git a/third_party/WebKit/LayoutTests/http/tests/resources/pointer-lock/iframe-common.js b/third_party/WebKit/LayoutTests/http/tests/resources/pointer-lock/iframe-common.js
index 34589cd..5562484 100644
--- a/third_party/WebKit/LayoutTests/http/tests/resources/pointer-lock/iframe-common.js
+++ b/third_party/WebKit/LayoutTests/http/tests/resources/pointer-lock/iframe-common.js
@@ -19,7 +19,7 @@
}
document.onpointerlockchange = function () {
- parent.postMessage(thisFileName() + " onpointerlockchange, document.webkitPointerLockElement = " + document.webkitPointerLockElement, "*");
+ parent.postMessage(thisFileName() + " onpointerlockchange, document.pointerLockElement = " + document.pointerLockElement, "*");
}
document.onpointerlockerror = function () {
diff --git a/third_party/WebKit/LayoutTests/pointer-lock/bug90391-move-then-window-open-crash.html b/third_party/WebKit/LayoutTests/pointer-lock/bug90391-move-then-window-open-crash.html
index 322e23ba..96f3cf5d 100644
--- a/third_party/WebKit/LayoutTests/pointer-lock/bug90391-move-then-window-open-crash.html
+++ b/third_party/WebKit/LayoutTests/pointer-lock/bug90391-move-then-window-open-crash.html
@@ -43,7 +43,7 @@
gc();
window.open();
testPassed("Didn't crash");
- document.webkitExitPointerLock();
+ document.exitPointerLock();
doNextStep();
},
];
diff --git a/third_party/WebKit/LayoutTests/pointer-lock/lock-already-locked-expected.txt b/third_party/WebKit/LayoutTests/pointer-lock/lock-already-locked-expected.txt
index f83669b..ea34843 100644
--- a/third_party/WebKit/LayoutTests/pointer-lock/lock-already-locked-expected.txt
+++ b/third_party/WebKit/LayoutTests/pointer-lock/lock-already-locked-expected.txt
@@ -3,16 +3,16 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS document.webkitPointerLockElement is null
+PASS document.pointerLockElement is null
Locking targetdiv1.
PASS document.onpointerlockchange event received.
-PASS document.webkitPointerLockElement is targetdiv1
+PASS document.pointerLockElement is targetdiv1
Locking targetdiv1, again.
PASS document.onpointerlockchange event received.
-PASS document.webkitPointerLockElement is targetdiv1
+PASS document.pointerLockElement is targetdiv1
Locking targetdiv2.
PASS document.onpointerlockchange event received.
-PASS document.webkitPointerLockElement is targetdiv2
+PASS document.pointerLockElement is targetdiv2
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/pointer-lock/lock-already-locked.html b/third_party/WebKit/LayoutTests/pointer-lock/lock-already-locked.html
index 2098efb..3d2fc877 100644
--- a/third_party/WebKit/LayoutTests/pointer-lock/lock-already-locked.html
+++ b/third_party/WebKit/LayoutTests/pointer-lock/lock-already-locked.html
@@ -21,7 +21,7 @@
document.onpointerlockchange = function ()
{
testPassed("document.onpointerlockchange event received.");
- shouldBe("document.webkitPointerLockElement", expectedTargetToBeLockedString);
+ shouldBe("document.pointerLockElement", expectedTargetToBeLockedString);
doNextStepWithUserGesture();
};
document.onpointerlockerror =
@@ -37,7 +37,7 @@
todo = [
function () {
- shouldBe("document.webkitPointerLockElement", "null");
+ shouldBe("document.pointerLockElement", "null");
debug(" Locking targetdiv1.")
targetdiv1.requestPointerLock();
expectedTargetToBeLockedString = "targetdiv1";
diff --git a/third_party/WebKit/LayoutTests/pointer-lock/locked-element-iframe-removed-from-dom-expected.txt b/third_party/WebKit/LayoutTests/pointer-lock/locked-element-iframe-removed-from-dom-expected.txt
index 46ffb7c..dc0d019e 100644
--- a/third_party/WebKit/LayoutTests/pointer-lock/locked-element-iframe-removed-from-dom-expected.txt
+++ b/third_party/WebKit/LayoutTests/pointer-lock/locked-element-iframe-removed-from-dom-expected.txt
@@ -6,11 +6,11 @@
Lock target in iframe. (main document handler)
Lock target in iframe. (iframe handler)
PASS onpointerlockchange received after: Lock target in iframe. (iframe handler)
-PASS targetIframe1.contentDocument.webkitPointerLockElement is targetDiv1
+PASS targetIframe1.contentDocument.pointerLockElement is targetDiv1
PASS targetDiv1.parentElement.parentElement is targetIframe1.contentDocument.body
Remove iframe & immediately lock target2. (main document handler)
Remove iframe & immediately lock target2. (iframe handler)
-PASS document.webkitPointerLockElement is null
+PASS document.pointerLockElement is null
PASS onpointerlockchange received after: Remove iframe & immediately lock target2. (main document handler)
PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/pointer-lock/locked-element-iframe-removed-from-dom.html b/third_party/WebKit/LayoutTests/pointer-lock/locked-element-iframe-removed-from-dom.html
index 11c94a3..95ec6bb 100644
--- a/third_party/WebKit/LayoutTests/pointer-lock/locked-element-iframe-removed-from-dom.html
+++ b/third_party/WebKit/LayoutTests/pointer-lock/locked-element-iframe-removed-from-dom.html
@@ -32,13 +32,13 @@
// doNextStep called by event handler.
},
function () {
- shouldBe("targetIframe1.contentDocument.webkitPointerLockElement", "targetDiv1");
+ shouldBe("targetIframe1.contentDocument.pointerLockElement", "targetDiv1");
shouldBe("targetDiv1.parentElement.parentElement", "targetIframe1.contentDocument.body");
expectOnlyChangeEvent("Remove iframe & immediately lock target2. (main document handler)");
expectNoEvents("Remove iframe & immediately lock target2. (iframe handler)", targetIframe1.contentDocument);
targetIframe1.parentElement.removeChild(targetIframe1);
targetDiv2.requestPointerLock();
- shouldBe("document.webkitPointerLockElement", "null");
+ shouldBe("document.pointerLockElement", "null");
// doNextStep called by event handler.
},
];
diff --git a/third_party/WebKit/LayoutTests/pointer-lock/locked-element-removed-from-dom-expected.txt b/third_party/WebKit/LayoutTests/pointer-lock/locked-element-removed-from-dom-expected.txt
index d03f1fff..3234ba3 100644
--- a/third_party/WebKit/LayoutTests/pointer-lock/locked-element-removed-from-dom-expected.txt
+++ b/third_party/WebKit/LayoutTests/pointer-lock/locked-element-removed-from-dom-expected.txt
@@ -6,11 +6,11 @@
Lock target in iframe. (main document handler).
Lock target in iframe. (iframe handler)
PASS onpointerlockchange received after: Lock target in iframe. (iframe handler)
-PASS targetIframe1.contentDocument.webkitPointerLockElement is targetDiv1
+PASS targetIframe1.contentDocument.pointerLockElement is targetDiv1
PASS targetDiv1.parentElement.parentElement is targetIframe1.contentDocument.body
Remove targetDiv1's parent from iframe & immediately lock target2. (main document handler)
Remove targetDiv1's parent from iframe & immediately lock target2. (iframe handler)
-PASS document.webkitPointerLockElement is null
+PASS document.pointerLockElement is null
PASS targetDiv1.parentElement.parentElement is null
PASS onpointerlockerror received after: Remove targetDiv1's parent from iframe & immediately lock target2. (main document handler)
PASS onpointerlockchange received after: Remove targetDiv1's parent from iframe & immediately lock target2. (iframe handler)
diff --git a/third_party/WebKit/LayoutTests/pointer-lock/locked-element-removed-from-dom.html b/third_party/WebKit/LayoutTests/pointer-lock/locked-element-removed-from-dom.html
index 411e9cf..e2ef0dd 100644
--- a/third_party/WebKit/LayoutTests/pointer-lock/locked-element-removed-from-dom.html
+++ b/third_party/WebKit/LayoutTests/pointer-lock/locked-element-removed-from-dom.html
@@ -32,13 +32,13 @@
// doNextStep called by event handler.
},
function () {
- shouldBe("targetIframe1.contentDocument.webkitPointerLockElement", "targetDiv1");
+ shouldBe("targetIframe1.contentDocument.pointerLockElement", "targetDiv1");
shouldBe("targetDiv1.parentElement.parentElement", "targetIframe1.contentDocument.body");
expectOnlyErrorEvent("Remove targetDiv1's parent from iframe & immediately lock target2. (main document handler)");
expectOnlyChangeEvent("Remove targetDiv1's parent from iframe & immediately lock target2. (iframe handler)", targetIframe1.contentDocument);
targetDiv1.parentElement.parentElement.removeChild(targetDiv1.parentElement);
targetDiv2.requestPointerLock();
- shouldBe("document.webkitPointerLockElement", "null");
+ shouldBe("document.pointerLockElement", "null");
shouldBe("targetDiv1.parentElement.parentElement", "null");
// doNextStep called by event handler.
},
diff --git a/third_party/WebKit/LayoutTests/pointer-lock/mouse-event-delivery-expected.txt b/third_party/WebKit/LayoutTests/pointer-lock/mouse-event-delivery-expected.txt
index be96bcbd..7565e9f 100644
--- a/third_party/WebKit/LayoutTests/pointer-lock/mouse-event-delivery-expected.txt
+++ b/third_party/WebKit/LayoutTests/pointer-lock/mouse-event-delivery-expected.txt
@@ -4,12 +4,12 @@
PASS document.onpointerlockchange event received.
-PASS document.webkitPointerLockElement is targetdiv1
+PASS document.pointerLockElement is targetdiv1
With a lock in place send a click.
PASS event type: mousedown, target: target1, received on: target1
PASS event type: mousedown, target: target1, received on: body
PASS document.onpointerlockchange event received.
-PASS document.webkitPointerLockElement is targetdiv2
+PASS document.pointerLockElement is targetdiv2
With a lock in place send a click.
PASS event type: mousedown, target: target2, received on: target2
PASS event type: mousedown, target: target2, received on: body
diff --git a/third_party/WebKit/LayoutTests/pointer-lock/mouse-event-delivery.html b/third_party/WebKit/LayoutTests/pointer-lock/mouse-event-delivery.html
index 8a92346..f08b805 100644
--- a/third_party/WebKit/LayoutTests/pointer-lock/mouse-event-delivery.html
+++ b/third_party/WebKit/LayoutTests/pointer-lock/mouse-event-delivery.html
@@ -21,7 +21,7 @@
document.onpointerlockchange = function ()
{
testPassed("document.onpointerlockchange event received.");
- shouldBe("document.webkitPointerLockElement", expectedTargetToBeLockedString);
+ shouldBe("document.pointerLockElement", expectedTargetToBeLockedString);
doNextStep();
};
document.onpointerlockerror =
diff --git a/third_party/WebKit/LayoutTests/pointer-lock/pointer-lock-api-expected.txt b/third_party/WebKit/LayoutTests/pointer-lock/pointer-lock-api-expected.txt
index adc15fab..1f5a48ce 100644
--- a/third_party/WebKit/LayoutTests/pointer-lock/pointer-lock-api-expected.txt
+++ b/third_party/WebKit/LayoutTests/pointer-lock/pointer-lock-api-expected.txt
@@ -5,8 +5,8 @@
PASS document.onpointerlockchange is defined.
PASS document.onpointerlockerror is defined.
-PASS document.webkitExitPointerLock is defined.
-PASS document.webkitPointerLockElement is null
+PASS document.exitPointerLock is defined.
+PASS document.pointerLockElement is null
PASS element.requestPointerLock is defined.
PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/pointer-lock/pointer-lock-api.html b/third_party/WebKit/LayoutTests/pointer-lock/pointer-lock-api.html
index ae89d8b..5fc499d 100644
--- a/third_party/WebKit/LayoutTests/pointer-lock/pointer-lock-api.html
+++ b/third_party/WebKit/LayoutTests/pointer-lock/pointer-lock-api.html
@@ -9,8 +9,8 @@
shouldBeDefined("document.onpointerlockchange");
shouldBeDefined("document.onpointerlockerror");
- shouldBeDefined("document.webkitExitPointerLock");
- shouldEvaluateTo("document.webkitPointerLockElement", null);
+ shouldBeDefined("document.exitPointerLock");
+ shouldEvaluateTo("document.pointerLockElement", null);
element = document.createElement('x');
shouldBeDefined("element.requestPointerLock");
</script>
diff --git a/third_party/WebKit/LayoutTests/pointer-lock/pointerlockchange-event-on-lock-lost-expected.txt b/third_party/WebKit/LayoutTests/pointer-lock/pointerlockchange-event-on-lock-lost-expected.txt
index e0d867c4..5c74ded 100644
--- a/third_party/WebKit/LayoutTests/pointer-lock/pointerlockchange-event-on-lock-lost-expected.txt
+++ b/third_party/WebKit/LayoutTests/pointer-lock/pointerlockchange-event-on-lock-lost-expected.txt
@@ -6,10 +6,10 @@
PASS window.testRunner is defined.
Lock targetDiv1.
PASS onpointerlockchange received after: Lock targetDiv1.
-PASS document.webkitPointerLockElement is targetDiv1
+PASS document.pointerLockElement is targetDiv1
Host initiated unlock.
PASS onpointerlockchange received after: Host initiated unlock.
-PASS document.webkitPointerLockElement is null
+PASS document.pointerLockElement is null
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/pointer-lock/pointerlockchange-event-on-lock-lost.html b/third_party/WebKit/LayoutTests/pointer-lock/pointerlockchange-event-on-lock-lost.html
index 8a5702b..f0e372d 100644
--- a/third_party/WebKit/LayoutTests/pointer-lock/pointerlockchange-event-on-lock-lost.html
+++ b/third_party/WebKit/LayoutTests/pointer-lock/pointerlockchange-event-on-lock-lost.html
@@ -22,13 +22,13 @@
// doNextStep called by event handler.
},
function () {
- shouldBe("document.webkitPointerLockElement", "targetDiv1");
+ shouldBe("document.pointerLockElement", "targetDiv1");
expectOnlyChangeEvent("Host initiated unlock.");
testRunner.didLosePointerLock();
// doNextStep called by event handler.
},
function () {
- shouldBe("document.webkitPointerLockElement", "null");
+ shouldBe("document.pointerLockElement", "null");
doNextStep();
},
];
diff --git a/third_party/WebKit/LayoutTests/pointer-lock/pointerlockchange-pointerlockerror-events.html b/third_party/WebKit/LayoutTests/pointer-lock/pointerlockchange-pointerlockerror-events.html
index f270cc3..dc74afd1 100644
--- a/third_party/WebKit/LayoutTests/pointer-lock/pointerlockchange-pointerlockerror-events.html
+++ b/third_party/WebKit/LayoutTests/pointer-lock/pointerlockchange-pointerlockerror-events.html
@@ -31,7 +31,7 @@
todo = [
function () {
expectNoEvents("Unlock.");
- document.webkitExitPointerLock();
+ document.exitPointerLock();
doNextStepWithUserGesture();
},
function () {
@@ -40,7 +40,7 @@
},
function () {
expectOnlyChangeEvent("Unlock again.");
- document.webkitExitPointerLock();
+ document.exitPointerLock();
},
function () {
expectOnlyChangeEvent("Lock targetDiv1 again.");
@@ -56,7 +56,7 @@
},
function () {
expectOnlyChangeEvent("Unlock targetDiv2.");
- document.webkitExitPointerLock();
+ document.exitPointerLock();
},
function () {
targetIframe1.src = "about:blank";
@@ -81,7 +81,7 @@
expectNoEvents("Unlock targetIframe2.");
expectOnlyChangeEvent("Unlock targetIframe2 (handler for iframe1).", targetIframe1.contentDocument);
expectNoEvents("Unlock targetIframe2 (handler for iframe2).", targetIframe2.contentDocument);
- targetIframe1.contentDocument.webkitExitPointerLock();
+ targetIframe1.contentDocument.exitPointerLock();
},
function () {
shouldBeDefined("testRunner.setPointerLockWillFailSynchronously");
diff --git a/third_party/WebKit/LayoutTests/pointer-lock/pointerlockelement-null-when-pending-expected.txt b/third_party/WebKit/LayoutTests/pointer-lock/pointerlockelement-null-when-pending-expected.txt
index 0a82f025..2e615c5 100644
--- a/third_party/WebKit/LayoutTests/pointer-lock/pointerlockelement-null-when-pending-expected.txt
+++ b/third_party/WebKit/LayoutTests/pointer-lock/pointerlockelement-null-when-pending-expected.txt
@@ -3,15 +3,15 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS document.webkitPointerLockElement is null
+PASS document.pointerLockElement is null
Lock.
-PASS document.webkitPointerLockElement is null
+PASS document.pointerLockElement is null
PASS onpointerlockchange received after: Lock.
-PASS document.webkitPointerLockElement is targetDiv1
+PASS document.pointerLockElement is targetDiv1
Unlock.
-PASS document.webkitPointerLockElement is targetDiv1
+PASS document.pointerLockElement is targetDiv1
PASS onpointerlockchange received after: Unlock.
-PASS document.webkitPointerLockElement is null
+PASS document.pointerLockElement is null
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/pointer-lock/pointerlockelement-null-when-pending.html b/third_party/WebKit/LayoutTests/pointer-lock/pointerlockelement-null-when-pending.html
index d82db94..df7e2eb 100644
--- a/third_party/WebKit/LayoutTests/pointer-lock/pointerlockelement-null-when-pending.html
+++ b/third_party/WebKit/LayoutTests/pointer-lock/pointerlockelement-null-when-pending.html
@@ -16,26 +16,26 @@
todo = [
function () {
- shouldBe("document.webkitPointerLockElement", "null");
+ shouldBe("document.pointerLockElement", "null");
testRunner.setPointerLockWillRespondAsynchronously();
expectOnlyChangeEvent("Lock.");
targetDiv1.requestPointerLock();
doNextStep();
},
function () {
- shouldBe("document.webkitPointerLockElement", "null");
+ shouldBe("document.pointerLockElement", "null");
testRunner.didAcquirePointerLock();
// doNextStep called from event handler set with expect...
},
function () {
- shouldBe("document.webkitPointerLockElement", "targetDiv1");
+ shouldBe("document.pointerLockElement", "targetDiv1");
expectOnlyChangeEvent("Unlock.");
- document.webkitExitPointerLock();
- shouldBe("document.webkitPointerLockElement", "targetDiv1");
+ document.exitPointerLock();
+ shouldBe("document.pointerLockElement", "targetDiv1");
// doNextStep called from event handler set with expect...
},
function () {
- shouldBe("document.webkitPointerLockElement", "null");
+ shouldBe("document.pointerLockElement", "null");
doNextStep();
},
];
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index c4dd0bd..b4b03dc 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -5076,7 +5076,7 @@
return toHTMLDialogElement(m_topLayerElements.last().get());
}
-void Document::webkitExitPointerLock()
+void Document::exitPointerLock()
{
if (!page())
return;
@@ -5087,7 +5087,7 @@
page()->pointerLockController().requestPointerUnlock();
}
-Element* Document::webkitPointerLockElement() const
+Element* Document::pointerLockElement() const
{
if (!page() || page()->pointerLockController().lockPending())
return 0;
diff --git a/third_party/WebKit/Source/core/dom/Document.h b/third_party/WebKit/Source/core/dom/Document.h
index 69287d3..ba3991c 100644
--- a/third_party/WebKit/Source/core/dom/Document.h
+++ b/third_party/WebKit/Source/core/dom/Document.h
@@ -944,8 +944,8 @@
bool hasFullscreenElementStack() const { return m_hasFullscreenElementStack; }
void setHasFullscreenElementStack() { m_hasFullscreenElementStack = true; }
- void webkitExitPointerLock();
- Element* webkitPointerLockElement() const;
+ void exitPointerLock();
+ Element* pointerLockElement() const;
// Used to allow element that loads data without going through a FrameLoader to delay the 'load' event.
void incrementLoadEventDelayCount() { ++m_loadEventDelayCount; }
diff --git a/third_party/WebKit/Source/core/dom/Document.idl b/third_party/WebKit/Source/core/dom/Document.idl
index d3245ee..156e633 100644
--- a/third_party/WebKit/Source/core/dom/Document.idl
+++ b/third_party/WebKit/Source/core/dom/Document.idl
@@ -162,8 +162,10 @@
readonly attribute DOMString compatMode;
- [MeasureAs=PrefixedDocumentExitPointerLock] void webkitExitPointerLock();
- [MeasureAs=PrefixedDocumentPointerLockElement] readonly attribute Element webkitPointerLockElement;
+ [MeasureAs=DocumentExitPointerLock] void exitPointerLock();
+ [MeasureAs=DocumentPointerLockElement] readonly attribute Element pointerLockElement;
+ [MeasureAs=PrefixedDocumentExitPointerLock, ImplementedAs=exitPointerLock] void webkitExitPointerLock();
+ [MeasureAs=PrefixedDocumentPointerLockElement, ImplementedAs=pointerLockElement] readonly attribute Element webkitPointerLockElement;
// Event handler attributes
attribute EventHandler onbeforecopy;
diff --git a/third_party/WebKit/Source/core/frame/UseCounter.h b/third_party/WebKit/Source/core/frame/UseCounter.h
index 115fa69..d2994a06 100644
--- a/third_party/WebKit/Source/core/frame/UseCounter.h
+++ b/third_party/WebKit/Source/core/frame/UseCounter.h
@@ -422,6 +422,8 @@
VTTCueRenderRtl = 418,
PostMessageFromSecureToInsecure = 419,
PostMessageFromInsecureToSecure = 420,
+ DocumentExitPointerLock = 421,
+ DocumentPointerLockElement = 422,
// Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots.
// Also, run update_use_counter_feature_enum.py in chromium/src/tools/metrics/histograms/