diff options
Diffstat (limited to 'WebKit/chromium/public/WebFrame.h')
-rw-r--r-- | WebKit/chromium/public/WebFrame.h | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/WebKit/chromium/public/WebFrame.h b/WebKit/chromium/public/WebFrame.h index 44b57aa..4197c23 100644 --- a/WebKit/chromium/public/WebFrame.h +++ b/WebKit/chromium/public/WebFrame.h @@ -45,8 +45,11 @@ template <class T> class Local; namespace WebKit { +class WebAnimationController; class WebData; class WebDataSource; +class WebDocument; +class WebElement; class WebFormElement; class WebHistoryItem; class WebInputElement; @@ -66,6 +69,9 @@ template <typename T> class WebVector; class WebFrame { public: + // Returns the number of live WebFrame objects, used for leak checking. + WEBKIT_API static int instanceCount(); + // The two functions below retrieve the WebFrame instances relating the // currently executing JavaScript. Since JavaScript can make function // calls across frames, though, we need to be more precise. @@ -85,11 +91,16 @@ public: WEBKIT_API static WebFrame* frameForEnteredContext(); WEBKIT_API static WebFrame* frameForCurrentContext(); + // Returns the frame inside a given frame or iframe element. Returns 0 if + // the given element is not a frame, iframe or if the frame is empty. + WEBKIT_API static WebFrame* fromFrameOwnerElement(const WebElement&); + // Basic properties --------------------------------------------------- // The name of this frame. virtual WebString name() const = 0; + virtual void clearName() = 0; // The url of the document loaded in this frame. This is equivalent to // dataSource()->request().url(). @@ -103,6 +114,9 @@ public: // the document loaded in this frame. virtual WebURL openSearchDescriptionURL() const = 0; + // Return the frame's encoding. + virtual WebString encoding() const = 0; + // Geometry ----------------------------------------------------------- @@ -164,8 +178,12 @@ public: // Content ------------------------------------------------------------ + virtual WebDocument document() const = 0; + virtual void forms(WebVector<WebFormElement>&) const = 0; + virtual WebAnimationController* animationController() = 0; + // Scripting ---------------------------------------------------------- @@ -186,17 +204,6 @@ public: // Executes script in the context of the current page. virtual void executeScript(const WebScriptSource&) = 0; - // Executes script in a new context associated with the frame. The - // script gets its own global scope and its own prototypes for - // intrinsic JS objects (String, Array, and so-on). It shares the - // wrappers for all DOM nodes and DOM constructors. extensionGroup is - // an embedder-provided specifier that controls which v8 extensions are - // loaded into the new context - see WebKit::registerExtension for the - // corresponding specifier. - virtual void executeScriptInNewContext(const WebScriptSource* sources, - unsigned numSources, - int extensionGroup) = 0; - // Executes JavaScript in a new world associated with the web frame. // The script gets its own global scope and its own prototypes for // intrinsic JavaScript objects (String, Array, and so-on). It also @@ -428,6 +435,7 @@ public: // of matches found during the scoping effort. virtual void resetMatchCount() = 0; + // Password autocompletion --------------------------------------------- // Registers a listener for the specified user name input element. The @@ -438,12 +446,14 @@ public: WebInputElement, WebPasswordAutocompleteListener*) = 0; + // Utility ------------------------------------------------------------- // Given a relative URL, returns an absolute URL by resolving the URL // relative to the base URL of the frame's document. This uses the // same algorithm that WebKit uses to resolve hyperlinks found in a // HTML document. + // Deprecated. Use document().completeURL() instead. virtual WebURL completeURL(const WebString&) const = 0; // Returns the contents of this frame as a string. If the text is @@ -460,6 +470,14 @@ public: // from the DOM. virtual WebString contentAsMarkup() const = 0; + // Returns a text representation of the render tree. This method is used + // to support layout tests. + virtual WebString renderTreeAsText() const = 0; + + // Returns the counter value for the specified element. This method is + // used to support layout tests. + virtual WebString counterValueForElementById(const WebString& id) const = 0; + protected: ~WebFrame() { } }; |