Diff
Modified: trunk/Source/WebCore/ChangeLog (114801 => 114802)
--- trunk/Source/WebCore/ChangeLog 2012-04-21 00:01:09 UTC (rev 114801)
+++ trunk/Source/WebCore/ChangeLog 2012-04-21 00:07:13 UTC (rev 114802)
@@ -1,3 +1,31 @@
+2012-04-20 Brady Eidson <[email protected]>
+
+ https://bugs.webkit.org/show_bug.cgi?id=84512
+ Repurpose ActiveDOMObject::WillShowDialog to WillDeferLoading
+
+ Reviewed by Eric Carlson.
+
+ No new tests. (Refactor, no behavior change)
+
+ Rename WillShowDialog to WillDeferLoading:
+ * dom/ActiveDOMObject.h:
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::suspend):
+
+ Don't take a ReasonForSuspension argument anymore, just use WillDeferLoading:
+ * page/PageGroupLoadDeferrer.cpp:
+ (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
+ * page/PageGroupLoadDeferrer.h:
+
+ Don't pass a Reason anymore as WillDeferLoading is used by default:
+ * page/Chrome.cpp:
+ (WebCore::Chrome::runModal):
+ (WebCore::Chrome::runBeforeUnloadConfirmPanel):
+ (WebCore::Chrome::runJavaScriptAlert):
+ (WebCore::Chrome::runJavaScriptConfirm):
+ (WebCore::Chrome::runJavaScriptPrompt):
+ (WebCore::Chrome::shouldInterruptJavaScript):
+
2012-04-20 James Robinson <[email protected]>
[chromium] Plumb a compositor surface ready notification through to the threaded compositor
Modified: trunk/Source/WebCore/dom/ActiveDOMObject.h (114801 => 114802)
--- trunk/Source/WebCore/dom/ActiveDOMObject.h 2012-04-21 00:01:09 UTC (rev 114801)
+++ trunk/Source/WebCore/dom/ActiveDOMObject.h 2012-04-21 00:07:13 UTC (rev 114802)
@@ -53,7 +53,7 @@
// to stop the object. Exact semantics of suspend is up to the object then.
enum ReasonForSuspension {
_javascript_DebuggerPaused,
- WillShowDialog,
+ WillDeferLoading,
DocumentWillBecomeInactive,
PageWillBeSuspended
};
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (114801 => 114802)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2012-04-21 00:01:09 UTC (rev 114801)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2012-04-21 00:07:13 UTC (rev 114802)
@@ -3719,7 +3719,7 @@
break;
case PageWillBeSuspended:
case _javascript_DebuggerPaused:
- case WillShowDialog:
+ case WillDeferLoading:
// Do nothing, we don't pause media playback in these cases.
break;
}
Modified: trunk/Source/WebCore/page/Chrome.cpp (114801 => 114802)
--- trunk/Source/WebCore/page/Chrome.cpp 2012-04-21 00:01:09 UTC (rev 114801)
+++ trunk/Source/WebCore/page/Chrome.cpp 2012-04-21 00:07:13 UTC (rev 114802)
@@ -227,7 +227,7 @@
{
// Defer callbacks in all the other pages in this group, so we don't try to run _javascript_
// in a way that could interact with this view.
- PageGroupLoadDeferrer deferrer(m_page, false, ActiveDOMObject::WillShowDialog);
+ PageGroupLoadDeferrer deferrer(m_page, false);
TimerBase::fireTimersInNestedEventLoop();
m_client->runModal();
@@ -287,7 +287,7 @@
{
// Defer loads in case the client method runs a new event loop that would
// otherwise cause the load to continue while we're in the middle of executing _javascript_.
- PageGroupLoadDeferrer deferrer(m_page, true, ActiveDOMObject::WillShowDialog);
+ PageGroupLoadDeferrer deferrer(m_page, true);
return m_client->runBeforeUnloadConfirmPanel(message, frame);
}
@@ -304,7 +304,7 @@
// Defer loads in case the client method runs a new event loop that would
// otherwise cause the load to continue while we're in the middle of executing _javascript_.
- PageGroupLoadDeferrer deferrer(m_page, true, ActiveDOMObject::WillShowDialog);
+ PageGroupLoadDeferrer deferrer(m_page, true);
ASSERT(frame);
m_client->runJavaScriptAlert(frame, frame->displayStringModifiedByEncoding(message));
@@ -317,7 +317,7 @@
// Defer loads in case the client method runs a new event loop that would
// otherwise cause the load to continue while we're in the middle of executing _javascript_.
- PageGroupLoadDeferrer deferrer(m_page, true, ActiveDOMObject::WillShowDialog);
+ PageGroupLoadDeferrer deferrer(m_page, true);
ASSERT(frame);
return m_client->runJavaScriptConfirm(frame, frame->displayStringModifiedByEncoding(message));
@@ -330,7 +330,7 @@
// Defer loads in case the client method runs a new event loop that would
// otherwise cause the load to continue while we're in the middle of executing _javascript_.
- PageGroupLoadDeferrer deferrer(m_page, true, ActiveDOMObject::WillShowDialog);
+ PageGroupLoadDeferrer deferrer(m_page, true);
ASSERT(frame);
bool ok = m_client->runJavaScriptPrompt(frame, frame->displayStringModifiedByEncoding(prompt), frame->displayStringModifiedByEncoding(defaultValue), result);
@@ -351,7 +351,7 @@
{
// Defer loads in case the client method runs a new event loop that would
// otherwise cause the load to continue while we're in the middle of executing _javascript_.
- PageGroupLoadDeferrer deferrer(m_page, true, ActiveDOMObject::WillShowDialog);
+ PageGroupLoadDeferrer deferrer(m_page, true);
return m_client->shouldInterruptJavaScript();
}
Modified: trunk/Source/WebCore/page/PageGroupLoadDeferrer.cpp (114801 => 114802)
--- trunk/Source/WebCore/page/PageGroupLoadDeferrer.cpp 2012-04-21 00:01:09 UTC (rev 114801)
+++ trunk/Source/WebCore/page/PageGroupLoadDeferrer.cpp 2012-04-21 00:07:13 UTC (rev 114802)
@@ -33,7 +33,7 @@
using namespace std;
-PageGroupLoadDeferrer::PageGroupLoadDeferrer(Page* page, bool deferSelf, ActiveDOMObject::ReasonForSuspension reason)
+PageGroupLoadDeferrer::PageGroupLoadDeferrer(Page* page, bool deferSelf)
{
const HashSet<Page*>& pages = page->group().pages();
@@ -47,7 +47,7 @@
// This code is not logically part of load deferring, but we do not want JS code executed beneath modal
// windows or sheets, which is exactly when PageGroupLoadDeferrer is used.
for (Frame* frame = otherPage->mainFrame(); frame; frame = frame->tree()->traverseNext())
- frame->document()->suspendScheduledTasks(reason);
+ frame->document()->suspendScheduledTasks(ActiveDOMObject::WillDeferLoading);
}
}
}
Modified: trunk/Source/WebCore/page/PageGroupLoadDeferrer.h (114801 => 114802)
--- trunk/Source/WebCore/page/PageGroupLoadDeferrer.h 2012-04-21 00:01:09 UTC (rev 114801)
+++ trunk/Source/WebCore/page/PageGroupLoadDeferrer.h 2012-04-21 00:07:13 UTC (rev 114802)
@@ -20,7 +20,6 @@
#ifndef PageGroupLoadDeferrer_h
#define PageGroupLoadDeferrer_h
-#include "ActiveDOMObject.h"
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
@@ -32,7 +31,7 @@
class PageGroupLoadDeferrer {
WTF_MAKE_NONCOPYABLE(PageGroupLoadDeferrer);
public:
- PageGroupLoadDeferrer(Page*, bool deferSelf, ActiveDOMObject::ReasonForSuspension);
+ PageGroupLoadDeferrer(Page*, bool deferSelf);
~PageGroupLoadDeferrer();
private:
Modified: trunk/Source/WebKit/blackberry/Api/WebPageGroupLoadDeferrer.cpp (114801 => 114802)
--- trunk/Source/WebKit/blackberry/Api/WebPageGroupLoadDeferrer.cpp 2012-04-21 00:01:09 UTC (rev 114801)
+++ trunk/Source/WebKit/blackberry/Api/WebPageGroupLoadDeferrer.cpp 2012-04-21 00:07:13 UTC (rev 114802)
@@ -29,7 +29,7 @@
WebPageGroupLoadDeferrer::WebPageGroupLoadDeferrer(WebPage* webPage)
{
WebCore::TimerBase::fireTimersInNestedEventLoop();
- m_pageGroupLoadDeferrer = new WebCore::PageGroupLoadDeferrer(webPage->d->m_page, true /* defer the page itself */, WebCore::ActiveDOMObject::WillShowDialog);
+ m_pageGroupLoadDeferrer = new WebCore::PageGroupLoadDeferrer(webPage->d->m_page, true /* defer the page itself */);
}
WebPageGroupLoadDeferrer::~WebPageGroupLoadDeferrer()
Modified: trunk/Source/WebKit/blackberry/ChangeLog (114801 => 114802)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-04-21 00:01:09 UTC (rev 114801)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-04-21 00:07:13 UTC (rev 114802)
@@ -1,5 +1,22 @@
2012-04-20 Brady Eidson <[email protected]>
+ https://bugs.webkit.org/show_bug.cgi?id=84512
+ Repurpose ActiveDOMObject::WillShowDialog to WillDeferLoading
+
+ Reviewed by Eric Carlson.
+
+ PageGroupLoadDeferrer's don't take a ReasonForSuspension argument anymore;
+ They just use WillDeferLoading by default.
+
+ * Api/WebPageGroupLoadDeferrer.cpp:
+ (BlackBerry::WebKit::WebPageGroupLoadDeferrer::WebPageGroupLoadDeferrer):
+
+ * WebCoreSupport/ChromeClientBlackBerry.cpp:
+ (WebCore::ChromeClientBlackBerry::createWindow):
+ (WebCore::ChromeClientBlackBerry::runOpenPanel):
+
+2012-04-20 Brady Eidson <[email protected]>
+
https://bugs.webkit.org/show_bug.cgi?id=84490
PageGroupLoadDeferrer needs to take a ReasonForSuspension argument
Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp (114801 => 114802)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp 2012-04-21 00:01:09 UTC (rev 114801)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp 2012-04-21 00:07:13 UTC (rev 114802)
@@ -216,7 +216,7 @@
return 0;
#endif
- PageGroupLoadDeferrer deferrer(m_webPagePrivate->m_page, true, ActiveDOMObject::WillShowDialog);
+ PageGroupLoadDeferrer deferrer(m_webPagePrivate->m_page, true);
TimerBase::fireTimersInNestedEventLoop();
int x = features.xSet ? features.x : 0;
@@ -490,7 +490,7 @@
unsigned int chosenFileSize;
{
- PageGroupLoadDeferrer deferrer(m_webPagePrivate->m_page, true, ActiveDOMObject::WillShowDialog);
+ PageGroupLoadDeferrer deferrer(m_webPagePrivate->m_page, true);
TimerBase::fireTimersInNestedEventLoop();
// FIXME: Use chooser->settings().acceptMIMETypes instead of WebString() for the second parameter.
Modified: trunk/Source/WebKit/chromium/ChangeLog (114801 => 114802)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-04-21 00:01:09 UTC (rev 114801)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-04-21 00:07:13 UTC (rev 114802)
@@ -1,3 +1,16 @@
+2012-04-20 Brady Eidson <[email protected]>
+
+ https://bugs.webkit.org/show_bug.cgi?id=84512
+ Repurpose ActiveDOMObject::WillShowDialog to WillDeferLoading
+
+ Reviewed by Eric Carlson.
+
+ PageGroupLoadDeferrer's don't take a ReasonForSuspension argument anymore;
+ They just use WillDeferLoading by default.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebView::willEnterModalLoop):
+
2012-04-20 James Robinson <[email protected]>
[chromium] Plumb a compositor surface ready notification through to the threaded compositor
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (114801 => 114802)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2012-04-21 00:01:09 UTC (rev 114801)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2012-04-21 00:07:13 UTC (rev 114802)
@@ -279,7 +279,7 @@
pageGroupLoadDeferrerStack().append(static_cast<PageGroupLoadDeferrer*>(0));
else {
// Pick any page in the page group since we are deferring all pages.
- pageGroupLoadDeferrerStack().append(new PageGroupLoadDeferrer(*pageGroup->pages().begin(), true, ActiveDOMObject::WillShowDialog));
+ pageGroupLoadDeferrerStack().append(new PageGroupLoadDeferrer(*pageGroup->pages().begin(), true));
}
}