| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| 11 * 2. Redistributions in binary form must reproduce the above copyright | 11 * 2. Redistributions in binary form must reproduce the above copyright |
| 12 * notice, this list of conditions and the following disclaimer in the | 12 * notice, this list of conditions and the following disclaimer in the |
| 13 * documentation and/or other materials provided with the distribution. | 13 * documentation and/or other materials provided with the distribution. |
| 14 * | 14 * |
| 15 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY | 15 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
| 16 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 16 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 18 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY | 18 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
| 19 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 19 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 20 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 20 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 21 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 21 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 22 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 [ | 27 [ |
| 28 DoNotCheckConstants, | 28 DoNotCheckConstants, |
| 29 GarbageCollected, | 29 GarbageCollected, |
| 30 TypeChecking=Interface, | |
| 31 ConstructorCallWith=ScriptState, | 30 ConstructorCallWith=ScriptState, |
| 32 ] interface Internals { | 31 ] interface Internals { |
| 33 DOMString address(Node node); | 32 DOMString address(Node node); |
| 34 | 33 |
| 35 GCObservation observeGC(any observed); | 34 GCObservation observeGC(any observed); |
| 36 | 35 |
| 37 [RaisesException, TypeChecking=Interface] DOMString elementLayoutTreeAsText(
Element element); | 36 [RaisesException] DOMString elementLayoutTreeAsText(Element element); |
| 38 boolean isPreloaded(DOMString url); | 37 boolean isPreloaded(DOMString url); |
| 39 boolean isPreloadedBy(DOMString url, Document document); | 38 boolean isPreloadedBy(DOMString url, Document document); |
| 40 boolean isLoadingFromMemoryCache(DOMString url); | 39 boolean isLoadingFromMemoryCache(DOMString url); |
| 41 | 40 |
| 42 [TypeChecking=Interface] boolean isSharingStyle(Element element1, Element el
ement2); | 41 boolean isSharingStyle(Element element1, Element element2); |
| 43 | 42 |
| 44 [TypeChecking=Interface] CSSStyleDeclaration computedStyleIncludingVisitedIn
fo(Node node); | 43 CSSStyleDeclaration computedStyleIncludingVisitedInfo(Node node); |
| 45 | 44 |
| 46 [TypeChecking=Interface] ShadowRoot createUserAgentShadowRoot(Element host); | 45 ShadowRoot createUserAgentShadowRoot(Element host); |
| 47 | 46 |
| 48 [TypeChecking=Interface] ShadowRoot shadowRoot(Element host); | 47 ShadowRoot shadowRoot(Element host); |
| 49 [TypeChecking=Interface] ShadowRoot youngestShadowRoot(Element host); | 48 ShadowRoot youngestShadowRoot(Element host); |
| 50 [TypeChecking=Interface] ShadowRoot oldestShadowRoot(Element host); | 49 ShadowRoot oldestShadowRoot(Element host); |
| 51 [RaisesException, TypeChecking=Interface] ShadowRoot youngerShadowRoot(Node
root); | 50 [RaisesException] ShadowRoot youngerShadowRoot(Node root); |
| 52 | 51 |
| 53 [RaisesException, TypeChecking=Interface] DOMString shadowRootType(Node root
); | 52 [RaisesException] DOMString shadowRootType(Node root); |
| 54 [RaisesException] boolean hasShadowInsertionPoint(Node root); | 53 [RaisesException] boolean hasShadowInsertionPoint(Node root); |
| 55 [RaisesException] boolean hasContentElement(Node root); | 54 [RaisesException] boolean hasContentElement(Node root); |
| 56 [RaisesException, TypeChecking=Interface] unsigned long countElementShadow(N
ode Root); | 55 [RaisesException] unsigned long countElementShadow(Node Root); |
| 57 [TypeChecking=Interface] DOMString shadowPseudoId(Element element); | 56 DOMString shadowPseudoId(Element element); |
| 58 [RaisesException, TypeChecking=Interface] boolean isValidContentSelect(Eleme
nt contentElement); | 57 [RaisesException] boolean isValidContentSelect(Element contentElement); |
| 59 [TypeChecking=Interface] Node treeScopeRootNode(Node node); | 58 Node treeScopeRootNode(Node node); |
| 60 [TypeChecking=Interface] Node parentTreeScope(Node node); | 59 Node parentTreeScope(Node node); |
| 61 [RaisesException, TypeChecking=Interface] boolean hasSelectorForIdInShadow(E
lement host, DOMString id); | 60 [RaisesException] boolean hasSelectorForIdInShadow(Element host, DOMString i
d); |
| 62 [RaisesException, TypeChecking=Interface] boolean hasSelectorForClassInShado
w(Element host, DOMString className); | 61 [RaisesException] boolean hasSelectorForClassInShadow(Element host, DOMStrin
g className); |
| 63 [RaisesException, TypeChecking=Interface] boolean hasSelectorForAttributeInS
hadow(Element host, DOMString attributeName); | 62 [RaisesException] boolean hasSelectorForAttributeInShadow(Element host, DOMS
tring attributeName); |
| 64 [RaisesException, TypeChecking=Interface] unsigned short compareTreeScopePos
ition(Node treeScope1, Node treeScope2); | 63 [RaisesException] unsigned short compareTreeScopePosition(Node treeScope1, N
ode treeScope2); |
| 65 [RaisesException] unsigned long updateStyleAndReturnAffectedElementCount(); | 64 [RaisesException] unsigned long updateStyleAndReturnAffectedElementCount(); |
| 66 [RaisesException] unsigned long needsLayoutCount(); | 65 [RaisesException] unsigned long needsLayoutCount(); |
| 67 [RaisesException] unsigned long hitTestCount(Document document); | 66 [RaisesException] unsigned long hitTestCount(Document document); |
| 68 [RaisesException] unsigned long hitTestCacheHits(Document document); | 67 [RaisesException] unsigned long hitTestCacheHits(Document document); |
| 69 [RaisesException] Element? elementFromPoint(Document document, double x, dou
ble y, boolean ignoreClipping, boolean allowChildFrameContent); | 68 [RaisesException] Element? elementFromPoint(Document document, double x, dou
ble y, boolean ignoreClipping, boolean allowChildFrameContent); |
| 70 [RaisesException] void clearHitTestCache(Document document); | 69 [RaisesException] void clearHitTestCache(Document document); |
| 71 | 70 |
| 72 // Animation testing. | 71 // Animation testing. |
| 73 [RaisesException] void pauseAnimations(double pauseTime); | 72 [RaisesException] void pauseAnimations(double pauseTime); |
| 74 bool isCompositedAnimation(Animation animation); | 73 bool isCompositedAnimation(Animation animation); |
| 74 void disableCompositedAnimation(Animation animation); |
| 75 void disableCSSAdditiveAnimations(); |
| 75 | 76 |
| 76 // Modifies m_desiredFrameStartTime in BitmapImage to advance the next frame
time | 77 // Modifies m_desiredFrameStartTime in BitmapImage to advance the next frame
time |
| 77 // for testing whether animated images work properly. | 78 // for testing whether animated images work properly. |
| 78 [RaisesException] void advanceTimeForImage(Element image, double deltaTimeIn
Seconds); | 79 [RaisesException] void advanceTimeForImage(Element image, double deltaTimeIn
Seconds); |
| 79 | 80 |
| 80 [RaisesException, TypeChecking=Interface] Node nextSiblingInComposedTree(Nod
e node); | 81 // Advances an animated image. For BitmapImage (e.g., animated gifs) this |
| 81 [RaisesException, TypeChecking=Interface] Node firstChildInComposedTree(Node
node); | 82 // will advance to the next frame. For SVGImage, this will trigger an |
| 82 [RaisesException, TypeChecking=Interface] Node lastChildInComposedTree(Node
node); | 83 // animation update for CSS and advance the SMIL timeline by one frame. |
| 83 [RaisesException, TypeChecking=Interface] Node nextInComposedTree(Node node)
; | 84 [RaisesException] void advanceImageAnimation(Element image); |
| 84 [RaisesException, TypeChecking=Interface] Node previousInComposedTree(Node n
ode); | 85 |
| 86 [RaisesException] Node nextSiblingInFlatTree(Node node); |
| 87 [RaisesException] Node firstChildInFlatTree(Node node); |
| 88 [RaisesException] Node lastChildInFlatTree(Node node); |
| 89 [RaisesException] Node nextInFlatTree(Node node); |
| 90 [RaisesException] Node previousInFlatTree(Node node); |
| 85 | 91 |
| 86 DOMString visiblePlaceholder(Element element); | 92 DOMString visiblePlaceholder(Element element); |
| 87 | 93 |
| 88 [TypeChecking=Interface] void selectColorInColorChooser(Element element, DOM
String colorValue); | 94 void selectColorInColorChooser(Element element, DOMString colorValue); |
| 89 [TypeChecking=Interface] void endColorChooser(Element element); | 95 void endColorChooser(Element element); |
| 90 | 96 |
| 91 // If the argument is omitted, the top-level document is used. | 97 // If the argument is omitted, the top-level document is used. |
| 92 boolean hasAutofocusRequest(optional Document document); | 98 boolean hasAutofocusRequest(optional Document document); |
| 93 [RaisesException] DOMString[] formControlStateOfHistoryItem(); | 99 [RaisesException] DOMString[] formControlStateOfHistoryItem(); |
| 94 [RaisesException] void setFormControlStateOfHistoryItem(sequence<DOMString>
values); | 100 [RaisesException] void setFormControlStateOfHistoryItem(sequence<DOMString>
values); |
| 95 readonly attribute Window pagePopupWindow; | 101 readonly attribute Window pagePopupWindow; |
| 96 | 102 |
| 97 [RaisesException] ClientRect absoluteCaretBounds(); | 103 [RaisesException] ClientRect absoluteCaretBounds(); |
| 98 | 104 |
| 99 [TypeChecking=Interface] ClientRect boundingBox(Element element); | 105 ClientRect boundingBox(Element element); |
| 100 | 106 |
| 101 [RaisesException, TypeChecking=Interface] unsigned long markerCountForNode(N
ode node, DOMString markerType); | 107 [RaisesException] unsigned long markerCountForNode(Node node, DOMString mark
erType); |
| 102 [TypeChecking=Interface] unsigned long activeMarkerCountForNode(Node node); | 108 unsigned long activeMarkerCountForNode(Node node); |
| 103 [RaisesException, TypeChecking=Interface] Range markerRangeForNode(Node node
, DOMString markerType, unsigned long index); | 109 [RaisesException] Range markerRangeForNode(Node node, DOMString markerType,
unsigned long index); |
| 104 [RaisesException, TypeChecking=Interface] DOMString markerDescriptionForNode
(Node node, DOMString markerType, unsigned long index); | 110 [RaisesException] DOMString markerDescriptionForNode(Node node, DOMString ma
rkerType, unsigned long index); |
| 105 [TypeChecking=Interface] void addTextMatchMarker(Range range, boolean isActi
ve); | 111 void addTextMatchMarker(Range range, boolean isActive); |
| 106 [TypeChecking=Interface] void setMarkersActive(Node node, unsigned long star
tOffset, unsigned long endOffset, boolean active); | 112 void setMarkersActive(Node node, unsigned long startOffset, unsigned long en
dOffset, boolean active); |
| 107 void setMarkedTextMatchesAreHighlighted(Document document, boolean highlight
); | 113 void setMarkedTextMatchesAreHighlighted(Document document, boolean highlight
); |
| 108 | 114 |
| 109 [RaisesException, TypeChecking=Interface] void setFrameViewPosition(Document
document, long x, long y); | 115 [RaisesException] void setFrameViewPosition(Document document, long x, long
y); |
| 110 | 116 |
| 111 [RaisesException, TypeChecking=Interface] DOMString viewportAsText(Document
document, | 117 [RaisesException] DOMString viewportAsText(Document document, |
| 112 float dev
icePixelRatio, | 118 float devicePixelRatio, |
| 113 long avai
lableWidth, | 119 long availableWidth, |
| 114 long avai
lableHeight); | 120 long availableHeight); |
| 115 | 121 |
| 116 [RaisesException, TypeChecking=Interface] boolean wasLastChangeUserEdit(Elem
ent textField); | 122 [RaisesException] boolean elementShouldAutoComplete(Element inputElement); |
| 117 [RaisesException, TypeChecking=Interface] boolean elementShouldAutoComplete(
Element inputElement); | 123 [RaisesException] DOMString suggestedValue(Element inputElement); |
| 118 [RaisesException, TypeChecking=Interface] DOMString suggestedValue(Element i
nputElement); | 124 [RaisesException] void setSuggestedValue(Element inputElement, DOMString val
ue); |
| 119 [RaisesException, TypeChecking=Interface] void setSuggestedValue(Element inp
utElement, DOMString value); | 125 [RaisesException] void setEditingValue(Element inputElement, DOMString value
); |
| 120 [RaisesException, TypeChecking=Interface] void setEditingValue(Element input
Element, DOMString value); | 126 [RaisesException] void setAutofilled(Element inputElement, boolean enabled); |
| 121 [RaisesException, TypeChecking=Interface] void setAutofilled(Element inputEl
ement, boolean enabled); | |
| 122 | 127 |
| 123 [RaisesException, TypeChecking=Interface] void scrollElementToRect(Element e
lement, long x, long y, long w, long h); | 128 Range rangeFromLocationAndLength(Element scope, long rangeLocation, long ran
geLength); |
| 129 unsigned long locationFromRange(Element scope, Range range); |
| 130 unsigned long lengthFromRange(Element scope, Range range); |
| 131 DOMString rangeAsText(Range range); |
| 124 | 132 |
| 125 [TypeChecking=Interface] Range rangeFromLocationAndLength(Element scope, lon
g rangeLocation, long rangeLength); | 133 [RaisesException] DOMPoint touchPositionAdjustedToBestClickableNode(long x,
long y, long width, long height, Document document); |
| 126 [TypeChecking=Interface] unsigned long locationFromRange(Element scope, Rang
e range); | 134 [RaisesException] Node touchNodeAdjustedToBestClickableNode(long x, long y,
long width, long height, Document document); |
| 127 [TypeChecking=Interface] unsigned long lengthFromRange(Element scope, Range
range); | 135 [RaisesException] DOMPoint touchPositionAdjustedToBestContextMenuNode(long x
, long y, long width, long height, Document document); |
| 128 [TypeChecking=Interface] DOMString rangeAsText(Range range); | 136 [RaisesException] Node touchNodeAdjustedToBestContextMenuNode(long x, long y
, long width, long height, Document document); |
| 129 | 137 [RaisesException] ClientRect bestZoomableAreaForTouchPoint(long x, long y, l
ong width, long height, Document document); |
| 130 [RaisesException, TypeChecking=Interface] DOMPoint touchPositionAdjustedToBe
stClickableNode(long x, long y, long width, long height, Document document); | |
| 131 [RaisesException, TypeChecking=Interface] Node touchNodeAdjustedToBestClicka
bleNode(long x, long y, long width, long height, Document document); | |
| 132 [RaisesException, TypeChecking=Interface] DOMPoint touchPositionAdjustedToBe
stContextMenuNode(long x, long y, long width, long height, Document document); | |
| 133 [RaisesException, TypeChecking=Interface] Node touchNodeAdjustedToBestContex
tMenuNode(long x, long y, long width, long height, Document document); | |
| 134 [RaisesException, TypeChecking=Interface] ClientRect bestZoomableAreaForTouc
hPoint(long x, long y, long width, long height, Document document); | |
| 135 | 138 |
| 136 [RaisesException] long lastSpellCheckRequestSequence(Document document); | 139 [RaisesException] long lastSpellCheckRequestSequence(Document document); |
| 137 [RaisesException] long lastSpellCheckProcessedSequence(Document document); | 140 [RaisesException] long lastSpellCheckProcessedSequence(Document document); |
| 138 | 141 |
| 139 sequence<DOMString> userPreferredLanguages(); | 142 sequence<DOMString> userPreferredLanguages(); |
| 140 void setUserPreferredLanguages(sequence<DOMString> languages); | 143 void setUserPreferredLanguages(sequence<DOMString> languages); |
| 141 | 144 |
| 142 [TypeChecking=Interface] unsigned long activeDOMObjectCount(Document documen
t); | 145 unsigned long activeDOMObjectCount(Document document); |
| 143 [TypeChecking=Interface] unsigned long wheelEventHandlerCount(Document docum
ent); | 146 unsigned long wheelEventHandlerCount(Document document); |
| 144 [TypeChecking=Interface] unsigned long scrollEventHandlerCount(Document docu
ment); | 147 unsigned long scrollEventHandlerCount(Document document); |
| 145 [TypeChecking=Interface] unsigned long touchEventHandlerCount(Document docum
ent); | 148 unsigned long touchEventHandlerCount(Document document); |
| 146 [RaisesException, TypeChecking=Interface] LayerRectList touchEventTargetLaye
rRects(Document document); | 149 [RaisesException] LayerRectList touchEventTargetLayerRects(Document document
); |
| 147 | 150 |
| 148 [RaisesException, TypeChecking=Interface] boolean executeCommand(Document do
cument, DOMString name, DOMString value); | 151 [RaisesException] boolean executeCommand(Document document, DOMString name,
DOMString value); |
| 149 | 152 |
| 150 DOMString htmlNamespace(); | 153 DOMString htmlNamespace(); |
| 151 sequence<DOMString> htmlTags(); | 154 sequence<DOMString> htmlTags(); |
| 152 DOMString svgNamespace(); | 155 DOMString svgNamespace(); |
| 153 sequence<DOMString> svgTags(); | 156 sequence<DOMString> svgTags(); |
| 154 | 157 |
| 155 [RaisesException, TypeChecking=Interface] NodeList nodesFromRect(Document do
cument, long x, long y, | 158 [RaisesException] NodeList nodesFromRect(Document document, long x, long y, |
| 156 unsigned long topPadding, unsigned long rightPadding, unsigned long bott
omPadding, unsigned long leftPadding, | 159 unsigned long topPadding, unsigned long rightPadding, unsigned long bott
omPadding, unsigned long leftPadding, |
| 157 boolean ignoreClipping, boolean allowChildFrameContent); | 160 boolean ignoreClipping, boolean allowChildFrameContent); |
| 158 | 161 |
| 159 [TypeChecking=Interface] boolean hasSpellingMarker(Document document, long f
rom, long length); | 162 boolean hasSpellingMarker(Document document, long from, long length); |
| 160 [TypeChecking=Interface] boolean hasGrammarMarker(Document document, long fr
om, long length); | 163 boolean hasGrammarMarker(Document document, long from, long length); |
| 161 void setContinuousSpellCheckingEnabled(boolean enabled); | 164 void setContinuousSpellCheckingEnabled(boolean enabled); |
| 162 | 165 |
| 163 [TypeChecking=Interface] boolean isOverwriteModeEnabled(Document document); | 166 boolean isOverwriteModeEnabled(Document document); |
| 164 [TypeChecking=Interface] void toggleOverwriteModeEnabled(Document document); | 167 void toggleOverwriteModeEnabled(Document document); |
| 165 | 168 |
| 166 [TypeChecking=Interface] unsigned long numberOfScrollableAreas(Document docu
ment); | 169 unsigned long numberOfScrollableAreas(Document document); |
| 167 | 170 |
| 168 [TypeChecking=Interface] boolean isPageBoxVisible(Document document, long pa
geNumber); | 171 boolean isPageBoxVisible(Document document, long pageNumber); |
| 169 | 172 |
| 170 readonly attribute InternalSettings settings; | 173 readonly attribute InternalSettings settings; |
| 171 readonly attribute InternalRuntimeFlags runtimeFlags; | 174 readonly attribute InternalRuntimeFlags runtimeFlags; |
| 172 readonly attribute unsigned long workerThreadCount; | 175 readonly attribute unsigned long workerThreadCount; |
| 173 | 176 |
| 174 // Flags for layerTreeAsText. | 177 // Flags for layerTreeAsText. |
| 175 // The values of these constants must be kept in sync with the values of Lay
erTreeAsTextBehaviorFlags in GraphicsLayerClient.h. | 178 // The values of these constants must be kept in sync with the values of Lay
erTreeFlags in GraphicsLayerClient.h. |
| 179 const unsigned short LAYER_TREE_INCLUDES_DEBUG_INFO = 1; |
| 176 const unsigned short LAYER_TREE_INCLUDES_REPAINT_RECTS = 2; | 180 const unsigned short LAYER_TREE_INCLUDES_REPAINT_RECTS = 2; |
| 177 const unsigned short LAYER_TREE_INCLUDES_PAINTING_PHASES = 4; | 181 const unsigned short LAYER_TREE_INCLUDES_PAINTING_PHASES = 4; |
| 178 const unsigned short LAYER_TREE_INCLUDES_ROOT_LAYER = 8; | 182 const unsigned short LAYER_TREE_INCLUDES_ROOT_LAYER = 8; |
| 179 const unsigned short LAYER_TREE_INCLUDES_CLIP_AND_SCROLL_PARENTS = 16; | 183 const unsigned short LAYER_TREE_INCLUDES_CLIP_AND_SCROLL_PARENTS = 16; |
| 180 const unsigned short LAYER_TREE_INCLUDES_SCROLL_BLOCKS_ON = 32; | 184 const unsigned short LAYER_TREE_INCLUDES_PAINT_INVALIDATION_OBJECTS = 32; |
| 181 const unsigned short LAYER_TREE_INCLUDES_PAINT_INVALIDATION_OBJECTS = 64; | 185 const unsigned short LAYER_TREE_INCLUDES_COMPOSITING_REASONS = 64; |
| 182 const unsigned short LAYER_TREE_INCLUDES_COMPOSITING_REASONS = 128; | 186 [RaisesException] DOMString layerTreeAsText(Document document, optional unsi
gned short flags); |
| 183 [RaisesException, TypeChecking=Interface] DOMString layerTreeAsText(Document
document, optional unsigned short flags); | 187 [RaisesException] DOMString elementLayerTreeAsText(Element element, optional
unsigned short flags); |
| 184 [RaisesException, TypeChecking=Interface] DOMString elementLayerTreeAsText(E
lement element, optional unsigned short flags); | |
| 185 | 188 |
| 186 [RaisesException, TypeChecking=Interface] boolean scrollsWithRespectTo(Eleme
nt element1, Element element2); | 189 [RaisesException] boolean scrollsWithRespectTo(Element element1, Element ele
ment2); |
| 187 | 190 |
| 188 [TypeChecking=Interface] DOMString scrollingStateTreeAsText(Document documen
t); | 191 DOMString scrollingStateTreeAsText(Document document); |
| 189 [RaisesException, TypeChecking=Interface] DOMString mainThreadScrollingReaso
ns(Document document); | 192 [RaisesException] DOMString mainThreadScrollingReasons(Document document); |
| 190 [RaisesException, TypeChecking=Interface] ClientRectList nonFastScrollableRe
cts(Document document); | 193 [RaisesException] ClientRectList nonFastScrollableRects(Document document); |
| 191 | 194 |
| 192 [TypeChecking=Interface] void garbageCollectDocumentResources(Document docum
ent); | |
| 193 void evictAllResources(); | 195 void evictAllResources(); |
| 194 | 196 |
| 195 unsigned long numberOfLiveNodes(); | 197 unsigned long numberOfLiveNodes(); |
| 196 unsigned long numberOfLiveDocuments(); | 198 unsigned long numberOfLiveDocuments(); |
| 197 DOMString dumpRefCountedInstanceCounts(); | 199 DOMString dumpRefCountedInstanceCounts(); |
| 198 sequence<DOMString> consoleMessageArgumentCounts(Document document); | 200 sequence<DOMString> consoleMessageArgumentCounts(Document document); |
| 199 unsigned long[] setMemoryCacheCapacities(unsigned long minDeadBytes, unsigne
d long maxDeadBytes, unsigned long totalBytes); | 201 unsigned long[] setMemoryCacheCapacities(unsigned long minDeadBytes, unsigne
d long maxDeadBytes, unsigned long totalBytes); |
| 200 | 202 |
| 201 DOMString counterValue(Element element); | 203 DOMString counterValue(Element element); |
| 202 long pageNumber(Element element, optional float pageWidth, optional float pa
geHeight); | 204 [RaisesException] long pageNumber(Element element, optional float pageWidth
= 800, optional float pageHeight = 600); |
| 203 DOMString[] shortcutIconURLs(Document document); | 205 DOMString[] shortcutIconURLs(Document document); |
| 204 DOMString[] allIconURLs(Document document); | 206 DOMString[] allIconURLs(Document document); |
| 205 long numberOfPages(optional double pageWidthInPixels, optional double pageHe
ightInPixels); | 207 [RaisesException] long numberOfPages(optional double pageWidthInPixels = 800
, optional double pageHeightInPixels = 600); |
| 206 [RaisesException] DOMString pageProperty(DOMString propertyName, long pageNu
mber); | 208 [RaisesException] DOMString pageProperty(DOMString propertyName, long pageNu
mber); |
| 207 [RaisesException] DOMString pageSizeAndMarginsInPixels(long pageIndex, long
width, long height, long marginTop, long marginRight, long marginBottom, long ma
rginLeft); | 209 [RaisesException] DOMString pageSizeAndMarginsInPixels(long pageIndex, long
width, long height, long marginTop, long marginRight, long marginBottom, long ma
rginLeft); |
| 208 | 210 |
| 209 [RaisesException] void setDeviceScaleFactor(float scaleFactor); | |
| 210 [RaisesException] void setPageScaleFactor(float scaleFactor); | 211 [RaisesException] void setPageScaleFactor(float scaleFactor); |
| 211 [RaisesException] void setPageScaleFactorLimits(float minScaleFactor, float
maxScaleFactor); | 212 [RaisesException] void setPageScaleFactorLimits(float minScaleFactor, float
maxScaleFactor); |
| 212 | 213 |
| 213 [RaisesException, TypeChecking=Interface] void setIsCursorVisible(Document d
ocument, boolean isVisible); | 214 [RaisesException] void setIsCursorVisible(Document document, boolean isVisib
le); |
| 214 | 215 |
| 215 [TypeChecking=Interface] double effectiveMediaVolume(HTMLMediaElement mediaE
lement); | 216 double effectiveMediaVolume(HTMLMediaElement mediaElement); |
| 216 [TypeChecking=Interface] void mediaPlayerRemoteRouteAvailabilityChanged(HTML
MediaElement mediaElement, boolean available); | 217 void mediaPlayerRemoteRouteAvailabilityChanged(HTMLMediaElement mediaElement
, boolean available); |
| 217 [TypeChecking=Interface] void mediaPlayerPlayingRemotelyChanged(HTMLMediaEle
ment mediaElement, boolean remote); | 218 void mediaPlayerPlayingRemotelyChanged(HTMLMediaElement mediaElement, boolea
n remote); |
| 219 void setAllowHiddenVolumeControls(HTMLMediaElement mediaElement, boolean all
ow); |
| 218 | 220 |
| 219 void registerURLSchemeAsBypassingContentSecurityPolicy(DOMString scheme); | 221 void registerURLSchemeAsBypassingContentSecurityPolicy(DOMString scheme); |
| 220 void registerURLSchemeAsBypassingContentSecurityPolicy(DOMString scheme, seq
uence<DOMString> policyAreas); | 222 void registerURLSchemeAsBypassingContentSecurityPolicy(DOMString scheme, seq
uence<DOMString> policyAreas); |
| 221 void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(DOMString sch
eme); | 223 void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(DOMString sch
eme); |
| 222 | 224 |
| 223 TypeConversions typeConversions(); | 225 TypeConversions typeConversions(); |
| 224 | 226 |
| 225 // This is enabled only in Debug builds. | 227 // This is enabled only in Debug builds. |
| 226 // This is because we want to avoid putting the byte stream of testing priva
te scripts | 228 // This is because we want to avoid putting the byte stream of testing priva
te scripts |
| 227 // into the binary of Release builds. | 229 // into the binary of Release builds. |
| 228 PrivateScriptTest privateScriptTest(); | 230 PrivateScriptTest privateScriptTest(); |
| 229 | 231 |
| 230 DOMString[] getReferencedFilePaths(); | 232 DOMString[] getReferencedFilePaths(); |
| 231 | 233 |
| 232 // These functions both reset the tracked repaint rects. They are inteded to
be used in the following order: | 234 // These functions both reset the tracked repaint rects. They are intended t
o be used in the following order: |
| 233 // startTrackingRepaints, repaintRectsAsText, stopTrackingRepaints. | 235 // startTrackingRepaints(), repaintRectsAsText(), stopTrackingRepaints(). |
| 234 [RaisesException, TypeChecking=Interface] void startTrackingRepaints(Documen
t document); | 236 // TODO(wangxianzhu): Remove these functions when we no longer use repaint r
ects. |
| 235 [RaisesException, TypeChecking=Interface] void stopTrackingRepaints(Document
document); | 237 [RaisesException] void startTrackingRepaints(Document document); |
| 238 [RaisesException] void stopTrackingRepaints(Document document); |
| 236 | 239 |
| 237 // |node| should be Document, HTMLIFrameElement, or unspecified. | 240 // |node| should be Document, HTMLIFrameElement, or unspecified. |
| 238 // If |node| is an HTMLIFrameElement, it assumes node.contentDocument is | 241 // If |node| is an HTMLIFrameElement, it assumes node.contentDocument is |
| 239 // specified without security checks. Unspecified means this document. | 242 // specified without security checks. Unspecified means this document. |
| 240 [RaisesException] void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutT
asks(optional Node? node = null); | 243 [RaisesException] void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutT
asks(optional Node? node = null); |
| 241 | 244 |
| 242 [RaisesException, TypeChecking=Interface] void forceFullRepaint(Document doc
ument); | 245 [RaisesException] void forceFullRepaint(Document document); |
| 246 |
| 247 // These functions both reset the tracked paint invalidation objects. They a
re intended to be used in the following order: |
| 248 // startTrackingPaintInvalidationObjects(), trackedPaintInvalidationObjects
(), stopTrackingPaintInvalidationObjects(). |
| 249 void startTrackingPaintInvalidationObjects(); |
| 250 void stopTrackingPaintInvalidationObjects(); |
| 251 |
| 252 // Returns a list of debug strings for objects that were invalidated between |
| 253 // startTrackingPaintInvalidationObjects() and stopTrackingPaintInvalidation
Objects(). |
| 254 // If an object is invalidated multiple times, it will appear in the list mu
ltiple times. |
| 255 DOMString[] trackedPaintInvalidationObjects(); |
| 243 | 256 |
| 244 // Returns a list of draggable/non-draggable regions in the document. | 257 // Returns a list of draggable/non-draggable regions in the document. |
| 245 [RaisesException, TypeChecking=Interface] ClientRectList draggableRegions(Do
cument document); | 258 [RaisesException] ClientRectList draggableRegions(Document document); |
| 246 [RaisesException, TypeChecking=Interface] ClientRectList nonDraggableRegions
(Document document); | 259 [RaisesException] ClientRectList nonDraggableRegions(Document document); |
| 247 | 260 |
| 248 // Returns a string with information about the mouse cursor used at the spec
ified client location. | 261 // Returns a string with information about the mouse cursor used at the spec
ified client location. |
| 249 [TypeChecking=Interface] DOMString getCurrentCursorInfo(); | 262 DOMString getCurrentCursorInfo(); |
| 250 | 263 |
| 251 readonly attribute boolean cursorUpdatePending; | 264 readonly attribute boolean cursorUpdatePending; |
| 252 | 265 |
| 253 [TypeChecking=Interface] DOMString markerTextForListItem(Element element); | 266 DOMString markerTextForListItem(Element element); |
| 254 | 267 |
| 255 SerializedScriptValue deserializeBuffer(ArrayBuffer buffer); | 268 SerializedScriptValue deserializeBuffer(ArrayBuffer buffer); |
| 256 ArrayBuffer serializeObject(SerializedScriptValue obj); | 269 ArrayBuffer serializeObject(SerializedScriptValue obj); |
| 257 | 270 |
| 258 void forceReload(boolean endToEnd); | 271 void forceReload(boolean endToEnd); |
| 259 | 272 |
| 260 [TypeChecking=Interface] DOMString getImageSourceURL(Element element); | 273 DOMString getImageSourceURL(Element element); |
| 261 | 274 |
| 262 [TypeChecking=Interface] DOMString selectMenuListText(HTMLSelectElement sele
ct); | 275 DOMString selectMenuListText(HTMLSelectElement select); |
| 263 [TypeChecking=Interface] boolean isSelectPopupVisible(Node node); | 276 boolean isSelectPopupVisible(Node node); |
| 264 boolean selectPopupItemStyleIsRtl(Node select, long itemIndex); | 277 boolean selectPopupItemStyleIsRtl(Node select, long itemIndex); |
| 265 long selectPopupItemStyleFontHeight(Node select, long itemIndex); | 278 long selectPopupItemStyleFontHeight(Node select, long itemIndex); |
| 279 void resetTypeAheadSession(HTMLSelectElement select); |
| 266 | 280 |
| 267 [RaisesException] ClientRect selectionBounds(); | 281 [RaisesException] ClientRect selectionBounds(); |
| 268 | 282 |
| 269 boolean loseSharedGraphicsContext3D(); | 283 boolean loseSharedGraphicsContext3D(); |
| 270 | 284 |
| 271 [RaisesException, TypeChecking=Interface] void forceCompositingUpdate(Docume
nt document); | 285 [RaisesException] void forceCompositingUpdate(Document document); |
| 272 | 286 |
| 273 void setZoomFactor(float factor); | 287 void setZoomFactor(float factor); |
| 274 | 288 |
| 275 [RaisesException, TypeChecking=Interface] void setShouldRevealPassword(Eleme
nt element, boolean reveal); | 289 [RaisesException] void setShouldRevealPassword(Element element, boolean reve
al); |
| 276 | 290 |
| 277 [CallWith=ScriptState] Promise createResolvedPromise(any value); | 291 [CallWith=ScriptState] Promise createResolvedPromise(any value); |
| 278 [CallWith=ScriptState] Promise createRejectedPromise(any reason); | 292 [CallWith=ScriptState] Promise createRejectedPromise(any reason); |
| 279 [CallWith=ScriptState] Promise addOneToPromise(Promise promise); | 293 [CallWith=ScriptState] Promise addOneToPromise(Promise promise); |
| 280 [CallWith=ScriptState, RaisesException] Promise promiseCheck(long arg1, bool
ean arg2, Dictionary arg3, DOMString arg4, DOMString[] arg5); | 294 [CallWith=ScriptState, RaisesException] Promise promiseCheck(long arg1, bool
ean arg2, Dictionary arg3, DOMString arg4, DOMString[] arg5); |
| 281 [CallWith=ScriptState] Promise promiseCheckWithoutExceptionState(Dictionary
arg1, DOMString arg2, DOMString... variadic); | 295 [CallWith=ScriptState] Promise promiseCheckWithoutExceptionState(Dictionary
arg1, DOMString arg2, DOMString... variadic); |
| 282 [CallWith=ScriptState] Promise promiseCheckRange([EnforceRange] octet arg1); | 296 [CallWith=ScriptState] Promise promiseCheckRange([EnforceRange] octet arg1); |
| 283 [CallWith=ScriptState] Promise promiseCheckOverload(Location arg1); | 297 [CallWith=ScriptState] Promise promiseCheckOverload(Location arg1); |
| 284 [CallWith=ScriptState] Promise promiseCheckOverload(Document arg1); | 298 [CallWith=ScriptState] Promise promiseCheckOverload(Document arg1); |
| 285 [CallWith=ScriptState] Promise promiseCheckOverload(Location arg1, long arg2
, long arg3); | 299 [CallWith=ScriptState] Promise promiseCheckOverload(Location arg1, long arg2
, long arg3); |
| 286 | 300 |
| 287 void setValueForUser(Element element, DOMString value); | 301 void setValueForUser(Element element, DOMString value); |
| 288 | 302 |
| 289 DOMString textSurroundingNode(Node node, long x, long y, unsigned long maxLe
ngth); | 303 DOMString textSurroundingNode(Node node, long x, long y, unsigned long maxLe
ngth); |
| 290 | 304 |
| 291 void setFocused(boolean focused); | 305 void setFocused(boolean focused); |
| 292 void setInitialFocus(boolean reverse); | 306 void setInitialFocus(boolean reverse); |
| 293 | 307 |
| 294 [TypeChecking=Interface] boolean ignoreLayoutWithPendingStylesheets(Document
document); | 308 boolean ignoreLayoutWithPendingStylesheets(Document document); |
| 295 | 309 |
| 296 // These functions are for testing NetInfo. You must call setNetworkStateNot
ifierTestOnly(true) | 310 // These functions are for testing NetInfo. You must call setNetworkStateNot
ifierTestOnly(true) |
| 297 // before calling setNetworkConnectionInfo. | 311 // before calling setNetworkConnectionInfo. |
| 298 void setNetworkStateNotifierTestOnly(boolean testOnly); | 312 void setNetworkStateNotifierTestOnly(boolean testOnly); |
| 299 [RaisesException] void setNetworkConnectionInfo(DOMString type); | 313 [RaisesException] void setNetworkConnectionInfo(DOMString type, double downl
inkMaxMbps); |
| 300 | 314 |
| 301 // This function is for testing HitRegions on Canvas2D. | 315 // This function is for testing HitRegions on Canvas2D. |
| 302 unsigned long countHitRegions(CanvasRenderingContext2D context); | 316 unsigned long countHitRegions(CanvasRenderingContext2D context); |
| 303 | 317 |
| 304 [TypeChecking=Interface] boolean isInCanvasFontCache(Document document, DOMS
tring fontString); | 318 boolean isInCanvasFontCache(Document document, DOMString fontString); |
| 305 [TypeChecking=Interface] unsigned long canvasFontCacheMaxFonts(); | 319 unsigned long canvasFontCacheMaxFonts(); |
| 306 | |
| 307 [TypeChecking=Interface] ClientRect boundsInViewportSpace(Element element); | |
| 308 | |
| 309 [RaisesException, TypeChecking=Interface] void forcePluginPlaceholder(HTMLEl
ement plugin, DocumentFragment fragment); | |
| 310 [RaisesException, TypeChecking=Interface] void forcePluginPlaceholder(HTMLEl
ement plugin, PluginPlaceholderOptions options); | |
| 311 | 320 |
| 312 DictionaryTest dictionaryTest(); | 321 DictionaryTest dictionaryTest(); |
| 313 UnionTypesTest unionTypesTest(); | 322 UnionTypesTest unionTypesTest(); |
| 314 | 323 [RaisesException] void setScrollChain(ScrollState scrollState, Element[] ele
ments); |
| 315 void forceBlinkGCWithoutV8GC(); | 324 void forceBlinkGCWithoutV8GC(); |
| 316 | 325 |
| 317 DOMString selectedHTMLForClipboard(); | 326 DOMString selectedHTMLForClipboard(); |
| 318 DOMString selectedTextForClipboard(); | 327 DOMString selectedTextForClipboard(); |
| 319 | 328 |
| 320 void setVisualViewportOffset(long x, long y); | 329 void setVisualViewportOffset(long x, long y); |
| 330 int visualViewportHeight(); |
| 331 int visualViewportWidth(); |
| 332 double visualViewportScrollX(); |
| 333 double visualViewportScrollY(); |
| 334 |
| 335 bool magnifyScaleAroundAnchor(float offset, float x, float y); |
| 321 | 336 |
| 322 boolean isUseCounted(Document document, long useCounterId); | 337 boolean isUseCounted(Document document, long useCounterId); |
| 338 boolean isCSSPropertyUseCounted(Document document, DOMString propertyName); |
| 323 | 339 |
| 324 iterable<long>; | 340 iterable<long>; |
| 325 | 341 |
| 326 [Unscopeable] readonly attribute DOMString unscopeableAttribute; | 342 [Unscopeable] readonly attribute DOMString unscopeableAttribute; |
| 327 [Unscopeable] DOMString unscopeableMethod(); | 343 [Unscopeable] DOMString unscopeableMethod(); |
| 328 | 344 |
| 329 ClientRectList focusRingRects(Element element); | 345 ClientRectList focusRingRects(Element element); |
| 346 ClientRectList outlineRects(Element element); |
| 330 void setCapsLockState(boolean enabled); | 347 void setCapsLockState(boolean enabled); |
| 348 |
| 349 // Returns whether the scrollbar was able to be shown or hidden; not all pla
tforms |
| 350 // support overlay scrollbars. |
| 351 bool setScrollbarVisibilityInScrollableArea(Node node, boolean visible); |
| 352 |
| 353 void forceRestrictIFramePermissions(); |
| 354 [RaisesException] double monotonicTimeToZeroBasedDocumentTime(double platfor
mTime); |
| 355 |
| 356 void setMediaElementNetworkState(HTMLMediaElement element, long state); |
| 357 |
| 358 // TODO(liberato): remove once autoplay gesture override experiment conclude
s. |
| 359 void triggerAutoplayViewportCheck(HTMLMediaElement mediaElement); |
| 360 |
| 361 int getScrollAnimationState(Node node); |
| 331 }; | 362 }; |
| OLD | NEW |