15c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)/* 25c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * Copyright (C) 2012 Google Inc. All rights reserved. 3926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * Copyright (C) 2013 Apple Inc. All rights reserved. 45c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * 55c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * Redistribution and use in source and binary forms, with or without 65c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * modification, are permitted provided that the following conditions 75c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * are met: 85c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * 95c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * 1. Redistributions of source code must retain the above copyright 105c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * notice, this list of conditions and the following disclaimer. 115c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * 2. Redistributions in binary form must reproduce the above copyright 125c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * notice, this list of conditions and the following disclaimer in the 135c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * documentation and/or other materials provided with the distribution. 145c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * 155c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY 165c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 175c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 185c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 195c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 205c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 215c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 225c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 235c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 245c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 255c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) */ 265c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 275c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#ifndef Internals_h 285c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#define Internals_h 295c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 30197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch#include "bindings/core/v8/ExceptionStatePlaceholder.h" 31197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch#include "bindings/core/v8/ScriptPromise.h" 32197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch#include "bindings/core/v8/ScriptValue.h" 33c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)#include "bindings/core/v8/ScriptWrappable.h" 3453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)#include "core/css/CSSComputedStyleDeclaration.h" 35591b958dee2cf159d33a0b931e6231072eaf38d5Ben Murdoch#include "core/dom/ContextLifecycleObserver.h" 367757ec2eadfa2dd8ac2aeed0a4399e9b07ec38cbBen Murdoch#include "core/page/scrolling/ScrollingCoordinator.h" 37a9984bf9ddc3cf73fdae3f29134a2bab379e7029Ben Murdoch#include "platform/heap/Handle.h" 38e1f1df5f01594c0e62e751e4b46e779b85c2faa5Torne (Richard Coles)#include "wtf/ArrayBuffer.h" 39e1f1df5f01594c0e62e751e4b46e779b85c2faa5Torne (Richard Coles)#include "wtf/PassRefPtr.h" 40e1f1df5f01594c0e62e751e4b46e779b85c2faa5Torne (Richard Coles)#include "wtf/RefCounted.h" 41e1f1df5f01594c0e62e751e4b46e779b85c2faa5Torne (Richard Coles)#include "wtf/text/WTFString.h" 425c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 43c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)namespace blink { 445c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 45197021e6b966cfb06891637935ef33fff06433d1Ben Murdochclass CanvasRenderingContext2D; 465c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)class ClientRect; 475c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)class ClientRectList; 487242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucciclass DOMPoint; 495c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)class DOMStringList; 5076c265b59aa821ccbf8c75ab2bb0d036e97d2956Torne (Richard Coles)class LocalDOMWindow; 517242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucciclass DictionaryTest; 525c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)class Document; 535c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)class DocumentMarker; 545c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)class Element; 55df95704c49daea886ddad70775bda23618d6274dBen Murdochclass ExceptionState; 5607a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdochclass ExecutionContext; 57f5e4ad553afbc08dd2e729bb77e937a9a94d5827Torne (Richard Coles)class GCObservation; 589e12abdf8c3a23d52091ea54ebb6a04d327f9300Torne (Richard Coles)class HTMLElement; 5907a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdochclass HTMLMediaElement; 60e69819bd8e388ea4ad1636a19aa6b2eed4952191Ben Murdochclass InternalProfilers; 61df95704c49daea886ddad70775bda23618d6274dBen Murdochclass InternalRuntimeFlags; 625c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)class InternalSettings; 637242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucciclass Iterator; 647757ec2eadfa2dd8ac2aeed0a4399e9b07ec38cbBen Murdochclass LayerRectList; 6507a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdochclass LocalFrame; 665c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)class Node; 675c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)class Page; 685c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)class PagePopupController; 69197021e6b966cfb06891637935ef33fff06433d1Ben Murdochclass PrivateScriptTest; 705c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)class Range; 71926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles)class SerializedScriptValue; 72df95704c49daea886ddad70775bda23618d6274dBen Murdochclass ShadowRoot; 73e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles)template <typename NodeType> class StaticNodeTypeList; 74e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles)typedef StaticNodeTypeList<Node> StaticNodeList; 75926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles)class TypeConversions; 765c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 777242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucciclass Internals FINAL : public GarbageCollectedFinalized<Internals>, public ScriptWrappable, public ContextLifecycleObserver { 787242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci DEFINE_WRAPPERTYPEINFO(); 795c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)public: 807242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci static Internals* create(Document*); 815c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) virtual ~Internals(); 825c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 835c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) static void resetToConsistentState(Page*); 845c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 85df95704c49daea886ddad70775bda23618d6274dBen Murdoch String elementRenderTreeAsText(Element*, ExceptionState&); 865c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 875c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) String address(Node*); 885c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 897242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci GCObservation* observeGC(ScriptValue); 90f5e4ad553afbc08dd2e729bb77e937a9a94d5827Torne (Richard Coles) 91926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) bool isPreloaded(const String& url); 92926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) bool isLoadingFromMemoryCache(const String& url); 935c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 94e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) bool isSharingStyle(Element*, Element*) const; 9509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) 96e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) PassRefPtrWillBeRawPtr<CSSStyleDeclaration> computedStyleIncludingVisitedInfo(Node*) const; 97df95704c49daea886ddad70775bda23618d6274dBen Murdoch 98e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) ShadowRoot* shadowRoot(Element* host); 99e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) ShadowRoot* youngestShadowRoot(Element* host); 100e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) ShadowRoot* oldestShadowRoot(Element* host); 101df95704c49daea886ddad70775bda23618d6274dBen Murdoch ShadowRoot* youngerShadowRoot(Node* shadow, ExceptionState&); 102df95704c49daea886ddad70775bda23618d6274dBen Murdoch String shadowRootType(const Node*, ExceptionState&) const; 103df95704c49daea886ddad70775bda23618d6274dBen Murdoch bool hasShadowInsertionPoint(const Node*, ExceptionState&) const; 104df95704c49daea886ddad70775bda23618d6274dBen Murdoch bool hasContentElement(const Node*, ExceptionState&) const; 105df95704c49daea886ddad70775bda23618d6274dBen Murdoch size_t countElementShadow(const Node*, ExceptionState&) const; 106e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) const AtomicString& shadowPseudoId(Element*); 1075c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 10881a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) // CSS Animation / Transition testing. 109df95704c49daea886ddad70775bda23618d6274dBen Murdoch void pauseAnimations(double pauseTime, ExceptionState&); 110df95704c49daea886ddad70775bda23618d6274dBen Murdoch 111df95704c49daea886ddad70775bda23618d6274dBen Murdoch bool isValidContentSelect(Element* insertionPoint, ExceptionState&); 112e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) Node* treeScopeRootNode(Node*); 113e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) Node* parentTreeScope(Node*); 11409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) bool hasSelectorForIdInShadow(Element* host, const AtomicString& idValue, ExceptionState&); 11509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) bool hasSelectorForClassInShadow(Element* host, const AtomicString& className, ExceptionState&); 11609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) bool hasSelectorForAttributeInShadow(Element* host, const AtomicString& attributeName, ExceptionState&); 117df95704c49daea886ddad70775bda23618d6274dBen Murdoch bool hasSelectorForPseudoClassInShadow(Element* host, const String& pseudoClass, ExceptionState&); 118df95704c49daea886ddad70775bda23618d6274dBen Murdoch unsigned short compareTreeScopePosition(const Node*, const Node*, ExceptionState&) const; 119df95704c49daea886ddad70775bda23618d6274dBen Murdoch 120e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) // FIXME: Rename these functions if walker is preferred. 121e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) Node* nextSiblingByWalker(Node*); 122e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) Node* firstChildByWalker(Node*); 123e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) Node* lastChildByWalker(Node*); 124e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) Node* nextNodeByWalker(Node*); 125e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) Node* previousNodeByWalker(Node*); 1265c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 12751b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) unsigned updateStyleAndReturnAffectedElementCount(ExceptionState&) const; 12809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) unsigned needsLayoutCount(ExceptionState&) const; 129197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch unsigned hitTestCount(Document*, ExceptionState&) const; 13051b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) 1315c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) String visiblePlaceholder(Element*); 1325c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) void selectColorInColorChooser(Element*, const String& colorValue); 1337242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci void endColorChooser(Element*); 13409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) bool hasAutofocusRequest(Document*); 13509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) bool hasAutofocusRequest(); 13651b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) Vector<String> formControlStateOfHistoryItem(ExceptionState&); 13751b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) void setFormControlStateOfHistoryItem(const Vector<String>&, ExceptionState&); 138df95704c49daea886ddad70775bda23618d6274dBen Murdoch void setEnableMockPagePopup(bool, ExceptionState&); 139d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) PassRefPtrWillBeRawPtr<PagePopupController> pagePopupController(); 1405c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 141a9984bf9ddc3cf73fdae3f29134a2bab379e7029Ben Murdoch PassRefPtrWillBeRawPtr<ClientRect> absoluteCaretBounds(ExceptionState&); 1425c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 143e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) PassRefPtrWillBeRawPtr<ClientRect> boundingBox(Element*); 1445c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 145df95704c49daea886ddad70775bda23618d6274dBen Murdoch unsigned markerCountForNode(Node*, const String&, ExceptionState&); 146e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) unsigned activeMarkerCountForNode(Node*); 147a9984bf9ddc3cf73fdae3f29134a2bab379e7029Ben Murdoch PassRefPtrWillBeRawPtr<Range> markerRangeForNode(Node*, const String& markerType, unsigned index, ExceptionState&); 148df95704c49daea886ddad70775bda23618d6274dBen Murdoch String markerDescriptionForNode(Node*, const String& markerType, unsigned index, ExceptionState&); 1495c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) void addTextMatchMarker(const Range*, bool isActive); 150e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) void setMarkersActive(Node*, unsigned startOffset, unsigned endOffset, bool); 151e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) void setMarkedTextMatchesAreHighlighted(Document*, bool); 1525c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 153df95704c49daea886ddad70775bda23618d6274dBen Murdoch void setScrollViewPosition(Document*, long x, long y, ExceptionState&); 154e1f1df5f01594c0e62e751e4b46e779b85c2faa5Torne (Richard Coles) String viewportAsText(Document*, float devicePixelRatio, int availableWidth, int availableHeight, ExceptionState&); 1555c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 156df95704c49daea886ddad70775bda23618d6274dBen Murdoch bool wasLastChangeUserEdit(Element* textField, ExceptionState&); 157df95704c49daea886ddad70775bda23618d6274dBen Murdoch bool elementShouldAutoComplete(Element* inputElement, ExceptionState&); 15809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) String suggestedValue(Element*, ExceptionState&); 15909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) void setSuggestedValue(Element*, const String&, ExceptionState&); 160df95704c49daea886ddad70775bda23618d6274dBen Murdoch void setEditingValue(Element* inputElement, const String&, ExceptionState&); 161df95704c49daea886ddad70775bda23618d6274dBen Murdoch void setAutofilled(Element*, bool enabled, ExceptionState&); 162df95704c49daea886ddad70775bda23618d6274dBen Murdoch void scrollElementToRect(Element*, long x, long y, long w, long h, ExceptionState&); 1635c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 164e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) PassRefPtrWillBeRawPtr<Range> rangeFromLocationAndLength(Element* scope, int rangeLocation, int rangeLength); 165e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) unsigned locationFromRange(Element* scope, const Range*); 166e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) unsigned lengthFromRange(Element* scope, const Range*); 167e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) String rangeAsText(const Range*); 1685c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 1697242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci DOMPoint* touchPositionAdjustedToBestClickableNode(long x, long y, long width, long height, Document*, ExceptionState&); 170df95704c49daea886ddad70775bda23618d6274dBen Murdoch Node* touchNodeAdjustedToBestClickableNode(long x, long y, long width, long height, Document*, ExceptionState&); 1717242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci DOMPoint* touchPositionAdjustedToBestContextMenuNode(long x, long y, long width, long height, Document*, ExceptionState&); 172df95704c49daea886ddad70775bda23618d6274dBen Murdoch Node* touchNodeAdjustedToBestContextMenuNode(long x, long y, long width, long height, Document*, ExceptionState&); 173a9984bf9ddc3cf73fdae3f29134a2bab379e7029Ben Murdoch PassRefPtrWillBeRawPtr<ClientRect> bestZoomableAreaForTouchPoint(long x, long y, long width, long height, Document*, ExceptionState&); 1745c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 175df95704c49daea886ddad70775bda23618d6274dBen Murdoch int lastSpellCheckRequestSequence(Document*, ExceptionState&); 176df95704c49daea886ddad70775bda23618d6274dBen Murdoch int lastSpellCheckProcessedSequence(Document*, ExceptionState&); 1775c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 17809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) Vector<AtomicString> userPreferredLanguages() const; 1795c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) void setUserPreferredLanguages(const Vector<String>&); 1805c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 181e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) unsigned activeDOMObjectCount(Document*); 182e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) unsigned wheelEventHandlerCount(Document*); 183e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) unsigned scrollEventHandlerCount(Document*); 184e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) unsigned touchEventHandlerCount(Document*); 1857242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci LayerRectList* touchEventTargetLayerRects(Document*, ExceptionState&); 1865c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 18753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) // This is used to test rect based hit testing like what's done on touch screens. 18876c265b59aa821ccbf8c75ab2bb0d036e97d2956Torne (Richard Coles) PassRefPtrWillBeRawPtr<StaticNodeList> nodesFromRect(Document*, int x, int y, unsigned topPadding, unsigned rightPadding, 189197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowChildFrameContent, ExceptionState&) const; 1905c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 191e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) bool hasSpellingMarker(Document*, int from, int length); 192e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) bool hasGrammarMarker(Document*, int from, int length); 193e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) void setContinuousSpellCheckingEnabled(bool); 1945c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 195e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) bool isOverwriteModeEnabled(Document*); 196e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) void toggleOverwriteModeEnabled(Document*); 19753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 198e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) unsigned numberOfScrollableAreas(Document*); 1995c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 200e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) bool isPageBoxVisible(Document*, int pageNumber); 2015c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 2025c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) static const char* internalsId; 2035c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 2045c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) InternalSettings* settings() const; 20581a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) InternalRuntimeFlags* runtimeFlags() const; 206e69819bd8e388ea4ad1636a19aa6b2eed4952191Ben Murdoch InternalProfilers* profilers(); 207926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) unsigned workerThreadCount() const; 2085c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 209df95704c49daea886ddad70775bda23618d6274dBen Murdoch void setDeviceProximity(Document*, const String& eventType, double value, double min, double max, ExceptionState&); 2105c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 211df95704c49daea886ddad70775bda23618d6274dBen Murdoch String layerTreeAsText(Document*, unsigned flags, ExceptionState&) const; 212df95704c49daea886ddad70775bda23618d6274dBen Murdoch String layerTreeAsText(Document*, ExceptionState&) const; 213df95704c49daea886ddad70775bda23618d6274dBen Murdoch String elementLayerTreeAsText(Element*, unsigned flags, ExceptionState&) const; 214df95704c49daea886ddad70775bda23618d6274dBen Murdoch String elementLayerTreeAsText(Element*, ExceptionState&) const; 21553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 216c0e19a689c8ac22cdc96b291a8d33a5d3b0b34a4Torne (Richard Coles) bool scrollsWithRespectTo(Element*, Element*, ExceptionState&); 2179bbd2f5e390b01907d97ecffde80aa1b06113aacTorne (Richard Coles) bool isUnclippedDescendant(Element*, ExceptionState&); 218c0e19a689c8ac22cdc96b291a8d33a5d3b0b34a4Torne (Richard Coles) 219e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) String scrollingStateTreeAsText(Document*) const; 220df95704c49daea886ddad70775bda23618d6274dBen Murdoch String mainThreadScrollingReasons(Document*, ExceptionState&) const; 221a9984bf9ddc3cf73fdae3f29134a2bab379e7029Ben Murdoch PassRefPtrWillBeRawPtr<ClientRectList> nonFastScrollableRects(Document*, ExceptionState&) const; 2225c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 223e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) void garbageCollectDocumentResources(Document*) const; 224fff8884795cb540f87cf6e6d67b629519b00eb8bBen Murdoch void evictAllResources() const; 2255c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 2265c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) unsigned numberOfLiveNodes() const; 2275c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) unsigned numberOfLiveDocuments() const; 228a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles) String dumpRefCountedInstanceCounts() const; 2295c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) Vector<String> consoleMessageArgumentCounts(Document*) const; 23076c265b59aa821ccbf8c75ab2bb0d036e97d2956Torne (Richard Coles) PassRefPtrWillBeRawPtr<LocalDOMWindow> openDummyInspectorFrontend(const String& url); 2315c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) void closeDummyInspectorFrontend(); 232e69819bd8e388ea4ad1636a19aa6b2eed4952191Ben Murdoch Vector<unsigned long> setMemoryCacheCapacities(unsigned long minDeadBytes, unsigned long maxDeadBytes, unsigned long totalBytes); 233df95704c49daea886ddad70775bda23618d6274dBen Murdoch void setInspectorResourcesDataSizeLimits(int maximumResourcesContentSize, int maximumSingleResourceContentSize, ExceptionState&); 2345c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 2355c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) String counterValue(Element*); 2365c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 2375c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) int pageNumber(Element*, float pageWidth = 800, float pageHeight = 600); 238926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) Vector<String> shortcutIconURLs(Document*) const; 239926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) Vector<String> allIconURLs(Document*) const; 2405c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 2415c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) int numberOfPages(float pageWidthInPixels = 800, float pageHeightInPixels = 600); 2421fad5ca6c42d689812b66fc493992aa6d747a6fbBen Murdoch String pageProperty(String, int, ExceptionState& = ASSERT_NO_EXCEPTION) const; 2431fad5ca6c42d689812b66fc493992aa6d747a6fbBen Murdoch String pageSizeAndMarginsInPixels(int, int, int, int, int, int, int, ExceptionState& = ASSERT_NO_EXCEPTION) const; 2445c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 245df95704c49daea886ddad70775bda23618d6274dBen Murdoch void setDeviceScaleFactor(float scaleFactor, ExceptionState&); 246926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 247df95704c49daea886ddad70775bda23618d6274dBen Murdoch void setIsCursorVisible(Document*, bool, ExceptionState&); 24853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 24907a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdoch void mediaPlayerRequestFullscreen(HTMLMediaElement*); 250e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) double effectiveMediaVolume(HTMLMediaElement*); 25107a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdoch 252697ef0c10ac944be8499480c025020e4c282c980Ben Murdoch void mediaPlayerRemoteRouteAvailabilityChanged(HTMLMediaElement*, bool); 253697ef0c10ac944be8499480c025020e4c282c980Ben Murdoch void mediaPlayerPlayingRemotelyChanged(HTMLMediaElement*, bool); 2547242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci 2555c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) void registerURLSchemeAsBypassingContentSecurityPolicy(const String& scheme); 2565c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(const String& scheme); 2575c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 2587242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci TypeConversions* typeConversions() const; 259197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch PrivateScriptTest* privateScriptTest() const; 2607242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci DictionaryTest* dictionaryTest() const; 2615c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 262926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) Vector<String> getReferencedFilePaths() const; 2635c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 264df95704c49daea886ddad70775bda23618d6274dBen Murdoch void startTrackingRepaints(Document*, ExceptionState&); 265df95704c49daea886ddad70775bda23618d6274dBen Murdoch void stopTrackingRepaints(Document*, ExceptionState&); 26651b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(ExceptionState&); 26751b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(Node*, ExceptionState&); 2685d92fedcae5e801a8b224de090094f2d9df0b54aTorne (Richard Coles) void forceFullRepaint(Document*, ExceptionState&); 2695c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 270a9984bf9ddc3cf73fdae3f29134a2bab379e7029Ben Murdoch PassRefPtrWillBeRawPtr<ClientRectList> draggableRegions(Document*, ExceptionState&); 271a9984bf9ddc3cf73fdae3f29134a2bab379e7029Ben Murdoch PassRefPtrWillBeRawPtr<ClientRectList> nonDraggableRegions(Document*, ExceptionState&); 2721e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles) 273926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) PassRefPtr<ArrayBuffer> serializeObject(PassRefPtr<SerializedScriptValue>) const; 274926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) PassRefPtr<SerializedScriptValue> deserializeBuffer(PassRefPtr<ArrayBuffer>) const; 275926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 276df95704c49daea886ddad70775bda23618d6274dBen Murdoch String getCurrentCursorInfo(Document*, ExceptionState&); 277926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 278e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) String markerTextForListItem(Element*); 279926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 280926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) void forceReload(bool endToEnd); 281926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 282e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) String getImageSourceURL(Element*); 283926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 28453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) bool isSelectPopupVisible(Node*); 285c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles) bool selectPopupItemStyleIsRtl(Node*, int); 286c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles) int selectPopupItemStyleFontHeight(Node*, int); 287926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 288a9984bf9ddc3cf73fdae3f29134a2bab379e7029Ben Murdoch PassRefPtrWillBeRawPtr<ClientRect> selectionBounds(ExceptionState&); 289591b958dee2cf159d33a0b931e6231072eaf38d5Ben Murdoch 290fff8884795cb540f87cf6e6d67b629519b00eb8bBen Murdoch bool loseSharedGraphicsContext3D(); 291fff8884795cb540f87cf6e6d67b629519b00eb8bBen Murdoch 29219cde67944066db31e633d9e386f2aa9bf9fadb3Torne (Richard Coles) void forceCompositingUpdate(Document*, ExceptionState&); 29319cde67944066db31e633d9e386f2aa9bf9fadb3Torne (Richard Coles) 29409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) void setZoomFactor(float); 29509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) 29609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) void setShouldRevealPassword(Element*, bool, ExceptionState&); 29709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) 298323480423219ecd77329f8326dc5e0e3b50926d4Torne (Richard Coles) ScriptPromise createResolvedPromise(ScriptState*, ScriptValue); 299323480423219ecd77329f8326dc5e0e3b50926d4Torne (Richard Coles) ScriptPromise createRejectedPromise(ScriptState*, ScriptValue); 300e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) ScriptPromise addOneToPromise(ScriptState*, ScriptPromise); 301e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) ScriptPromise promiseCheck(ScriptState*, long, bool, const Dictionary&, const String&, const Vector<String>&, ExceptionState&); 302e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) ScriptPromise promiseCheckWithoutExceptionState(ScriptState*, const Dictionary&, const String&, const Vector<String>&); 303e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) ScriptPromise promiseCheckRange(ScriptState*, long); 30409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) 305d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) void trace(Visitor*); 306d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) 307d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) void setValueForUser(Element*, const String&); 308d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) 309d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) String textSurroundingNode(Node*, int x, int y, unsigned long maxLength); 310d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) 311d6cdb82654e8f3343a693ca752d5c4cee0324e17Torne (Richard Coles) void setFocused(bool); 312d6cdb82654e8f3343a693ca752d5c4cee0324e17Torne (Richard Coles) 313e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) bool ignoreLayoutWithPendingStylesheets(Document*); 3145d92fedcae5e801a8b224de090094f2d9df0b54aTorne (Richard Coles) 315d6cdb82654e8f3343a693ca752d5c4cee0324e17Torne (Richard Coles) void setNetworkStateNotifierTestOnly(bool); 316d6cdb82654e8f3343a693ca752d5c4cee0324e17Torne (Richard Coles) // Test must call setNetworkStateNotifierTestOnly(true) before calling setNetworkConnectionInfo. 317d6cdb82654e8f3343a693ca752d5c4cee0324e17Torne (Richard Coles) void setNetworkConnectionInfo(const String&, ExceptionState&); 318e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) String serializeNavigationMarkup(); 319e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) void hideAllTransitionElements(); 320197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch 321197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch unsigned countHitRegions(CanvasRenderingContext2D*); 322d6cdb82654e8f3343a693ca752d5c4cee0324e17Torne (Richard Coles) 3239e12abdf8c3a23d52091ea54ebb6a04d327f9300Torne (Richard Coles) void forcePluginPlaceholder(HTMLElement* plugin, const String& htmlSource, ExceptionState&); 3247242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci void forcePluginPlaceholder(HTMLElement* plugin, const Dictionary& options, ExceptionState&); 3257242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci 3267242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci Iterator* iterator(ScriptState*, ExceptionState&); 3279e12abdf8c3a23d52091ea54ebb6a04d327f9300Torne (Richard Coles) 3285c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)private: 3295c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) explicit Internals(Document*); 3305c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) Document* contextDocument() const; 331d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) LocalFrame* frame() const; 332926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) Vector<String> iconURLs(Document*, int iconTypesMask) const; 333a9984bf9ddc3cf73fdae3f29134a2bab379e7029Ben Murdoch PassRefPtrWillBeRawPtr<ClientRectList> annotatedRegions(Document*, bool draggable, ExceptionState&); 3345c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 335df95704c49daea886ddad70775bda23618d6274dBen Murdoch DocumentMarker* markerAt(Node*, const String& markerType, unsigned index, ExceptionState&); 3367242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci Member<InternalRuntimeFlags> m_runtimeFlags; 3377242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci Member<InternalProfilers> m_profilers; 3385c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)}; 3395c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 340c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)} // namespace blink 3415c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 3427242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci#endif // Internals_h 343