Index: Source/web/ChromeClientImpl.cpp |
diff --git a/Source/web/ChromeClientImpl.cpp b/Source/web/ChromeClientImpl.cpp |
index 999d3b396ce895bb3f439cc95e406050d2b63427..ea26ec9f2ec09089a481ad6ca133b5db7cd476ef 100644 |
--- a/Source/web/ChromeClientImpl.cpp |
+++ b/Source/web/ChromeClientImpl.cpp |
@@ -399,6 +399,8 @@ bool ChromeClientImpl::canRunBeforeUnloadConfirmPanel() |
bool ChromeClientImpl::runBeforeUnloadConfirmPanel(const String& message, Frame* frame) |
{ |
if (m_webView->client()) { |
+ if (frame->loader()->stateMachine()->isDisplayingInitialEmptyDocument()) |
+ frame->loader()->forceNotifyForInitialDocumentAccess(); |
return m_webView->client()->runModalBeforeUnloadDialog( |
WebFrameImpl::fromFrame(frame), message); |
} |
@@ -424,6 +426,8 @@ void ChromeClientImpl::runJavaScriptAlert(Frame* frame, const String& message) |
if (m_webView->client()) { |
if (WebUserGestureIndicator::isProcessingUserGesture()) |
WebUserGestureIndicator::currentUserGestureToken().setJavascriptPrompt(); |
+ if (frame->loader()->stateMachine()->isDisplayingInitialEmptyDocument()) |
+ frame->loader()->forceNotifyForInitialDocumentAccess(); |
m_webView->client()->runModalAlertDialog( |
WebFrameImpl::fromFrame(frame), message); |
} |
@@ -435,6 +439,8 @@ bool ChromeClientImpl::runJavaScriptConfirm(Frame* frame, const String& message) |
if (m_webView->client()) { |
if (WebUserGestureIndicator::isProcessingUserGesture()) |
WebUserGestureIndicator::currentUserGestureToken().setJavascriptPrompt(); |
+ if (frame->loader()->stateMachine()->isDisplayingInitialEmptyDocument()) |
+ frame->loader()->forceNotifyForInitialDocumentAccess(); |
return m_webView->client()->runModalConfirmDialog( |
WebFrameImpl::fromFrame(frame), message); |
} |
@@ -450,6 +456,8 @@ bool ChromeClientImpl::runJavaScriptPrompt(Frame* frame, |
if (m_webView->client()) { |
if (WebUserGestureIndicator::isProcessingUserGesture()) |
WebUserGestureIndicator::currentUserGestureToken().setJavascriptPrompt(); |
+ if (frame->loader()->stateMachine()->isDisplayingInitialEmptyDocument()) |
darin (slow to review)
2013/09/03 23:21:45
It kind of sucks to repeat the stateMachine condit
Charlie Reis
2013/09/04 00:01:10
Fair point. I ended up putting it second in the i
|
+ frame->loader()->forceNotifyForInitialDocumentAccess(); |
WebString actualValue; |
bool ok = m_webView->client()->runModalPromptDialog( |
WebFrameImpl::fromFrame(frame), |