Add API to disable meta refreshes.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 May 2015 18:19:58 +0000 (18:19 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 May 2015 18:19:58 +0000 (18:19 +0000)
commitd6cd77c80285598789d2ea5d42a08106caa195fe
treed12a2318fe03bcdb23a796e21c4047b62545fd43
parent9c3f67961592020d98cae319bd3c7c09a63fcf69
Add API to disable meta refreshes.
<rdar://problem/20333198> and https://bugs.webkit.org/show_bug.cgi?id=144269

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Test: loader/meta-refresh-disabled.html

* dom/Document.cpp:
(WebCore::Document::processHttpEquiv): Bail early if Settings have meta refreshes disabled.
* page/Settings.in:

Source/WebKit/mac:

Add a preference to enable/disable meta refreshes, enabled by default.

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

Source/WebKit2:

Add a preference to enable/disable meta refreshes, enabled by default.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetMetaRefreshEnabled):
(WKPreferencesGetMetaRefreshEnabled):
(WKPreferencesGetIgnoreViewportScalingConstraints): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues): Reset the meta refresh pref between tests.

LayoutTests:

* loader/meta-refresh-disabled-expected.txt: Added.
* loader/meta-refresh-disabled.html: Added.
* loader/resources/notify-done.html: Added.
* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
LayoutTests/ChangeLog
LayoutTests/loader/meta-refresh-disabled-expected.txt [new file with mode: 0644]
LayoutTests/loader/meta-refresh-disabled.html [new file with mode: 0644]
LayoutTests/loader/resources/notify-done.html [new file with mode: 0644]
LayoutTests/platform/win/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/page/Settings.in
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/C/WKPreferences.cpp
Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm