diff options
| author | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-15 16:08:57 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-15 16:08:57 +0200 |
| commit | 5466563f4b5b6b86523e3f89bb7f77e5b5270c78 (patch) | |
| tree | 8caccf7cd03a15207cde3ba282c88bf132482a91 /Source/WebKit/chromium/src/WebFrameImpl.h | |
| parent | 33b26980cb24288b5a9f2590ccf32a949281bb79 (diff) | |
| download | qtwebkit-5466563f4b5b6b86523e3f89bb7f77e5b5270c78.tar.gz | |
Imported WebKit commit 0dc6cd75e1d4836eaffbb520be96fac4847cc9d2 (http://svn.webkit.org/repository/webkit/trunk@131300)
WebKit update which introduces the QtWebKitWidgets module that contains the WK1
widgets based API. (In fact it renames QtWebKit to QtWebKitWidgets while we're
working on completing the entire split as part of
https://bugs.webkit.org/show_bug.cgi?id=99314
Diffstat (limited to 'Source/WebKit/chromium/src/WebFrameImpl.h')
| -rw-r--r-- | Source/WebKit/chromium/src/WebFrameImpl.h | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/Source/WebKit/chromium/src/WebFrameImpl.h b/Source/WebKit/chromium/src/WebFrameImpl.h index a2fe797e3..2686aad1d 100644 --- a/Source/WebKit/chromium/src/WebFrameImpl.h +++ b/Source/WebKit/chromium/src/WebFrameImpl.h @@ -35,6 +35,7 @@ #include "WebFrame.h" #include "Frame.h" +#include "FrameDestructionObserver.h" #include "FrameLoaderClientImpl.h" #include <wtf/Compiler.h> #include <wtf/OwnPtr.h> @@ -69,10 +70,12 @@ struct WebPrintParams; template <typename T> class WebVector; // Implementation of WebFrame, note that this is a reference counted object. -class WebFrameImpl : public WebFrame, public RefCounted<WebFrameImpl> { +class WebFrameImpl + : public WebFrame + , public RefCounted<WebFrameImpl> + , public WebCore::FrameDestructionObserver { public: // WebFrame methods: - virtual WebString name() const; virtual WebString uniqueName() const; virtual WebString assignedName() const; virtual void setName(const WebString&); @@ -240,6 +243,9 @@ public: virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const; virtual WebString layerTreeAsText(bool showDebugInfo = false) const; + // WebCore::FrameDestructionObserver methods. + virtual void willDetachPage(); + static PassRefPtr<WebFrameImpl> create(WebFrameClient* client); virtual ~WebFrameImpl(); @@ -262,8 +268,7 @@ public: WebViewImpl* viewImpl() const; - WebCore::Frame* frame() const { return m_frame; } - WebCore::FrameView* frameView() const { return m_frame ? m_frame->view() : 0; } + WebCore::FrameView* frameView() const { return frame() ? frame()->view() : 0; } // Getters for the impls corresponding to Get(Provisional)DataSource. They // may return 0 if there is no corresponding data source. @@ -325,11 +330,10 @@ private: InvalidateAll // Both content area and the scrollbar. }; - WebFrameImpl(WebFrameClient*); + explicit WebFrameImpl(WebFrameClient*); - // Informs the WebFrame that the Frame is being closed, called by the - // WebFrameLoaderClient - void closing(); + // Sets the local WebCore frame and registers destruction observers. + void setWebCoreFrame(WebCore::Frame*); // Notifies the delegate about a new selection rect. void reportFindInPageSelection( @@ -382,6 +386,11 @@ private: // was searched. bool shouldScopeMatches(const WTF::String& searchText); + // Removes the current frame from the global scoping effort and triggers any + // updates if appropriate. This method does not mark the scoping operation + // as finished. + void flushCurrentScopingEffort(int identifier); + // Finishes the current scoping effort and triggers any updates if appropriate. void finishCurrentScopingEffort(int identifier); @@ -407,10 +416,6 @@ private: WebFrameClient* m_client; - // This is a weak pointer to our corresponding WebCore frame. A reference to - // ourselves is held while frame_ is valid. See our Closing method. - WebCore::Frame* m_frame; - // A way for the main frame to keep track of which frame has an active // match. Should be 0 for all other frames. WebFrameImpl* m_currentActiveMatchFrame; @@ -438,8 +443,7 @@ private: // Keeps track of how many matches this frame has found so far, so that we // don't loose count between scoping efforts, and is also used (in conjunction - // with m_lastSearchString and m_scopingComplete) to figure out if we need to - // search the frame again. + // with m_lastSearchString) to figure out if we need to search the frame again. int m_lastMatchCount; // This variable keeps a cumulative total of matches found so far for ALL the @@ -452,9 +456,12 @@ private: // It should be -1 for all other frames. int m_framesScopingCount; - // Keeps track of whether the scoping effort was completed (the user may - // interrupt it before it completes by submitting a new search). - bool m_scopingComplete; + // Identifier of the latest find-in-page request. Required to be stored in + // the frame in order to reply if required in case the frame is detached. + int m_findRequestIdentifier; + + // Keeps track of whether there is an scoping effort ongoing in the frame. + bool m_scopingInProgress; // Keeps track of whether the last find request completed its scoping effort // without finding any matches in this frame. |
