Bug 176769

Summary: Dragging & dropping a file creates an attachment element even when it's disabled
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, cdumez, commit-queue, darin, enrica, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=209210
Bug Depends on:    
Bug Blocks: 170449    
Attachments:
Description Flags
Patch
none
Fixed tests
none
Archive of layout-test-results from ews123 for ios-simulator-wk2
none
Patch for landing none

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>