WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-184209-20180418104027.patch (text/plain), 3.92 KB, created by
Chris Dumez
on 2018-04-18 10:40:28 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Chris Dumez
Created:
2018-04-18 10:40:28 PDT
Size:
3.92 KB
patch
obsolete
>Subversion Revision: 230762 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 53299fa77031cb444b0089a0a9c2ec28c910c3e3..c6ca99e6a5c6d359f364484d664a970467136ddc 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2018-04-18 Chris Dumez <cdumez@apple.com> >+ >+ REGRESSION (r229133): decidePolicyForNavigationAction not called for loading an HTML string >+ https://bugs.webkit.org/show_bug.cgi?id=184209 >+ <rdar://problem/39145306> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ In r229133, we stopped doing navigation policy checks for about:blank because about:blank >+ loads need to happen synchronously for Web-compatibility. However, this regressed loading >+ an HTML string in a WebView because in such cases, the URL is also about:blank with >+ substitute data. To restore previous behavior, this patch restores policy checking whenever >+ there is substitute data. >+ >+ * loader/PolicyChecker.cpp: >+ (WebCore::PolicyChecker::checkNavigationPolicy): >+ > 2018-04-17 Zan Dobersek <zdobersek@igalia.com> > > [CMake] Add and enable the ENABLE_CSS_ANIMATIONS_LEVEL_2 feature define >diff --git a/Source/WebCore/loader/PolicyChecker.cpp b/Source/WebCore/loader/PolicyChecker.cpp >index 82d6f697861e4bf396c23f0589d4083f4b72e853..5ddec3851a4d273f4b137f69e3a6f01bb2aa0890 100644 >--- a/Source/WebCore/loader/PolicyChecker.cpp >+++ b/Source/WebCore/loader/PolicyChecker.cpp >@@ -123,7 +123,7 @@ void PolicyChecker::checkNavigationPolicy(ResourceRequest&& request, bool didRec > > loader->setLastCheckedRequest(ResourceRequest(request)); > >- if (request.url() == blankURL()) >+ if (request.url() == blankURL() && !substituteData.isValid()) > return function(WTFMove(request), formState, ShouldContinue::Yes); > > #if USE(QUICK_LOOK) >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index c1c65df7b1769d3fc4600769a633d45f873518cb..812f558b1b745350030ccbb23da4e120ebd7c2a6 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,16 @@ >+2018-04-18 Chris Dumez <cdumez@apple.com> >+ >+ REGRESSION (r229133): decidePolicyForNavigationAction not called for loading an HTML string >+ https://bugs.webkit.org/show_bug.cgi?id=184209 >+ <rdar://problem/39145306> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add API test coverage. >+ >+ * TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm: >+ (TEST): >+ > 2018-04-18 Yusuke Suzuki <utatane.tea@gmail.com> > > Unreviewed, reland r230697, r230720, and r230724. >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm >index 8b15e31f47d9da70817e3679e1e05869f9d483dd..31116aac213b579f7b6ffbab218708d60563547d 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm >@@ -285,6 +285,22 @@ TEST(WebKit, DecidePolicyForNavigationActionForTargetedHyperlink) > action = nullptr; > } > >+TEST(WebKit, DecidePolicyForNavigationActionForLoadHTMLString) >+{ >+ auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]); >+ >+ auto window = adoptNS([[NSWindow alloc] initWithContentRect:[webView frame] styleMask:NSWindowStyleMaskBorderless backing:NSBackingStoreBuffered defer:YES]); >+ [[window contentView] addSubview:webView.get()]; >+ >+ auto controller = adoptNS([[DecidePolicyForNavigationActionController alloc] init]); >+ [webView setNavigationDelegate:controller.get()]; >+ [webView setUIDelegate:controller.get()]; >+ >+ decidedPolicy = false; >+ [webView loadHTMLString:@"TEST" baseURL:[NSURL URLWithString:@"about:blank"]]; >+ TestWebKitAPI::Util::run(&decidedPolicy); >+} >+ > TEST(WebKit, DecidePolicyForNavigationActionForTargetedWindowOpen) > { > auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 184209
:
336920
|
336921
|
338225
|
338235
|
338240
|
338268
|
338274
|
338277
|
338280
|
338283
|
338284
|
338297
|
338301
|
338302
|
338303