Title: [210187] releases/WebKitGTK/webkit-2.14/Source
- Revision
- 210187
- Author
- [email protected]
- Date
- 2016-12-28 01:24:22 -0800 (Wed, 28 Dec 2016)
Log Message
Merge r206132 - Suppress _javascript_ prompts early on in certain cases
https://bugs.webkit.org/show_bug.cgi?id=162243
rdar://problem/27661602
Reviewed by Geoffrey Garen.
Source/WebCore:
Export symbols needed by WebKit2.
* loader/FrameLoader.h:
* loader/FrameLoaderStateMachine.h:
Source/WebKit2:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::shouldSuppressJavaScriptDialogs):
Add helper function.
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
Call helper function and return early if we should supress dialogs.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog (210186 => 210187)
--- releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog 2016-12-28 09:14:46 UTC (rev 210186)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog 2016-12-28 09:24:22 UTC (rev 210187)
@@ -1,3 +1,16 @@
+2016-09-19 Anders Carlsson <[email protected]>
+
+ Suppress _javascript_ prompts early on in certain cases
+ https://bugs.webkit.org/show_bug.cgi?id=162243
+ rdar://problem/27661602
+
+ Reviewed by Geoffrey Garen.
+
+ Export symbols needed by WebKit2.
+
+ * loader/FrameLoader.h:
+ * loader/FrameLoaderStateMachine.h:
+
2016-08-30 Youenn Fablet <[email protected]>
[Fetch API] Blob not found URL should result in a network error
Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/loader/FrameLoader.h (210186 => 210187)
--- releases/WebKitGTK/webkit-2.14/Source/WebCore/loader/FrameLoader.h 2016-12-28 09:14:46 UTC (rev 210186)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/loader/FrameLoader.h 2016-12-28 09:24:22 UTC (rev 210187)
@@ -230,7 +230,7 @@
bool checkIfFormActionAllowedByCSP(const URL&, bool didReceiveRedirectResponse) const;
- Frame* opener();
+ WEBCORE_EXPORT Frame* opener();
WEBCORE_EXPORT void setOpener(Frame*);
void resetMultipleFormSubmissionProtection();
Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/loader/FrameLoaderStateMachine.h (210186 => 210187)
--- releases/WebKitGTK/webkit-2.14/Source/WebCore/loader/FrameLoaderStateMachine.h 2016-12-28 09:14:46 UTC (rev 210186)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/loader/FrameLoaderStateMachine.h 2016-12-28 09:24:22 UTC (rev 210187)
@@ -55,7 +55,7 @@
WEBCORE_EXPORT bool committingFirstRealLoad() const;
bool committedFirstRealDocumentLoad() const;
bool creatingInitialEmptyDocument() const;
- bool isDisplayingInitialEmptyDocument() const;
+ WEBCORE_EXPORT bool isDisplayingInitialEmptyDocument() const;
WEBCORE_EXPORT bool firstLayoutDone() const;
void advanceTo(State);
Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog (210186 => 210187)
--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog 2016-12-28 09:14:46 UTC (rev 210186)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog 2016-12-28 09:24:22 UTC (rev 210187)
@@ -1,3 +1,20 @@
+2016-09-19 Anders Carlsson <[email protected]>
+
+ Suppress _javascript_ prompts early on in certain cases
+ https://bugs.webkit.org/show_bug.cgi?id=162243
+ rdar://problem/27661602
+
+ Reviewed by Geoffrey Garen.
+
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ (WebKit::shouldSuppressJavaScriptDialogs):
+ Add helper function.
+
+ (WebKit::WebChromeClient::runJavaScriptAlert):
+ (WebKit::WebChromeClient::runJavaScriptConfirm):
+ (WebKit::WebChromeClient::runJavaScriptPrompt):
+ Call helper function and return early if we should supress dialogs.
+
2016-12-08 Tomas Popela <[email protected]>
[GTK] Process accelerated compositing env variables only if they are really enabled
Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (210186 => 210187)
--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2016-12-28 09:14:46 UTC (rev 210186)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2016-12-28 09:24:22 UTC (rev 210187)
@@ -379,8 +379,19 @@
m_page->sendClose();
}
+static bool shouldSuppressJavaScriptDialogs(Frame& frame)
+{
+ if (frame.loader().opener() && frame.loader().stateMachine().isDisplayingInitialEmptyDocument() && frame.loader().provisionalDocumentLoader())
+ return true;
+
+ return false;
+}
+
void WebChromeClient::runJavaScriptAlert(Frame* frame, const String& alertText)
{
+ if (shouldSuppressJavaScriptDialogs(*frame))
+ return;
+
WebFrame* webFrame = WebFrame::fromCoreFrame(*frame);
ASSERT(webFrame);
@@ -394,6 +405,9 @@
bool WebChromeClient::runJavaScriptConfirm(Frame* frame, const String& message)
{
+ if (shouldSuppressJavaScriptDialogs(*frame))
+ return false;
+
WebFrame* webFrame = WebFrame::fromCoreFrame(*frame);
ASSERT(webFrame);
@@ -411,6 +425,9 @@
bool WebChromeClient::runJavaScriptPrompt(Frame* frame, const String& message, const String& defaultValue, String& result)
{
+ if (shouldSuppressJavaScriptDialogs(*frame))
+ return false;
+
WebFrame* webFrame = WebFrame::fromCoreFrame(*frame);
ASSERT(webFrame);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes