153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)/*
253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * Copyright (C) 2012 Google Inc. All rights reserved.
353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * Copyright (C) 2013 Apple Inc. All rights reserved.
453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) *
553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * Redistribution and use in source and binary forms, with or without
653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * modification, are permitted provided that the following conditions
753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * are met:
853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) *
953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * 1.  Redistributions of source code must retain the above copyright
1053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) *     notice, this list of conditions and the following disclaimer.
1153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * 2.  Redistributions in binary form must reproduce the above copyright
1253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) *     notice, this list of conditions and the following disclaimer in the
1353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) *     documentation and/or other materials provided with the distribution.
1453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) *
1553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
1653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
1953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) */
2653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
2753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)[
28521d96ec04ace82590870fb04353ec4f82bb150fTorne (Richard Coles)    DoNotCheckConstants
2953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)] interface Internals {
3053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    DOMString address(Node node);
31f5e4ad553afbc08dd2e729bb77e937a9a94d5827Torne (Richard Coles)
32f5e4ad553afbc08dd2e729bb77e937a9a94d5827Torne (Richard Coles)    GCObservation observeGC(any observed);
3353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
3453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] DOMString elementRenderTreeAsText(Element element);
3553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    boolean isPreloaded(DOMString url);
3653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    boolean isLoadingFromMemoryCache(DOMString url);
3753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
3853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    void crash();
3953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
4051b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)    void setStyleResolverStatsEnabled(boolean enabled);
4151b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)    [RaisesException] DOMString styleResolverStatsReport();
4251b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)    [RaisesException] DOMString styleResolverStatsTotalsReport();
4351b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)
4453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] unsigned long numberOfScopedHTMLStyleChildren(Node scope);
4553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] CSSStyleDeclaration computedStyleIncludingVisitedInfo(Node node);
4653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
4753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] ShadowRoot ensureShadowRoot(Element host);
4853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] ShadowRoot shadowRoot(Element host);
4953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] ShadowRoot youngestShadowRoot(Element host);
5053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] ShadowRoot oldestShadowRoot(Element host);
5153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] ShadowRoot youngerShadowRoot(Node root);
5253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] ShadowRoot olderShadowRoot(Node root);
5353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
5453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] DOMString shadowRootType(Node root);
5553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] boolean hasShadowInsertionPoint(Node root);
5653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] boolean hasContentElement(Node root);
5753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] unsigned long countElementShadow(Node Root);
5853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] DOMString shadowPseudoId(Element element);
5953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] void setShadowPseudoId(Element element, DOMString id);
6053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] Element createContentElement();
6153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] boolean isValidContentSelect(Element contentElement);
6253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] Node treeScopeRootNode(Node node);
6353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] Node parentTreeScope(Node node);
6453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] boolean hasSelectorForIdInShadow(Element host, DOMString id);
6553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] boolean hasSelectorForClassInShadow(Element host, DOMString className);
6653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] boolean hasSelectorForAttributeInShadow(Element host, DOMString attributeName);
6753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] boolean hasSelectorForPseudoClassInShadow(Element host, DOMString pseudoClass);
685267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles)    [RaisesException] unsigned short compareTreeScopePosition(Node treeScope1, Node treeScope2);
6951b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)    [RaisesException] unsigned long updateStyleAndReturnAffectedElementCount();
7053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
7181a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles)    // CSS Animation and Transition testing.
7253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    unsigned long numberOfActiveAnimations();
7381a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles)    [RaisesException] void pauseAnimations(double pauseTime);
7453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
7553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] Node nextSiblingByWalker(Node node);
7653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] Node firstChildByWalker(Node node);
7753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] Node lastChildByWalker(Node node);
7853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] Node nextNodeByWalker(Node node);
7953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] Node previousNodeByWalker(Node node);
8053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
8153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    DOMString visiblePlaceholder(Element element);
825267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles)
8353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    void selectColorInColorChooser(Element element, DOMString colorValue);
845267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles)
8551b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)    [RaisesException] DOMString[] formControlStateOfHistoryItem();
8651b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)    [RaisesException] void setFormControlStateOfHistoryItem(sequence<DOMString> values);
8753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] void setEnableMockPagePopup(boolean enabled);
8853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    readonly attribute PagePopupController pagePopupController;
8953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
90591b958dee2cf159d33a0b931e6231072eaf38d5Ben Murdoch    [RaisesException] ClientRect unscaledViewportRect();
91591b958dee2cf159d33a0b931e6231072eaf38d5Ben Murdoch
9253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] ClientRect absoluteCaretBounds();
9353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
9453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] ClientRect boundingBox(Element element);
9553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
9653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] ClientRectList inspectorHighlightRects(Document document);
9753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
9853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] unsigned long markerCountForNode(Node node, DOMString markerType);
99e1f1df5f01594c0e62e751e4b46e779b85c2faa5Torne (Richard Coles)    [RaisesException] unsigned long activeMarkerCountForNode(Node node);
10053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] Range markerRangeForNode(Node node, DOMString markerType, unsigned long index);
10153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] DOMString markerDescriptionForNode(Node node, DOMString markerType, unsigned long index);
10253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    void addTextMatchMarker(Range range, boolean isActive);
103e1f1df5f01594c0e62e751e4b46e779b85c2faa5Torne (Richard Coles)    [RaisesException] void setMarkersActive(Node node, unsigned long startOffset, unsigned long endOffset, boolean active);
10453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
10553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] void setScrollViewPosition(Document document, long x, long y);
10653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
10753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] void setPagination(Document document, DOMString mode, long gap, optional long pageLength);
10853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
109e1f1df5f01594c0e62e751e4b46e779b85c2faa5Torne (Richard Coles)    [RaisesException] DOMString viewportAsText(Document document,
110e1f1df5f01594c0e62e751e4b46e779b85c2faa5Torne (Richard Coles)                                               float devicePixelRatio,
111e1f1df5f01594c0e62e751e4b46e779b85c2faa5Torne (Richard Coles)                                               long availableWidth,
112e1f1df5f01594c0e62e751e4b46e779b85c2faa5Torne (Richard Coles)                                               long availableHeight);
11353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
11453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] boolean wasLastChangeUserEdit(Element textField);
11553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] boolean elementShouldAutoComplete(Element inputElement);
11653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] DOMString suggestedValue(Element inputElement);
11753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] void setSuggestedValue(Element inputElement, DOMString value);
11853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] void setEditingValue(Element inputElement, DOMString value);
11953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] void setAutofilled(Element inputElement, boolean enabled);
12053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
12153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] void paintControlTints(Document document);
12253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
12353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] void scrollElementToRect(Element element, long x, long y, long w, long h);
12453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
12553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] Range rangeFromLocationAndLength(Element scope, long rangeLocation, long rangeLength);
12653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] unsigned long locationFromRange(Element scope, Range range);
12753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] unsigned long lengthFromRange(Element scope, Range range);
12853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] DOMString rangeAsText(Range range);
12953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
130521d96ec04ace82590870fb04353ec4f82bb150fTorne (Richard Coles)    [RaisesException] WebKitPoint touchPositionAdjustedToBestClickableNode(long x, long y, long width, long height, Document document);
13153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] Node touchNodeAdjustedToBestClickableNode(long x, long y, long width, long height, Document document);
132521d96ec04ace82590870fb04353ec4f82bb150fTorne (Richard Coles)    [RaisesException] WebKitPoint touchPositionAdjustedToBestContextMenuNode(long x, long y, long width, long height, Document document);
13353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] Node touchNodeAdjustedToBestContextMenuNode(long x, long y, long width, long height, Document document);
13453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] ClientRect bestZoomableAreaForTouchPoint(long x, long y, long width, long height, Document document);
13553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
13653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] long lastSpellCheckRequestSequence(Document document);
13753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] long lastSpellCheckProcessedSequence(Document document);
13853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
13953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    sequence<DOMString> userPreferredLanguages();
14053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    void setUserPreferredLanguages(sequence<DOMString> languages);
14153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
14253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] unsigned long wheelEventHandlerCount(Document document);
14353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] unsigned long touchEventHandlerCount(Document document);
1447757ec2eadfa2dd8ac2aeed0a4399e9b07ec38cbBen Murdoch    [RaisesException] LayerRectList touchEventTargetLayerRects(Document document);
145e1f1df5f01594c0e62e751e4b46e779b85c2faa5Torne (Richard Coles)
14653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
14753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] NodeList nodesFromRect(Document document, long x, long y,
14853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)        unsigned long topPadding, unsigned long rightPadding, unsigned long bottomPadding, unsigned long leftPadding,
14953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)        boolean ignoreClipping, boolean allowShadowContent, boolean allowChildFrameContent);
15053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
15119cde67944066db31e633d9e386f2aa9bf9fadb3Torne (Richard Coles)    void emitInspectorDidBeginFrame(optional long frameId);
15253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    void emitInspectorDidCancelFrame();
15353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
15453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] boolean hasSpellingMarker(Document document, long from, long length);
15553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] boolean hasGrammarMarker(Document document, long from, long length);
15653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] void setContinuousSpellCheckingEnabled(boolean enabled);
15753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
15853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] boolean isOverwriteModeEnabled(Document document);
15953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] void toggleOverwriteModeEnabled(Document document);
16053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
16153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] unsigned long numberOfScrollableAreas(Document document);
16253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
16353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] boolean isPageBoxVisible(Document document, long pageNumber);
16453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
16553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    readonly attribute InternalSettings settings;
166e69819bd8e388ea4ad1636a19aa6b2eed4952191Ben Murdoch    readonly attribute InternalProfilers profilers;
16781a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles)    readonly attribute InternalRuntimeFlags runtimeFlags;
16853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    readonly attribute unsigned long workerThreadCount;
16953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
17053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    // Flags for layerTreeAsText.
171521d96ec04ace82590870fb04353ec4f82bb150fTorne (Richard Coles)    // The values of these constants must be kept in sync with the values of LayerTreeAsTextBehaviorFlags in GraphicsLayerClient.h.
172521d96ec04ace82590870fb04353ec4f82bb150fTorne (Richard Coles)    const unsigned short LAYER_TREE_INCLUDES_REPAINT_RECTS = 2;
173521d96ec04ace82590870fb04353ec4f82bb150fTorne (Richard Coles)    const unsigned short LAYER_TREE_INCLUDES_PAINTING_PHASES = 4;
174e69819bd8e388ea4ad1636a19aa6b2eed4952191Ben Murdoch    const unsigned short LAYER_TREE_INCLUDES_ROOT_LAYER = 8;
17506f816c7c76bc45a15e452ade8a34e8af077693eTorne (Richard Coles)    const unsigned short LAYER_TREE_INCLUDES_CLIP_AND_SCROLL_PARENTS = 16;
17653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] DOMString layerTreeAsText(Document document, optional unsigned short flags);
177521d96ec04ace82590870fb04353ec4f82bb150fTorne (Richard Coles)    [RaisesException] DOMString elementLayerTreeAsText(Element element, optional unsigned short flags);
17853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
17953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] NodeList paintOrderListBeforePromote(Element element);
18053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] NodeList paintOrderListAfterPromote(Element element);
18153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
182c0e19a689c8ac22cdc96b291a8d33a5d3b0b34a4Torne (Richard Coles)    [RaisesException] boolean scrollsWithRespectTo(Element element1, Element element2);
1839bbd2f5e390b01907d97ecffde80aa1b06113aacTorne (Richard Coles)    [RaisesException] boolean isUnclippedDescendant(Element element);
184bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    [RaisesException] boolean needsCompositedScrolling(Element element);
185c0e19a689c8ac22cdc96b291a8d33a5d3b0b34a4Torne (Richard Coles)
1865267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles)    // The values of these constants must be kept in sync with those in RenderLayer.
187521d96ec04ace82590870fb04353ec4f82bb150fTorne (Richard Coles)    const unsigned short DO_NOT_FORCE_COMPOSITED_SCROLLING = 0;
188521d96ec04ace82590870fb04353ec4f82bb150fTorne (Richard Coles)    const unsigned short COMPOSITED_SCROLLING_ALWAYS_ON = 1;
189521d96ec04ace82590870fb04353ec4f82bb150fTorne (Richard Coles)    const unsigned short COMPOSITED_SCROLLING_ALWAYS_OFF = 2;
1905267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles)    [RaisesException] void setNeedsCompositedScrolling(Element element, unsigned short value);
1915267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles)
19253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] DOMString scrollingStateTreeAsText(Document document);
19353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] DOMString mainThreadScrollingReasons(Document document);
19453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] ClientRectList nonFastScrollableRects(Document document);
19553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
19653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] DOMString repaintRectsAsText(Document document);
197f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles)    [RaisesException] ClientRectList repaintRects(Element element);
19853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
19953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] void garbageCollectDocumentResources(Document document);
200fff8884795cb540f87cf6e6d67b629519b00eb8bBen Murdoch    void evictAllResources();
20153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
20253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    void allowRoundingHacks();
20353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
20453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    unsigned long numberOfLiveNodes();
20553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    unsigned long numberOfLiveDocuments();
206a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles)    DOMString dumpRefCountedInstanceCounts();
20753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    sequence<DOMString> consoleMessageArgumentCounts(Document document);
208521d96ec04ace82590870fb04353ec4f82bb150fTorne (Richard Coles)    Window openDummyInspectorFrontend(DOMString url);
20953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    void closeDummyInspectorFrontend();
210e69819bd8e388ea4ad1636a19aa6b2eed4952191Ben Murdoch    unsigned long[] setMemoryCacheCapacities(unsigned long minDeadBytes, unsigned long maxDeadBytes, unsigned long totalBytes);
21153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] void setInspectorResourcesDataSizeLimits(long maximumResourcesContentSize, long maximumSingleResourceContentSize);
21253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
21353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    DOMString counterValue(Element element);
21453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    long pageNumber(Element element, optional float pageWidth, optional float pageHeight);
21553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    DOMString[] shortcutIconURLs(Document document);
21653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    DOMString[] allIconURLs(Document document);
21753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    long numberOfPages(optional double pageWidthInPixels, optional double pageHeightInPixels);
21853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] DOMString pageProperty(DOMString propertyName, long pageNumber);
21953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] DOMString pageSizeAndMarginsInPixels(long pageIndex, long width, long height, long marginTop, long marginRight, long marginBottom, long marginLeft);
22053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
221e52495584422c5edb5b2944981473a2e208da323Torne (Richard Coles)    [RaisesException] void setDeviceScaleFactor(float scaleFactor);
22253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
22353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] void setIsCursorVisible(Document document, boolean isVisible);
22453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
22553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    void webkitWillEnterFullScreenForElement(Document document, Element element);
22653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    void webkitDidEnterFullScreenForElement(Document document, Element element);
22753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    void webkitWillExitFullScreenForElement(Document document, Element element);
22853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    void webkitDidExitFullScreenForElement(Document document, Element element);
22953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
23053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    void registerURLSchemeAsBypassingContentSecurityPolicy(DOMString scheme);
23153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(DOMString scheme);
23253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
23353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    MallocStatistics mallocStatistics();
23453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    TypeConversions typeConversions();
23553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
23653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    DOMString[] getReferencedFilePaths();
23753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
23853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    // These functions both reset the tracked repaint rects. They are inteded to be used in the following order:
23953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    //  startTrackingRepaints, repaintRectsAsText, stopTrackingRepaints.
24053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] void startTrackingRepaints(Document document);
24153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] void stopTrackingRepaints(Document document);
24253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
24351b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)    // |node| should be Document, HTMLIFrameElement, or unspecified.
24451b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)    // If |node| is an HTMLIFrameElement, it assumes node.contentDocument is
24551b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)    // specified without security checks. Unspecified means this document.
24651b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)    [RaisesException] void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(optional Node node);
24751b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)
2481e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)    // Returns a list of draggable/non-draggable regions in the document.
2491e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)    [RaisesException] ClientRectList draggableRegions(Document document);
2501e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)    [RaisesException] ClientRectList nonDraggableRegions(Document document);
2511e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)
25253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    // Returns a string with information about the mouse cursor used at the specified client location.
25353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] DOMString getCurrentCursorInfo(Document document);
25453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
25553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] DOMString markerTextForListItem(Element element);
25653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
257591b958dee2cf159d33a0b931e6231072eaf38d5Ben Murdoch    [RaisesException] DOMString baseURL(Document document);
258591b958dee2cf159d33a0b931e6231072eaf38d5Ben Murdoch
25953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    SerializedScriptValue deserializeBuffer(ArrayBuffer buffer);
26053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    ArrayBuffer serializeObject(SerializedScriptValue obj);
26153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
26253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    void forceReload(boolean endToEnd);
26353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
26453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    [RaisesException] DOMString getImageSourceURL(Element element);
26553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)
26653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)    boolean isSelectPopupVisible(Node node);
267591b958dee2cf159d33a0b931e6231072eaf38d5Ben Murdoch
268591b958dee2cf159d33a0b931e6231072eaf38d5Ben Murdoch    [RaisesException] ClientRect selectionBounds();
269fff8884795cb540f87cf6e6d67b629519b00eb8bBen Murdoch
270fff8884795cb540f87cf6e6d67b629519b00eb8bBen Murdoch    boolean loseSharedGraphicsContext3D();
27119cde67944066db31e633d9e386f2aa9bf9fadb3Torne (Richard Coles)
27219cde67944066db31e633d9e386f2aa9bf9fadb3Torne (Richard Coles)    [RaisesException] void forceCompositingUpdate(Document document);
273b10519f489455182a6cfdee102d90bec34a43657Ben Murdoch    [RaisesException] boolean isCompositorFramePending(Document document);
274e08f70592b3fc0d5e68b9b914c9196e813720070Torne (Richard Coles)
275e08f70592b3fc0d5e68b9b914c9196e813720070Torne (Richard Coles)    void setZoomFactor(float factor);
27653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)};
277