зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1334957 part 1. Mark NotifyPaintEvent and all its members as chromeonly. r=smaug
This commit is contained in:
Родитель
65f3d3c7f2
Коммит
52e939e98d
|
@ -722,8 +722,6 @@ var interfaceNamesInGlobalScope =
|
|||
"NodeList",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"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!
|
||||
{name: "OffscreenCanvas", disabled: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
|
|
|
@ -6,15 +6,21 @@
|
|||
* For more information about this interface see nsIDOMNotifyPaintEvent.idl
|
||||
*/
|
||||
|
||||
[ChromeOnly]
|
||||
interface NotifyPaintEvent : Event
|
||||
{
|
||||
[ChromeOnly]
|
||||
readonly attribute DOMRectList clientRects;
|
||||
|
||||
[ChromeOnly]
|
||||
readonly attribute DOMRect boundingClientRect;
|
||||
|
||||
[ChromeOnly]
|
||||
readonly attribute PaintRequestList paintRequests;
|
||||
|
||||
[ChromeOnly]
|
||||
readonly attribute unsigned long long transactionId;
|
||||
|
||||
[ChromeOnly]
|
||||
readonly attribute DOMHighResTimeStamp paintTimeStamp;
|
||||
};
|
||||
|
|
|
@ -24,14 +24,19 @@ window.addEventListener("load", step0);
|
|||
is(SpecialPowers.getBoolPref("dom.send_after_paint_to_content"), true, "pref defaults to true in mochitest harness");
|
||||
|
||||
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 + ")";
|
||||
}
|
||||
|
||||
function print_event(event) {
|
||||
var res = "boundingClientRect=" + print_rect(event.boundingClientRect);
|
||||
var rects = event.clientRects;
|
||||
for (var i = 0; i < rects.length; ++i) {
|
||||
res += " clientRects[" + i + "]=" + print_rect(rects[i]);
|
||||
if (rects) {
|
||||
for (var i = 0; i < rects.length; ++i) {
|
||||
res += " clientRects[" + i + "]=" + print_rect(rects[i]);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -10,11 +10,15 @@
|
|||
function paintListener(event) {
|
||||
if (event.target != window)
|
||||
return;
|
||||
var eventRect =
|
||||
[ event.boundingClientRect.left,
|
||||
event.boundingClientRect.top,
|
||||
event.boundingClientRect.right,
|
||||
event.boundingClientRect.bottom ];
|
||||
var clientRect = event.boundingClientRect;
|
||||
var eventRect;
|
||||
if (clientRect) {
|
||||
eventRect =
|
||||
[ clientRect.left, clientRect.top,
|
||||
clientRect.right, clientRect.bottom ];
|
||||
} else {
|
||||
eventRect = [ 0, 0, 0, 0 ];
|
||||
}
|
||||
if (debug) {
|
||||
dump("got MozAfterPaint: " + eventRect.join(",") + "\n");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче