Changeset 191460 in webkit
- Timestamp:
- Oct 22, 2015 11:36:01 AM (9 years ago)
- Location:
- branches/safari-601.1.46-branch/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-601.1.46-branch/Source/WebCore/ChangeLog
r191459 r191460 1 2015-10-20 Matthew Hanson <matthew_hanson@apple.com> 2 3 Merge r191223. rdar://problem/22900764 4 5 2015-10-16 Alex Christensen <achristensen@webkit.org> 6 7 Disabled content blockers should not block any loads 8 https://bugs.webkit.org/show_bug.cgi?id=150261 9 10 Reviewed by Brady Eidson. 11 12 This fix was tested manually by reloading without content blockers 13 on websites with iframes and content blockers that block the contents of the iframes. 14 15 * page/UserContentController.cpp: 16 (WebCore::UserContentController::removeAllUserContentExtensions): 17 (WebCore::contentExtensionsEnabled): 18 (WebCore::UserContentController::processContentExtensionRulesForLoad): 19 (WebCore::UserContentController::actionsForResourceLoad): 20 Check the DocumentLoader of the main frame when checking if content extensions are disabled, 21 because that is the DocumentLoader that has the flag from reloading without content blockers. 22 1 23 2015-10-20 Matthew Hanson <matthew_hanson@apple.com> 2 24 -
branches/safari-601.1.46-branch/Source/WebCore/page/UserContentController.cpp
r191458 r191460 206 206 } 207 207 208 static bool contentExtensionsEnabled(const DocumentLoader& documentLoader) 209 { 210 if (auto frame = documentLoader.frame()) { 211 if (frame->isMainFrame()) 212 return documentLoader.userContentExtensionsEnabled(); 213 if (auto mainDocumentLoader = frame->mainFrame().loader().documentLoader()) 214 return mainDocumentLoader->userContentExtensionsEnabled(); 215 } 216 217 return true; 218 } 219 208 220 void UserContentController::processContentExtensionRulesForLoad(ResourceRequest& request, ResourceType resourceType, DocumentLoader& initiatingDocumentLoader) 209 221 { … … 211 223 return; 212 224 213 if (! initiatingDocumentLoader.userContentExtensionsEnabled())225 if (!contentExtensionsEnabled(initiatingDocumentLoader)) 214 226 return; 215 227 … … 222 234 return Vector<ContentExtensions::Action>(); 223 235 224 if (! initiatingDocumentLoader.userContentExtensionsEnabled())236 if (!contentExtensionsEnabled(initiatingDocumentLoader)) 225 237 return Vector<ContentExtensions::Action>(); 226 238
Note: See TracChangeset
for help on using the changeset viewer.