WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
178267
Clicks on Link with download attribute causes all (other) links to trigger download when clicked
https://bugs.webkit.org/show_bug.cgi?id=178267
Summary
Clicks on Link with download attribute causes all (other) links to trigger do...
Jonas Ohlsson Aden
Reported
2017-10-13 10:30:03 PDT
Minimal reproducible test case here:
https://codepen.io/pocketjoso/pen/QqVOWy
I can reproduce on: Safari 11.0 (12604.1.38.1.7) macOS Sierra (10.12.6) It does not happen in other browsers; I am not aware whether it happened in earlier Safari versions.
Attachments
WIP Patch
(3.42 KB, patch)
2017-10-13 14:22 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
WIP Patch
(5.96 KB, patch)
2017-10-13 16:43 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews102 for mac-elcapitan
(1.81 MB, application/zip)
2017-10-13 17:45 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews107 for mac-elcapitan-wk2
(1.40 MB, application/zip)
2017-10-13 18:09 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews115 for mac-elcapitan
(2.02 MB, application/zip)
2017-10-13 18:44 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews121 for ios-simulator-wk2
(7.37 MB, application/zip)
2017-10-13 19:34 PDT
,
Build Bot
no flags
Details
Patch
(17.08 KB, patch)
2017-10-15 11:28 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-10-13 13:54:49 PDT
<
rdar://problem/34985016
>
Chris Dumez
Comment 2
2017-10-13 14:07:12 PDT
In WebPageProxy.cpp: #if ENABLE(DOWNLOAD_ATTRIBUTE) if (m_syncNavigationActionHasDownloadAttribute && action == PolicyAction::Use) action = PolicyAction::Download; #endif m_syncNavigationActionHasDownloadAttribute likely does not get reset.
Chris Dumez
Comment 3
2017-10-13 14:22:33 PDT
Created
attachment 323749
[details]
WIP Patch
Chris Dumez
Comment 4
2017-10-13 16:43:42 PDT
Created
attachment 323770
[details]
WIP Patch
Build Bot
Comment 5
2017-10-13 16:46:31 PDT
Attachment 323770
[details]
did not pass style-queue: ERROR: Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:1362: Should have a space between // and comment [whitespace/comments] [4] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 6
2017-10-13 17:45:40 PDT
Comment on
attachment 323770
[details]
WIP Patch
Attachment 323770
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/4852456
New failing tests: http/tests/download/anchor-load-after-download.html
Build Bot
Comment 7
2017-10-13 17:45:41 PDT
Created
attachment 323781
[details]
Archive of layout-test-results from ews102 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 8
2017-10-13 18:09:06 PDT
Comment on
attachment 323770
[details]
WIP Patch
Attachment 323770
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/4852623
New failing tests: imported/w3c/web-platform-tests/html/browsers/windows/noreferrer-window-name.html
Build Bot
Comment 9
2017-10-13 18:09:08 PDT
Created
attachment 323782
[details]
Archive of layout-test-results from ews107 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 10
2017-10-13 18:44:44 PDT
Comment on
attachment 323770
[details]
WIP Patch
Attachment 323770
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/4852749
New failing tests: http/tests/download/anchor-load-after-download.html
Build Bot
Comment 11
2017-10-13 18:44:45 PDT
Created
attachment 323786
[details]
Archive of layout-test-results from ews115 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 12
2017-10-13 19:34:05 PDT
Comment on
attachment 323770
[details]
WIP Patch
Attachment 323770
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/4852995
New failing tests: http/tests/download/anchor-load-after-download.html
Build Bot
Comment 13
2017-10-13 19:34:07 PDT
Created
attachment 323791
[details]
Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
Chris Dumez
Comment 14
2017-10-15 11:28:30 PDT
Created
attachment 323844
[details]
Patch
Sam Weinig
Comment 15
2017-10-15 14:43:34 PDT
Comment on
attachment 323844
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=323844&action=review
> Source/WebKit/UIProcess/API/APINavigation.h:73 > + bool m_shouldForceDownload { false };
I'm not sure the should is getting you much here. Maybe, just forceDownload?
Chris Dumez
Comment 16
2017-10-15 15:06:24 PDT
(In reply to Sam Weinig from
comment #15
)
> Comment on
attachment 323844
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=323844&action=review
> > > Source/WebKit/UIProcess/API/APINavigation.h:73 > > + bool m_shouldForceDownload { false }; > > I'm not sure the should is getting you much here. Maybe, just forceDownload?
I thought this was part of our coding style for Booleans. I personally like it better with the should prefix too.
Darin Adler
Comment 17
2017-10-15 17:52:59 PDT
Comment on
attachment 323844
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=323844&action=review
>>> Source/WebKit/UIProcess/API/APINavigation.h:73 >>> + bool m_shouldForceDownload { false }; >> >> I'm not sure the should is getting you much here. Maybe, just forceDownload? > > I thought this was part of our coding style for Booleans. I personally like it better with the should prefix too.
The rule is inspired by Cocoa; it’s to help make sure that getters don’t sound like verb phrases. A function called “force download” doesn’t necessarily sound like a getter to everyone. I like the way the "should" decreases ambiguity in the function name. And I also like booleans that work as a sentence "navigation should force download" as opposed to "navigation force download".
> LayoutTests/imported/w3c/ChangeLog:13 > + * web-platform-tests/html/browsers/windows/noreferrer-window-name-expected.txt:
Do these tests that rely things that have to time out slow down test runs overall, or is there some reason they don’t?
Chris Dumez
Comment 18
2017-10-16 09:31:07 PDT
Comment on
attachment 323844
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=323844&action=review
>> LayoutTests/imported/w3c/ChangeLog:13 >> + * web-platform-tests/html/browsers/windows/noreferrer-window-name-expected.txt: > > Do these tests that rely things that have to time out slow down test runs overall, or is there some reason they don’t?
No, I don't think these tests rely on such things. We are timing out on some of them but those are likely bugs in our implementation that I need to investigate.
WebKit Commit Bot
Comment 19
2017-10-16 09:59:51 PDT
Comment on
attachment 323844
[details]
Patch Clearing flags on attachment: 323844 Committed
r223413
: <
https://trac.webkit.org/changeset/223413
>
WebKit Commit Bot
Comment 20
2017-10-16 09:59:53 PDT
All reviewed patches have been landed. Closing bug.
Jonas Ohlsson Aden
Comment 21
2017-10-16 10:26:07 PDT
Thanks for the work on this! When (in what version) in Safari can I expect to see this fixed?
Chris Dumez
Comment 22
2017-10-16 10:30:24 PDT
(In reply to Jonas Ohlsson Aden from
comment #21
)
> Thanks for the work on this! When (in what version) in Safari can I expect > to see this fixed?
No problem, thank you for the bug report. Apple does not communicate when a particular fix will ship to customers. I suggest validating the fix using the next release of Safari Technology Preview.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug