mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
[DOM] Stop exposing NotifyPaintEvent to web content.
There's no reason this should be available to the web, as it's an indicator of browser internals.
This commit is contained in:
parent
7cc9551e79
commit
b9e7ecd8bc
4 changed files with 21 additions and 9 deletions
|
|
@ -715,8 +715,6 @@ var interfaceNamesInGlobalScope =
|
||||||
"NodeList",
|
"NodeList",
|
||||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
"Notification",
|
"Notification",
|
||||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
|
||||||
"NotifyPaintEvent",
|
|
||||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
{name: "OffscreenCanvas", disabled: true},
|
{name: "OffscreenCanvas", disabled: true},
|
||||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,18 @@
|
||||||
* For more information about this interface see nsIDOMNotifyPaintEvent.idl
|
* For more information about this interface see nsIDOMNotifyPaintEvent.idl
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
[ChromeOnly]
|
||||||
interface NotifyPaintEvent : Event
|
interface NotifyPaintEvent : Event
|
||||||
{
|
{
|
||||||
|
[ChromeOnly]
|
||||||
readonly attribute DOMRectList clientRects;
|
readonly attribute DOMRectList clientRects;
|
||||||
|
|
||||||
|
[ChromeOnly]
|
||||||
readonly attribute DOMRect boundingClientRect;
|
readonly attribute DOMRect boundingClientRect;
|
||||||
|
|
||||||
|
[ChromeOnly]
|
||||||
readonly attribute PaintRequestList paintRequests;
|
readonly attribute PaintRequestList paintRequests;
|
||||||
|
|
||||||
|
[ChromeOnly]
|
||||||
readonly attribute unsigned long long transactionId;
|
readonly attribute unsigned long long transactionId;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -24,15 +24,20 @@ window.addEventListener("load", step0, false);
|
||||||
is(SpecialPowers.getBoolPref("dom.send_after_paint_to_content"), true, "pref defaults to true in mochitest harness");
|
is(SpecialPowers.getBoolPref("dom.send_after_paint_to_content"), true, "pref defaults to true in mochitest harness");
|
||||||
|
|
||||||
function print_rect(rect) {
|
function print_rect(rect) {
|
||||||
|
if (!rect) {
|
||||||
|
rect = { top: 0, left: 0, width: 0, right: 0 };
|
||||||
|
}
|
||||||
return "(top=" + rect.top + ",left=" + rect.left + ",width=" + rect.width + ",height=" + rect.height + ")";
|
return "(top=" + rect.top + ",left=" + rect.left + ",width=" + rect.width + ",height=" + rect.height + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_event(event) {
|
function print_event(event) {
|
||||||
var res = "boundingClientRect=" + print_rect(event.boundingClientRect);
|
var res = "boundingClientRect=" + print_rect(event.boundingClientRect);
|
||||||
var rects = event.clientRects;
|
var rects = event.clientRects;
|
||||||
|
if (rects) {
|
||||||
for (var i = 0; i < rects.length; ++i) {
|
for (var i = 0; i < rects.length; ++i) {
|
||||||
res += " clientRects[" + i + "]=" + print_rect(rects[i]);
|
res += " clientRects[" + i + "]=" + print_rect(rects[i]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,15 @@
|
||||||
function paintListener(event) {
|
function paintListener(event) {
|
||||||
if (event.target != window)
|
if (event.target != window)
|
||||||
return;
|
return;
|
||||||
var eventRect =
|
var clientRect = event.boundingClientRect;
|
||||||
[ event.boundingClientRect.left,
|
var eventRect;
|
||||||
event.boundingClientRect.top,
|
if (clientRect) {
|
||||||
event.boundingClientRect.right,
|
eventRect =
|
||||||
event.boundingClientRect.bottom ];
|
[ clientRect.left, clientRect.top,
|
||||||
|
clientRect.right, clientRect.bottom ];
|
||||||
|
} else {
|
||||||
|
eventRect = [ 0, 0, 0, 0 ];
|
||||||
|
}
|
||||||
if (debug) {
|
if (debug) {
|
||||||
dump("got MozAfterPaint: " + eventRect.join(",") + "\n");
|
dump("got MozAfterPaint: " + eventRect.join(",") + "\n");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue