<attachment> should be a runtime-enabled feature
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Mar 2016 01:09:17 +0000 (01:09 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Mar 2016 01:09:17 +0000 (01:09 +0000)
commitd3c6da4abe1a40847bf95d55fa89594fae317c55
tree5528d5dbfe6adada278ed266c2b04f8ea1f4d8ad
parent602a09cb4c9451adfca12224e935ac7190e03261
<attachment> should be a runtime-enabled feature
https://bugs.webkit.org/show_bug.cgi?id=155413
<rdar://problem/25120753>

Reviewed by Sam Weinig and Anders Carlsson.

Source/WebKit/mac:

Add an internal setting on WebPreferences
to enable the <attachment> element support.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences attachmentElementEnabled]):
(-[WebPreferences setAttachmentElementEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

Add an internal setting on WKWebViewConfiguration
to enable the <attachment> element support.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _attachmentElementEnabled]):
(-[WKWebViewConfiguration _setAttachmentElementEnabled:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

LayoutTests:

Now that <attachment> is disabled by default, use an
internal setting to turn them back on test by test.

* fast/attachment/attachment-default-icon-expected.html:
* fast/attachment/attachment-default-icon.html:
* fast/attachment/attachment-disabled-dom.html:
* fast/attachment/attachment-disabled-rendering.html:
* fast/attachment/attachment-dom.html:
* fast/attachment/attachment-folder-icon-expected.html:
* fast/attachment/attachment-folder-icon.html:
* fast/attachment/attachment-icon-from-file-extension-expected.html:
* fast/attachment/attachment-icon-from-file-extension.html:
* fast/attachment/attachment-label-highlight.html:
* fast/attachment/attachment-progress.html:
* fast/attachment/attachment-rendering.html:
* fast/attachment/attachment-select-on-click-inside-user-select-all.html:
* fast/attachment/attachment-select-on-click.html:
* fast/attachment/attachment-subtitle.html:
* fast/attachment/attachment-title.html:
* fast/attachment/attachment-type-attribute-expected.html:
* fast/attachment/attachment-type-attribute.html:
* editing/pasteboard/copy-paste-attachment.html:
* editing/pasteboard/drag-and-drop-attachment-contenteditable.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/pasteboard/copy-paste-attachment.html
LayoutTests/editing/pasteboard/drag-and-drop-attachment-contenteditable.html
LayoutTests/fast/attachment/attachment-default-icon-expected.html
LayoutTests/fast/attachment/attachment-default-icon.html
LayoutTests/fast/attachment/attachment-disabled-dom.html
LayoutTests/fast/attachment/attachment-disabled-rendering.html
LayoutTests/fast/attachment/attachment-dom.html
LayoutTests/fast/attachment/attachment-folder-icon-expected.html
LayoutTests/fast/attachment/attachment-folder-icon.html
LayoutTests/fast/attachment/attachment-icon-from-file-extension-expected.html
LayoutTests/fast/attachment/attachment-icon-from-file-extension.html
LayoutTests/fast/attachment/attachment-label-highlight.html
LayoutTests/fast/attachment/attachment-progress.html
LayoutTests/fast/attachment/attachment-rendering.html
LayoutTests/fast/attachment/attachment-select-on-click-inside-user-select-all.html
LayoutTests/fast/attachment/attachment-select-on-click.html
LayoutTests/fast/attachment/attachment-subtitle.html
LayoutTests/fast/attachment/attachment-title.html
LayoutTests/fast/attachment/attachment-type-attribute-expected.html
LayoutTests/fast/attachment/attachment-type-attribute.html
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebPreferencesPrivate.h
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPreferencesDefinitions.h
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp