Changeset 29432 in webkit
- Timestamp:
- Jan 12, 2008, 4:03:28 AM (17 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r29430 r29432 1 2008-01-12 Adam Barth <hk9565@gmail.com> 2 3 Reviewed by Maciej (and also tweaked a little bit). 4 5 - more thorough fix for some crashing tests 6 http://bugs.webkit.org/show_bug.cgi?id=16782 7 8 * loader/FrameLoader.cpp: 9 (WebCore::FrameLoader::urlSelected): 10 (WebCore::FrameLoader::submitForm): 11 (WebCore::FrameLoader::executeIfJavaScriptURL): 12 * loader/FrameLoader.h: 13 1 14 2008-01-12 Maciej Stachowiak <mjs@apple.com> 2 15 -
trunk/WebCore/loader/FrameLoader.cpp
r29421 r29432 377 377 ResourceRequest request(url, referrer, policy); 378 378 379 if (executeIfJavaScriptURL(request.url(), userGesture)) 380 return; 381 379 382 urlSelected(request, "_self", 0, lockHistory, userGesture); 380 383 } … … 382 385 void FrameLoader::urlSelected(const ResourceRequest& request, const String& _target, Event* triggeringEvent, bool lockHistory, bool userGesture) 383 386 { 384 if (executeIfJavaScriptURL(request.url(), userGesture ))387 if (executeIfJavaScriptURL(request.url(), userGesture, false)) 385 388 return; 386 389 … … 502 505 if (urlString.startsWith("javascript:", false)) { 503 506 m_isExecutingJavaScriptFormAction = true; 504 executeIfJavaScriptURL(u );507 executeIfJavaScriptURL(u, false, false); 505 508 m_isExecutingJavaScriptFormAction = false; 506 509 return; … … 711 714 } 712 715 713 bool FrameLoader::executeIfJavaScriptURL(const KURL& url, bool userGesture )716 bool FrameLoader::executeIfJavaScriptURL(const KURL& url, bool userGesture, bool replaceDocument) 714 717 { 715 718 if (!url.deprecatedString().startsWith("javascript:", false)) … … 727 730 currentSecurityOrigin = m_frame->document()->securityOrigin(); 728 731 729 begin(m_URL, true, currentSecurityOrigin); 730 write(scriptResult); 731 end(); 732 // FIXME: We should always replace the document, but doing so 733 // synchronously can cause crashes: 734 // http://bugs.webkit.org/show_bug.cgi?id=16782 735 if (replaceDocument) { 736 begin(m_URL, true, currentSecurityOrigin); 737 write(scriptResult); 738 end(); 739 } 732 740 733 741 return true; -
trunk/WebCore/loader/FrameLoader.h
r29416 r29432 321 321 322 322 // Returns true if url is a JavaScript URL. 323 bool executeIfJavaScriptURL(const KURL& url, bool userGesture = false );323 bool executeIfJavaScriptURL(const KURL& url, bool userGesture = false, bool replaceDocument = true); 324 324 325 325 KJS::JSValue* executeScript(const String& url, int baseLine, const String& script);
Note:
See TracChangeset
for help on using the changeset viewer.