Bug 176769 - Dragging & dropping a file creates an attachment element even when it's disabled
Summary: Dragging & dropping a file creates an attachment element even when it's disabled
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: InRadar
Depends on:
Blocks: 170449
  Show dependency treegraph
 
Reported: 2017-09-12 00:28 PDT by Ryosuke Niwa
Modified: 2020-03-17 20:12 PDT (History)
8 users (show)

See Also:


Attachments
Patch (58.46 KB, patch)
2017-09-12 00:54 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Fixed tests (60.94 KB, patch)
2017-09-12 01:58 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews123 for ios-simulator-wk2 (1.31 MB, application/zip)
2017-09-12 03:48 PDT, Build Bot
no flags Details
Patch for landing (62.51 KB, patch)
2017-09-12 14:22 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2017-09-12 00:28:00 PDT
When dragging & dropping a file, we end up creating an attachment element even when the feature is disabled by settings.
We also expose HTMLAttachmentElement in the global object even when this feature is enabled at runtime.

Fix all these issues by replacing the settings by a runtime flag.
Comment 1 Ryosuke Niwa 2017-09-12 00:54:01 PDT
Created attachment 320527 [details]
Patch
Comment 2 Ryosuke Niwa 2017-09-12 01:58:19 PDT
Created attachment 320529 [details]
Fixed tests
Comment 3 Build Bot 2017-09-12 03:48:47 PDT
Comment on attachment 320529 [details]
Fixed tests

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

New failing tests:
fast/attachment/attachment-select-on-click.html
accessibility/ios-simulator/attributed-string-for-range.html
Comment 4 Build Bot 2017-09-12 03:48:48 PDT
Created attachment 320533 [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.12.5
Comment 5 Tim Horton 2017-09-12 09:45:14 PDT
Comment on attachment 320529 [details]
Fixed tests

View in context: https://bugs.webkit.org/attachment.cgi?id=320529&action=review

Woo! Thank you for fixing this :) It has haunted the back of my mind for years.

> Source/WebCore/ChangeLog:12
> +        To fix the bug that HTMLAttachElement is always exposed on the global object even when it's disabled

HTMLAttachmentElement.
Comment 6 Ryosuke Niwa 2017-09-12 14:22:23 PDT
Created attachment 320566 [details]
Patch for landing
Comment 7 Ryosuke Niwa 2017-09-12 14:23:30 PDT
Comment on attachment 320566 [details]
Patch for landing

Wait for EWS.
Comment 8 WebKit Commit Bot 2017-09-12 16:31:18 PDT
Comment on attachment 320566 [details]
Patch for landing

Clearing flags on attachment: 320566

Committed r221944: <http://trac.webkit.org/changeset/221944>
Comment 9 WebKit Commit Bot 2017-09-12 16:31:20 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2017-09-27 12:33:34 PDT
<rdar://problem/34693484>