Changeset 125714 in webkit
- Timestamp:
- Aug 15, 2012 3:07:46 PM (12 years ago)
- Location:
- trunk/Source/WebKit/blackberry
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/blackberry/ChangeLog
r125705 r125714 1 2012-08-15 Yong Li <yoli@rim.com> 2 3 [BlackBerry] Upstream FrameLoaderClientBlackBerry::securityOriginForNewDocument() 4 https://bugs.webkit.org/show_bug.cgi?id=94139 5 6 Reviewed by Antonio Gomes. 7 8 Keep same security origin when a file URL automatically redirects to its child folder. 9 This patch will be reverted when we finish the better solution. 10 PR# 172333 and PR# 180590. 11 12 * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: 13 (WebCore::FrameLoaderClientBlackBerry::FrameLoaderClientBlackBerry): 14 (WebCore::FrameLoaderClientBlackBerry::dispatchDidStartProvisionalLoad): 15 (WebCore::FrameLoaderClientBlackBerry::securityOriginForNewDocument): 16 (WebCore): 17 * WebCoreSupport/FrameLoaderClientBlackBerry.h: 18 (FrameLoaderClientBlackBerry): 19 1 20 2012-08-15 Yong Li <yoli@rim.com> 2 21 -
trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp
r125611 r125714 109 109 , m_hasSentResponseToPlugin(false) 110 110 , m_cancelLoadOnNextData(false) 111 , m_wasProvisionalLoadTriggeredByUserGesture(true) // To avoid affecting the first load. 111 112 { 112 113 } … … 505 506 if (m_webPagePrivate->m_dumpRenderTree) 506 507 m_webPagePrivate->m_dumpRenderTree->didStartProvisionalLoadForFrame(m_frame); 508 509 m_wasProvisionalLoadTriggeredByUserGesture = ScriptController::processingUserGesture(); 507 510 } 508 511 … … 1253 1256 } 1254 1257 1258 PassRefPtr<SecurityOrigin> FrameLoaderClientBlackBerry::securityOriginForNewDocument(const KURL& url) 1259 { 1260 // What we are trying to do here is to keep using the old path as origin when a file-based html page 1261 // changes its location to some html in a subfolder. This will allow some file-based html packages 1262 // to work smoothly even with security checks enabled. 1263 1264 RefPtr<SecurityOrigin> newSecurityOrigin = SecurityOrigin::create(url); 1265 1266 if (m_wasProvisionalLoadTriggeredByUserGesture || !url.isLocalFile()) 1267 return newSecurityOrigin; 1268 1269 RefPtr<SecurityOrigin> currentSecurityOrigin = m_frame->document()->securityOrigin(); 1270 if (currentSecurityOrigin && currentSecurityOrigin->containsInFolder(newSecurityOrigin.get())) 1271 return currentSecurityOrigin; 1272 1273 return newSecurityOrigin; 1274 } 1275 1255 1276 } // WebCore -
trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.h
r115926 r125714 171 171 virtual PassRefPtr<FrameNetworkingContext> createNetworkingContext(); 172 172 173 virtual PassRefPtr<SecurityOrigin> securityOriginForNewDocument(const KURL&); 174 173 175 void readyToRender(bool pageIsVisuallyNonEmpty); 174 176 … … 216 218 // Used to stop media files from loading because we don't need to have the entire file loaded by WebKit. 217 219 bool m_cancelLoadOnNextData; 220 221 bool m_wasProvisionalLoadTriggeredByUserGesture; 218 222 }; 219 223
Note: See TracChangeset
for help on using the changeset viewer.