Changeset 206132 in webkit
- Timestamp:
- Sep 19, 2016, 4:46:59 PM (9 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r206131 r206132 1 2016-09-19 Anders Carlsson <andersca@apple.com> 2 3 Suppress JavaScript prompts early on in certain cases 4 https://bugs.webkit.org/show_bug.cgi?id=162243 5 rdar://problem/27661602 6 7 Reviewed by Geoffrey Garen. 8 9 Export symbols needed by WebKit2. 10 11 * loader/FrameLoader.h: 12 * loader/FrameLoaderStateMachine.h: 13 1 14 2016-09-19 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/Source/WebCore/loader/FrameLoader.h
r206006 r206132 232 232 bool checkIfFormActionAllowedByCSP(const URL&, bool didReceiveRedirectResponse) const; 233 233 234 Frame* opener();234 WEBCORE_EXPORT Frame* opener(); 235 235 WEBCORE_EXPORT void setOpener(Frame*); 236 236 -
trunk/Source/WebCore/loader/FrameLoaderStateMachine.h
r186894 r206132 56 56 bool committedFirstRealDocumentLoad() const; 57 57 bool creatingInitialEmptyDocument() const; 58 bool isDisplayingInitialEmptyDocument() const;58 WEBCORE_EXPORT bool isDisplayingInitialEmptyDocument() const; 59 59 WEBCORE_EXPORT bool firstLayoutDone() const; 60 60 void advanceTo(State); -
trunk/Source/WebKit2/ChangeLog
r206123 r206132 1 2016-09-19 Anders Carlsson <andersca@apple.com> 2 3 Suppress JavaScript prompts early on in certain cases 4 https://bugs.webkit.org/show_bug.cgi?id=162243 5 rdar://problem/27661602 6 7 Reviewed by Geoffrey Garen. 8 9 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 10 (WebKit::shouldSuppressJavaScriptDialogs): 11 Add helper function. 12 13 (WebKit::WebChromeClient::runJavaScriptAlert): 14 (WebKit::WebChromeClient::runJavaScriptConfirm): 15 (WebKit::WebChromeClient::runJavaScriptPrompt): 16 Call helper function and return early if we should supress dialogs. 17 1 18 2016-09-19 Keith Rollin <krollin@apple.com> 2 19 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
r205537 r206132 380 380 } 381 381 382 static bool shouldSuppressJavaScriptDialogs(Frame& frame) 383 { 384 if (frame.loader().opener() && frame.loader().stateMachine().isDisplayingInitialEmptyDocument() && frame.loader().provisionalDocumentLoader()) 385 return true; 386 387 return false; 388 } 389 382 390 void WebChromeClient::runJavaScriptAlert(Frame* frame, const String& alertText) 383 391 { 392 if (shouldSuppressJavaScriptDialogs(*frame)) 393 return; 394 384 395 WebFrame* webFrame = WebFrame::fromCoreFrame(*frame); 385 396 ASSERT(webFrame); … … 395 406 bool WebChromeClient::runJavaScriptConfirm(Frame* frame, const String& message) 396 407 { 408 if (shouldSuppressJavaScriptDialogs(*frame)) 409 return false; 410 397 411 WebFrame* webFrame = WebFrame::fromCoreFrame(*frame); 398 412 ASSERT(webFrame); … … 412 426 bool WebChromeClient::runJavaScriptPrompt(Frame* frame, const String& message, const String& defaultValue, String& result) 413 427 { 428 if (shouldSuppressJavaScriptDialogs(*frame)) 429 return false; 430 414 431 WebFrame* webFrame = WebFrame::fromCoreFrame(*frame); 415 432 ASSERT(webFrame);
Note:
See TracChangeset
for help on using the changeset viewer.