Skip to content
Permalink
Browse files
2011-03-06 Sreeram Ramachandran <sreeram@google.com>
        Reviewed by Dimitri Glazkov.

        Expose page dismissal event status through the WebKit API for chromium.
        https://bugs.webkit.org/show_bug.cgi?id=55844

        Chromium will find it useful to know the page dismissal status (i.e.,
        whether a frame is in the midst of executing a beforeunload or unload
        handler), so expose that information through the chromium port in the
        WebKit API.

        This is my second attempt at this patch. The previous one broke
        downstream Chromium builds of some unit tests which had classes derived
        from WebFrame (and thus became uninstantiable because of this new pure
        virtual method). Those have now been fixed (http://crrev.com/77101).

        * public/WebFrame.h:
        * src/WebFrameImpl.cpp:
        (WebKit::WebFrameImpl::pageDismissalEventBeingDispatched):
        * src/WebFrameImpl.h:

Canonical link: https://commits.webkit.org/70345@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
webkit-commit-queue committed Mar 7, 2011
1 parent f58f836 commit 2d041166b565bbf75123581a2d1f562e031b531d
Showing with 32 additions and 0 deletions.
  1. +22 −0 Source/WebKit/chromium/ChangeLog
  2. +4 −0 Source/WebKit/chromium/public/WebFrame.h
  3. +5 −0 Source/WebKit/chromium/src/WebFrameImpl.cpp
  4. +1 −0 Source/WebKit/chromium/src/WebFrameImpl.h
@@ -1,3 +1,25 @@
2011-03-06 Sreeram Ramachandran <sreeram@google.com>

Reviewed by Dimitri Glazkov.

Expose page dismissal event status through the WebKit API for chromium.
https://bugs.webkit.org/show_bug.cgi?id=55844

Chromium will find it useful to know the page dismissal status (i.e.,
whether a frame is in the midst of executing a beforeunload or unload
handler), so expose that information through the chromium port in the
WebKit API.

This is my second attempt at this patch. The previous one broke
downstream Chromium builds of some unit tests which had classes derived
from WebFrame (and thus became uninstantiable because of this new pure
virtual method). Those have now been fixed (http://crrev.com/77101).

* public/WebFrame.h:
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::pageDismissalEventBeingDispatched):
* src/WebFrameImpl.h:

2011-03-06 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r80436.
@@ -365,6 +365,10 @@ class WebFrame {
// with a suppressed opener.
virtual bool willSuppressOpenerInNewFrame() const = 0;

// Returns true if this frame is in the midst of executing a beforeunload
// or unload event handler.
virtual bool pageDismissalEventBeingDispatched() const = 0;


// Editing -------------------------------------------------------------

@@ -1077,6 +1077,11 @@ bool WebFrameImpl::willSuppressOpenerInNewFrame() const
return frame()->loader()->suppressOpenerInNewFrame();
}

bool WebFrameImpl::pageDismissalEventBeingDispatched() const
{
return frame()->loader()->pageDismissalEventBeingDispatched();
}

void WebFrameImpl::replaceSelection(const WebString& text)
{
RefPtr<DocumentFragment> fragment = createFragmentFromText(
@@ -138,6 +138,7 @@ class WebFrameImpl : public WebFrame, public RefCounted<WebFrameImpl> {
virtual unsigned unloadListenerCount() const;
virtual bool isProcessingUserGesture() const;
virtual bool willSuppressOpenerInNewFrame() const;
virtual bool pageDismissalEventBeingDispatched() const;
virtual void replaceSelection(const WebString&);
virtual void insertText(const WebString&);
virtual void setMarkedText(const WebString&, unsigned location, unsigned length);

0 comments on commit 2d04116

Please sign in to comment.