Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 19746da205f16d836d7f1af9132fe63b2fadb4c1
      
https://github.com/WebKit/WebKit/commit/19746da205f16d836d7f1af9132fe63b2fadb4c1
  Author: Elijah Sawyers <[email protected]>
  Date:   2025-06-09 (Mon, 09 Jun 2025)

  Changed paths:
    M Source/WebCore/contentextensions/ContentExtensionsBackend.cpp
    M Source/WebCore/contentextensions/ContentRuleListResults.h
    M Source/WebCore/loader/FrameLoader.cpp
    M Source/WebCore/loader/LinkLoader.cpp
    M Source/WebCore/loader/ResourceLoader.cpp
    M Source/WebCore/loader/cache/CachedResourceLoader.cpp
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm

  Log Message:
  -----------
  dNR: high priority redirects don't beat low priority blocks
https://bugs.webkit.org/show_bug.cgi?id=294132
rdar://145241581

Reviewed by Timothy Hatcher.

This patch fixes a bug where a high priority dNR redirect rule wouldn't take
precendence over a lower priority block rule. This was happening because when
we process the content rules lists for a load, we'd cancel the request if it
was blocked. Blocking the request wasn't giving the redirect enough time to
take action.

The fix for this is to add a boolean to the actions list struct to indicate if
a redirect rule was encountered prior to a block rule. If that's the case, we
shouldn't cancel the request and allow the redirect to happen.

* Source/WebCore/contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):
* Source/WebCore/contentextensions/ContentRuleListResults.h:
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
* Source/WebCore/loader/LinkLoader.cpp:
(WebCore::LinkLoader::preconnectIfNeeded):
* Source/WebCore/loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequestInternal):
* Source/WebCore/loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:

Canonical link: https://commits.webkit.org/296000@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to