Bug 184209

Summary: REGRESSION (r229133): decidePolicyForNavigationAction not called for loading an HTML string
Product: WebKit Reporter: mitz
Component: WebKit APIAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, cdumez, commit-queue, dbates, ews-watchlist, japhet, rniwa, webkit-bug-importer
Priority: P1 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=184210
Bug Depends on:    
Bug Blocks: 183225, 184848    
Attachments:
Description Flags
Test program
none
Test program
none
Patch
ews-watchlist: commit-queue-
Archive of layout-test-results from ews107 for mac-sierra-wk2
none
Archive of layout-test-results from ews124 for ios-simulator-wk2
none
WIP patch
none
Archive of layout-test-results from ews100 for mac-sierra
none
Archive of layout-test-results from ews104 for mac-sierra-wk2
none
Archive of layout-test-results from ews114 for mac-sierra
none
Archive of layout-test-results from ews123 for ios-simulator-wk2
none
Archive of layout-test-results from ews202 for win-future
none
Patch
none
Archive of layout-test-results from ews101 for mac-sierra
none
Archive of layout-test-results from ews104 for mac-sierra-wk2
none
Patch none

Description mitz 2018-03-31 00:24:08 PDT
Created attachment 336920 [details]
Test program

In TOT (r230119), the policy delegate method -webView:decidePolicyForNavigationAction:decisionHandler: isn’t called for a navigation initiated with -loadHTMLString:baseURL:. In the shipping WebKit as of macOS 10.13.4, it does get called.

To reproduce: build and run the attached TestDecidePolicyForNavigationAction. Note that when running with TOT webkit, the initial content loads without the “Decide Policy For Navigation Action” sheet being presented. When running with built-in WebKit in macOS 10.13.4, the sheet does appear.
Comment 1 mitz 2018-03-31 00:27:20 PDT
Ignore the attachment I’ve uploaded. I’ll upload the right one in a moment.
Comment 2 mitz 2018-03-31 00:27:55 PDT
Created attachment 336921 [details]
Test program
Comment 3 Radar WebKit Bug Importer 2018-04-03 10:32:48 PDT
<rdar://problem/39145306>
Comment 4 Chris Dumez 2018-04-18 09:50:17 PDT
This is a regression from https://trac.webkit.org/changeset/229133 where we stopped doing navigation policy checks for about:blank.
Comment 5 Chris Dumez 2018-04-18 10:40:28 PDT
Created attachment 338225 [details]
Patch
Comment 6 EWS Watchlist 2018-04-18 11:50:08 PDT
Comment on attachment 338225 [details]
Patch

Attachment 338225 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/7360075

New failing tests:
webarchive/loading/javascript-url-iframe-crash.html
Comment 7 EWS Watchlist 2018-04-18 11:50:09 PDT
Created attachment 338235 [details]
Archive of layout-test-results from ews107 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 8 EWS Watchlist 2018-04-18 12:14:19 PDT
Comment on attachment 338225 [details]
Patch

Attachment 338225 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/7360112

New failing tests:
webarchive/loading/javascript-url-iframe-crash.html
Comment 9 EWS Watchlist 2018-04-18 12:14:21 PDT
Created attachment 338240 [details]
Archive of layout-test-results from ews124 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews124  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.4
Comment 10 Chris Dumez 2018-04-18 15:21:34 PDT
Created attachment 338268 [details]
WIP patch
Comment 11 EWS Watchlist 2018-04-18 16:24:17 PDT
Comment on attachment 338268 [details]
WIP patch

Attachment 338268 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/7363645

New failing tests:
fast/loader/policy-delegate-action-hit-test-zoomed.html
Comment 12 EWS Watchlist 2018-04-18 16:24:19 PDT
Created attachment 338274 [details]
Archive of layout-test-results from ews100 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 13 EWS Watchlist 2018-04-18 16:28:44 PDT
Comment on attachment 338268 [details]
WIP patch

Attachment 338268 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/7363657

New failing tests:
fast/events/beforeunload-alert-user-interaction2.html
http/tests/security/contentSecurityPolicy/plugin-blocked-in-about-blank-window.html
webarchive/loading/javascript-url-iframe-crash.html
fast/events/beforeunload-alert.html
http/tests/security/contentSecurityPolicy/image-blocked-in-about-blank-window.html
fast/loader/policy-delegate-action-hit-test-zoomed.html
Comment 14 EWS Watchlist 2018-04-18 16:28:47 PDT
Created attachment 338277 [details]
Archive of layout-test-results from ews104 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 15 EWS Watchlist 2018-04-18 16:57:01 PDT
Comment on attachment 338268 [details]
WIP patch

Attachment 338268 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/7363710

New failing tests:
fast/loader/policy-delegate-action-hit-test-zoomed.html
Comment 16 EWS Watchlist 2018-04-18 16:57:03 PDT
Created attachment 338280 [details]
Archive of layout-test-results from ews114 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 17 EWS Watchlist 2018-04-18 17:04:01 PDT
Comment on attachment 338268 [details]
WIP patch

Attachment 338268 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/7364196

New failing tests:
fast/events/beforeunload-alert-user-interaction2.html
webarchive/loading/javascript-url-iframe-crash.html
fast/events/beforeunload-alert.html
fast/scrolling/scroll-to-focused-element-asynchronously.html
http/tests/security/contentSecurityPolicy/image-blocked-in-about-blank-window.html
Comment 18 EWS Watchlist 2018-04-18 17:04:04 PDT
Created attachment 338283 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.4
Comment 19 EWS Watchlist 2018-04-18 17:12:51 PDT
Comment on attachment 338268 [details]
WIP patch

Attachment 338268 [details] did not pass win-ews (win):
Output: http://webkit-queues.webkit.org/results/7364166

New failing tests:
fast/loader/policy-delegate-action-hit-test-zoomed.html
Comment 20 EWS Watchlist 2018-04-18 17:13:02 PDT
Created attachment 338284 [details]
Archive of layout-test-results from ews202 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews202  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 21 Chris Dumez 2018-04-18 19:37:12 PDT
Created attachment 338297 [details]
Patch
Comment 22 EWS Watchlist 2018-04-18 20:41:22 PDT
Comment on attachment 338297 [details]
Patch

Attachment 338297 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/7366296

New failing tests:
fast/loader/policy-delegate-action-hit-test-zoomed.html
Comment 23 EWS Watchlist 2018-04-18 20:41:23 PDT
Created attachment 338301 [details]
Archive of layout-test-results from ews101 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 24 EWS Watchlist 2018-04-18 20:45:55 PDT
Comment on attachment 338297 [details]
Patch

Attachment 338297 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/7366302

New failing tests:
fast/loader/policy-delegate-action-hit-test-zoomed.html
fast/loader/iframe-src-invalid-url.html
loader/navigation-policy/should-open-external-urls/subframe-click-target-top.html
loader/navigation-policy/should-open-external-urls/subframe-click-target-self.html
Comment 25 EWS Watchlist 2018-04-18 20:45:56 PDT
Created attachment 338302 [details]
Archive of layout-test-results from ews104 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 26 Chris Dumez 2018-04-18 20:49:52 PDT
Created attachment 338303 [details]
Patch
Comment 27 WebKit Commit Bot 2018-04-19 13:57:58 PDT
Comment on attachment 338303 [details]
Patch

Clearing flags on attachment: 338303

Committed r230818: <https://trac.webkit.org/changeset/230818>
Comment 28 WebKit Commit Bot 2018-04-19 13:58:00 PDT
All reviewed patches have been landed.  Closing bug.