1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file declares data structures used to communicate data logged by
9 * various components for the purpose of APZ testing (see bug 961289 and
10 * gfx/layers/apz/test/APZTestData.h) to JS test code.
13 // A single key-value pair in the data.
14 dictionary ScrollFrameDataEntry {
19 // All the key-value pairs associated with a given scrollable frame.
20 // The scrollable frame is identified by a scroll id.
21 dictionary ScrollFrameData {
22 unsigned long long scrollId;
23 sequence<ScrollFrameDataEntry> entries;
26 // All the scrollable frames associated with a given paint or repaint request.
27 // The paint or repaint request is identified by a sequence number.
28 dictionary APZBucket {
29 unsigned long sequenceNumber;
30 sequence<ScrollFrameData> scrollFrames;
33 [Pref="apz.test.logging_enabled",
35 namespace APZHitResultFlags {
36 // These constants should be kept in sync with mozilla::gfx::CompositorHitTestInfo
37 const unsigned short INVISIBLE = 0;
38 const unsigned short VISIBLE = 0x0001;
39 const unsigned short IRREGULAR_AREA = 0x0002;
40 const unsigned short APZ_AWARE_LISTENERS = 0x0004;
41 const unsigned short INACTIVE_SCROLLFRAME = 0x0008;
42 const unsigned short PAN_X_DISABLED = 0x0010;
43 const unsigned short PAN_Y_DISABLED = 0x0020;
44 const unsigned short PINCH_ZOOM_DISABLED = 0x0040;
45 const unsigned short DOUBLE_TAP_ZOOM_DISABLED = 0x0080;
46 const unsigned short SCROLLBAR = 0x0100;
47 const unsigned short SCROLLBAR_THUMB = 0x0200;
48 const unsigned short SCROLLBAR_VERTICAL = 0x0400;
49 const unsigned short REQUIRES_TARGET_CONFIRMATION = 0x0800;
52 dictionary APZHitResult {
55 unsigned short hitResult; // combination of the APZHitResultFlags.* flags
56 unsigned long long layersId;
57 unsigned long long scrollId;
60 dictionary APZSampledResult {
63 DOMHighResTimeStamp sampledTimeStamp;
64 unsigned long long layersId;
65 unsigned long long scrollId;
68 dictionary AdditionalDataEntry {
73 // All the paints and repaint requests. This is the top-level data structure.
74 [GenerateConversionToJS]
75 dictionary APZTestData {
76 sequence<APZBucket> paints;
77 sequence<APZBucket> repaintRequests;
78 sequence<APZHitResult> hitResults;
79 sequence<APZSampledResult> sampledResults;
80 sequence<AdditionalDataEntry> additionalData;
83 // A frame uniformity measurement for every scrollable layer
84 dictionary FrameUniformity {
85 unsigned long layerAddress;
86 float frameUniformity;
89 [GenerateConversionToJS]
90 dictionary FrameUniformityResults {
91 sequence<FrameUniformity> layerUniformities;