2
* Copyright (C) 2012 Google Inc. All rights reserved.
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions
8
* 1. Redistributions of source code must retain the above copyright
9
* notice, this list of conditions and the following disclaimer.
10
* 2. Redistributions in binary form must reproduce the above copyright
11
* notice, this list of conditions and the following disclaimer in the
12
* documentation and/or other materials provided with the distribution.
14
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
15
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
18
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
] interface Internals {
29
DOMString address(in Node node);
31
DOMString elementRenderTreeAsText(in Element element) raises(DOMException);
32
boolean isPreloaded(in Document document, in DOMString url);
34
unsigned long numberOfScopedHTMLStyleChildren(in Node scope) raises(DOMException);
36
#if defined(ENABLE_SHADOW_DOM) && ENABLE_SHADOW_DOM
37
ShadowRoot ensureShadowRoot(in Element host) raises (DOMException);
38
ShadowRoot shadowRoot(in Element host) raises (DOMException);
39
ShadowRoot youngestShadowRoot(in Element host) raises (DOMException);
40
ShadowRoot oldestShadowRoot(in Element host) raises (DOMException);
41
ShadowRoot youngerShadowRoot(in Node root) raises (DOMException);
42
ShadowRoot olderShadowRoot(in Node root) raises (DOMException);
44
Node ensureShadowRoot(in Element host) raises (DOMException);
45
Node shadowRoot(in Element host) raises (DOMException);
46
Node youngestShadowRoot(in Element host) raises (DOMException);
47
Node oldestShadowRoot(in Element host) raises (DOMException);
48
Node youngerShadowRoot(in Node root) raises (DOMException);
50
DOMString shadowRootType(in Node root) raises (DOMException);
51
boolean hasShadowInsertionPoint(in Node root) raises (DOMException);
52
boolean hasContentElement(in Node root) raises (DOMException);
53
unsigned long countElementShadow(in Node Root) raises (DOMException);
54
Element includerFor(in Node node) raises (DOMException);
55
DOMString shadowPseudoId(in Element element) raises (DOMException);
56
void setShadowPseudoId(in Element element, in DOMString id) raises (DOMException);
57
Element createContentElement(in Document document) raises(DOMException);
58
Element getElementByIdInShadowRoot(in Node shadowRoot, in DOMString id) raises(DOMException);
59
boolean isValidContentSelect(in Element contentElement) raises(DOMException);
60
Node treeScopeRootNode(in Node node) raises (DOMException);
61
Node parentTreeScope(in Node node) raises (DOMException);
62
boolean hasSelectorForIdInShadow(in Element host, in DOMString id) raises (DOMException);
63
boolean hasSelectorForClassInShadow(in Element host, in DOMString className) raises (DOMException);
64
boolean hasSelectorForAttributeInShadow(in Element host, in DOMString attributeName) raises (DOMException);
65
boolean hasSelectorForPseudoClassInShadow(in Element host, in DOMString pseudoClass) raises (DOMException);
67
Node nextSiblingByWalker(in Node node) raises(DOMException);
68
Node firstChildByWalker(in Node node) raises(DOMException);
69
Node lastChildByWalker(in Node node) raises(DOMException);
70
Node nextNodeByWalker(in Node node) raises(DOMException);
71
Node previousNodeByWalker(in Node node) raises(DOMException);
73
boolean attached(in Node node) raises(DOMException);
75
DOMString visiblePlaceholder(in Element element);
76
#if defined(ENABLE_INPUT_TYPE_COLOR) && ENABLE_INPUT_TYPE_COLOR
77
void selectColorInColorChooser(in Element element, in DOMString colorValue);
79
DOMString[] formControlStateOfPreviousHistoryItem() raises(DOMException);
80
void setFormControlStateOfPreviousHistoryItem(in DOMString[] values) raises(DOMException);
81
void setEnableMockPagePopup(in boolean enabled) raises(DOMException);
82
#if defined(ENABLE_PAGE_POPUP) && ENABLE_PAGE_POPUP
83
readonly attribute PagePopupController pagePopupController;
86
ClientRect absoluteCaretBounds(in Document document) raises(DOMException);
88
ClientRect boundingBox(in Element element) raises(DOMException);
90
ClientRectList inspectorHighlightRects(in Document document) raises (DOMException);
92
void setBackgroundBlurOnNode(in Node node, in long blurLength) raises(DOMException);
94
unsigned long markerCountForNode(in Node node, in DOMString markerType) raises(DOMException);
95
Range markerRangeForNode(in Node node, in DOMString markerType, in unsigned long index) raises(DOMException);
96
DOMString markerDescriptionForNode(in Node node, in DOMString markerType, in unsigned long index) raises(DOMException);
97
void addTextMatchMarker(in Range range, in boolean isActive);
99
void setScrollViewPosition(in Document document, in long x, in long y) raises(DOMException);
101
void setPagination(in Document document, in DOMString mode, in long gap, in [Optional] long pageLength) raises(DOMException);
103
DOMString configurationForViewport(in Document document,
104
in float devicePixelRatio,
106
in long deviceHeight,
107
in long availableWidth,
108
in long availableHeight) raises(DOMException);
110
boolean wasLastChangeUserEdit(in Element textField) raises (DOMException);
111
DOMString suggestedValue(in Element inputElement) raises (DOMException);
112
void setSuggestedValue(in Element inputElement, in DOMString value) raises (DOMException);
113
void setEditingValue(in Element inputElement, in DOMString value) raises (DOMException);
115
void paintControlTints(in Document document) raises (DOMException);
117
void scrollElementToRect(in Element element, in long x, in long y, in long w, in long h) raises (DOMException);
119
Range rangeFromLocationAndLength(in Element scope, in long rangeLocation, in long rangeLength) raises (DOMException);
120
unsigned long locationFromRange(in Element scope, in Range range) raises (DOMException);
121
unsigned long lengthFromRange(in Element scope, in Range range) raises (DOMException);
122
DOMString rangeAsText(in Range range) raises (DOMException);
124
void setDelegatesScrolling(in boolean enabled, in Document document) raises (DOMException);
125
#if defined(ENABLE_TOUCH_ADJUSTMENT) && ENABLE_TOUCH_ADJUSTMENT
126
WebKitPoint touchPositionAdjustedToBestClickableNode(in long x, in long y, in long width, in long height, in Document document) raises (DOMException);
127
Node touchNodeAdjustedToBestClickableNode(in long x, in long y, in long width, in long height, in Document document) raises (DOMException);
128
WebKitPoint touchPositionAdjustedToBestContextMenuNode(in long x, in long y, in long width, in long height, in Document document) raises (DOMException);
129
Node touchNodeAdjustedToBestContextMenuNode(in long x, in long y, in long width, in long height, in Document document) raises (DOMException);
130
ClientRect bestZoomableAreaForTouchPoint(in long x, in long y, in long width, in long height, in Document document) raises (DOMException);
133
long lastSpellCheckRequestSequence(in Document document) raises (DOMException);
134
long lastSpellCheckProcessedSequence(in Document document) raises (DOMException);
136
sequence<String> userPreferredLanguages();
137
void setUserPreferredLanguages(in sequence<String> languages);
139
unsigned long wheelEventHandlerCount(in Document document) raises (DOMException);
140
unsigned long touchEventHandlerCount(in Document document) raises (DOMException);
142
NodeList nodesFromRect(in Document document, in long x, in long y,
143
in unsigned long topPadding, in unsigned long rightPadding, in unsigned long bottomPadding, in unsigned long leftPadding,
144
in boolean ignoreClipping, in boolean allowShadowContent) raises (DOMException);
146
void emitInspectorDidBeginFrame();
147
void emitInspectorDidCancelFrame();
149
boolean hasSpellingMarker(in Document document, in long from, in long length) raises (DOMException);
150
boolean hasGrammarMarker(in Document document, in long from, in long length) raises (DOMException);
151
boolean hasAutocorrectedMarker(in Document document, in long from, in long length) raises (DOMException);
153
unsigned long numberOfScrollableAreas(in Document document) raises (DOMException);
155
boolean isPageBoxVisible(in Document document, in long pageNumber) raises (DOMException);
157
readonly attribute InternalSettings settings;
159
void suspendAnimations(in Document document) raises (DOMException);
160
void resumeAnimations(in Document document) raises (DOMException);
162
// Flags for layerTreeAsText.
163
const unsigned short LAYER_TREE_INCLUDES_VISIBLE_RECTS = 1;
164
const unsigned short LAYER_TREE_INCLUDES_TILE_CACHES = 2;
165
const unsigned short LAYER_TREE_INCLUDES_REPAINT_RECTS = 4;
166
DOMString layerTreeAsText(in Document document, in [Optional] unsigned short flags) raises (DOMException);
168
DOMString scrollingStateTreeAsText(in Document document) raises (DOMException);
170
DOMString repaintRectsAsText(in Document document) raises (DOMException);
172
void garbageCollectDocumentResources(in Document document) raises (DOMException);
174
void allowRoundingHacks();
176
#if defined(ENABLE_BATTERY_STATUS) && ENABLE_BATTERY_STATUS
177
void setBatteryStatus(in Document document, in DOMString eventType, in boolean charging, in double chargingTime, in double dischargingTime, in double level) raises (DOMException);
180
#if defined(ENABLE_NETWORK_INFO) && ENABLE_NETWORK_INFO
181
void setNetworkInformation(in Document document, in DOMString eventType, in double bandwidth, in boolean metered) raises (DOMException);
184
[Conditional=INSPECTOR] unsigned long numberOfLiveNodes();
185
[Conditional=INSPECTOR] unsigned long numberOfLiveDocuments();
186
[Conditional=INSPECTOR] sequence<String> consoleMessageArgumentCounts(in Document document);
187
[Conditional=INSPECTOR] DOMWindow openDummyInspectorFrontend(in DOMString url);
188
[Conditional=INSPECTOR] void closeDummyInspectorFrontend();
189
[Conditional=INSPECTOR] void setInspectorResourcesDataSizeLimits(in long maximumResourcesContentSize, in long maximumSingleResourceContentSize) raises(DOMException);
190
[Conditional=INSPECTOR] void setJavaScriptProfilingEnabled(in boolean creates) raises(DOMException);
192
DOMString counterValue(in Element element);
193
long pageNumber(in Element element, in [Optional] float pageWidth, in [Optional] float pageHeight);
194
DOMString[] iconURLs(in Document document);
195
long numberOfPages(in [Optional] double pageWidthInPixels, in [Optional] double pageHeightInPixels);
196
DOMString pageProperty(in DOMString propertyName, in long pageNumber) raises (DOMException);
197
DOMString pageSizeAndMarginsInPixels(in long pageIndex, in long width, in long height, in long marginTop, in long marginRight, in long marginBottom, in long marginLeft) raises (DOMException);
199
void setPageScaleFactor(in float scaleFactor, in long x, in long y) raises(DOMException);
201
#if defined(ENABLE_FULLSCREEN_API) && ENABLE_FULLSCREEN_API
202
void webkitWillEnterFullScreenForElement(in Document document, in Element element);
203
void webkitDidEnterFullScreenForElement(in Document document, in Element element);
204
void webkitWillExitFullScreenForElement(in Document document, in Element element);
205
void webkitDidExitFullScreenForElement(in Document document, in Element element);
208
void registerURLSchemeAsBypassingContentSecurityPolicy(in DOMString scheme);
209
void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(in DOMString scheme);
211
MallocStatistics mallocStatistics();
213
DOMString[] getReferencedFilePaths();
215
// These functions both reset the tracked repaint rects. They are inteded to be used in the following order:
216
// startTrackingRepaints, repaintRectsAsText, stopTrackingRepaints.
217
void startTrackingRepaints(in Document document) raises (DOMException);
218
void stopTrackingRepaints(in Document document) raises (DOMException);
220
// Returns a string with information about the mouse cursor used at the specified client location.
221
DOMString getCurrentCursorInfo(in Document document) raises (DOMException);
223
SerializedScriptValue deserializeBuffer(in ArrayBuffer buffer);
224
ArrayBuffer serializeObject(in SerializedScriptValue obj);
226
void setUsesOverlayScrollbars(in boolean enabled);