Diff
Modified: trunk/LayoutTests/ChangeLog (186231 => 186232)
--- trunk/LayoutTests/ChangeLog 2015-07-02 19:27:24 UTC (rev 186231)
+++ trunk/LayoutTests/ChangeLog 2015-07-02 20:19:36 UTC (rev 186232)
@@ -1,5 +1,14 @@
2015-07-02 Brady Eidson <beid...@apple.com>
+ Add preference to disable all http-equiv.
+ <rdar://problem/9091261> and https://bugs.webkit.org/show_bug.cgi?id=146553
+
+ Reviewed by Sam Weinig.
+
+ * loader/meta-refresh-disabled.html:
+
+2015-07-02 Brady Eidson <beid...@apple.com>
+
[Content Extensions] Block synchronous XMLHTTPRequest.
<rdar://problem/21573006> and https://bugs.webkit.org/show_bug.cgi?id=146271
Modified: trunk/LayoutTests/loader/meta-refresh-disabled.html (186231 => 186232)
--- trunk/LayoutTests/loader/meta-refresh-disabled.html 2015-07-02 19:27:24 UTC (rev 186231)
+++ trunk/LayoutTests/loader/meta-refresh-disabled.html 2015-07-02 20:19:36 UTC (rev 186232)
@@ -1,7 +1,7 @@
<head>
<script>
if (window.testRunner) {
- testRunner.overridePreference("WebKitMetaRefreshEnabled", "0");
+ testRunner.overridePreference("WebKitHTTPEquivEnabled", "0");
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
Modified: trunk/Source/WebCore/ChangeLog (186231 => 186232)
--- trunk/Source/WebCore/ChangeLog 2015-07-02 19:27:24 UTC (rev 186231)
+++ trunk/Source/WebCore/ChangeLog 2015-07-02 20:19:36 UTC (rev 186232)
@@ -1,3 +1,16 @@
+2015-07-02 Brady Eidson <beid...@apple.com>
+
+ Add preference to disable all http-equiv.
+ <rdar://problem/9091261> and https://bugs.webkit.org/show_bug.cgi?id=146553
+
+ Reviewed by Sam Weinig.
+
+ No new tests (Covered by existing test)
+
+ * dom/Document.cpp:
+ (WebCore::Document::processHttpEquiv):
+ * page/Settings.in:
+
2015-07-02 Youenn Fablet <youenn.fab...@crf.canon.fr>
[Streams API] Remove ReadableStreamController.enqueue() custom binding
Modified: trunk/Source/WebCore/dom/Document.cpp (186231 => 186232)
--- trunk/Source/WebCore/dom/Document.cpp 2015-07-02 19:27:24 UTC (rev 186231)
+++ trunk/Source/WebCore/dom/Document.cpp 2015-07-02 20:19:36 UTC (rev 186232)
@@ -3023,6 +3023,9 @@
{
ASSERT(!equiv.isNull() && !content.isNull());
+ if (page() && !page()->settings().httpEquivEnabled())
+ return;
+
Frame* frame = this->frame();
HTTPHeaderName headerName;
@@ -3043,9 +3046,6 @@
break;
case HTTPHeaderName::Refresh: {
- if (page() && !page()->settings().metaRefreshEnabled())
- break;
-
double delay;
String urlString;
if (frame && parseHTTPRefresh(content, true, delay, urlString)) {
Modified: trunk/Source/WebCore/page/Settings.in (186231 => 186232)
--- trunk/Source/WebCore/page/Settings.in 2015-07-02 19:27:24 UTC (rev 186231)
+++ trunk/Source/WebCore/page/Settings.in 2015-07-02 20:19:36 UTC (rev 186232)
@@ -242,4 +242,4 @@
newBlockInsideInlineModelEnabled initial=false, setNeedsStyleRecalcInAllFrames=1
-metaRefreshEnabled initial=true
+httpEquivEnabled initial=true
Modified: trunk/Source/WebKit/mac/ChangeLog (186231 => 186232)
--- trunk/Source/WebKit/mac/ChangeLog 2015-07-02 19:27:24 UTC (rev 186231)
+++ trunk/Source/WebKit/mac/ChangeLog 2015-07-02 20:19:36 UTC (rev 186232)
@@ -1,3 +1,25 @@
+2015-07-02 Brady Eidson <beid...@apple.com>
+
+ Add preference to disable all http-equiv.
+ <rdar://problem/9091261> and https://bugs.webkit.org/show_bug.cgi?id=146553
+
+ Reviewed by Sam Weinig.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences setMetaRefreshEnabled:]): Still expose this SPI, but have it affect
+ the "httpEquivEnabled" setting.
+ (-[WebPreferences metaRefreshEnabled]): Ditto.
+ (-[WebPreferences setHTTPEquivEnabled:]):
+ (-[WebPreferences httpEquivEnabled]):
+ * WebView/WebPreferencesPrivate.h:
+
+ * WebView/WebView.mm:
+ (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
+ (-[WebView _preferencesChanged:]):
+
2015-07-02 Timothy Horton <timothy_hor...@apple.com>
iOS WebKitLegacy should match WebKit2's viewport behavior
Modified: trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (186231 => 186232)
--- trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h 2015-07-02 19:27:24 UTC (rev 186231)
+++ trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h 2015-07-02 20:19:36 UTC (rev 186232)
@@ -173,7 +173,7 @@
#define WebKitDebugFullPageZoomPreferenceKey @"WebKitDebugFullPageZoomPreferenceKey"
#define WebKitMinimumZoomFontSizePreferenceKey @"WebKitMinimumZoomFontSizePreferenceKey"
#define WebKitAntialiasedFontDilationEnabledKey @"AntialiasedFontDilationEnabled"
-#define WebKitMetaRefreshEnabledPreferenceKey @"WebKitMetaRefreshEnabled"
+#define WebKitHTTPEquivEnabledPreferenceKey @"WebKitHTTPEquivEnabled"
#if TARGET_OS_IPHONE
#define WebKitStandalonePreferenceKey @"WebKitStandalonePreferenceKey"
Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (186231 => 186232)
--- trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2015-07-02 19:27:24 UTC (rev 186231)
+++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2015-07-02 20:19:36 UTC (rev 186232)
@@ -443,7 +443,8 @@
#endif
[NSNumber numberWithBool:YES], WebKitPluginsEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitDatabasesEnabledPreferenceKey,
- [NSNumber numberWithBool:YES], WebKitMetaRefreshEnabledPreferenceKey,
+ [NSNumber numberWithBool:YES], WebKitHTTPEquivEnabledPreferenceKey,
+
#if PLATFORM(IOS)
[NSNumber numberWithBool:NO], WebKitStorageTrackerEnabledPreferenceKey,
#endif
@@ -2538,14 +2539,24 @@
- (void)setMetaRefreshEnabled:(BOOL)enabled
{
- [self _setBoolValue:enabled forKey:WebKitMetaRefreshEnabledPreferenceKey];
+ [self setHTTPEquivEnabled:enabled];
}
- (BOOL)metaRefreshEnabled
{
- return [self _boolValueForKey:WebKitMetaRefreshEnabledPreferenceKey];
+ return [self metaRefreshEnabled];
}
+- (void)setHTTPEquivEnabled:(BOOL)enabled
+{
+ [self _setBoolValue:enabled forKey:WebKitHTTPEquivEnabledPreferenceKey];
+}
+
+- (BOOL)httpEquivEnabled
+{
+ return [self _boolValueForKey:WebKitHTTPEquivEnabledPreferenceKey];
+}
+
- (BOOL)_javascript_MarkupEnabled
{
return [self _boolValueForKey:WebKitJavaScriptMarkupEnabledPreferenceKey];
Modified: trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (186231 => 186232)
--- trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h 2015-07-02 19:27:24 UTC (rev 186231)
+++ trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h 2015-07-02 20:19:36 UTC (rev 186232)
@@ -448,6 +448,9 @@
- (void)setMetaRefreshEnabled:(BOOL)flag;
- (BOOL)metaRefreshEnabled;
+- (void)setHTTPEquivEnabled:(BOOL)flag;
+- (BOOL)httpEquivEnabled;
+
@property (nonatomic) BOOL _javascript_MarkupEnabled;
#if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED < 80000
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (186231 => 186232)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2015-07-02 19:27:24 UTC (rev 186231)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2015-07-02 20:19:36 UTC (rev 186232)
@@ -1233,7 +1233,7 @@
_private->page->settings().setMinimumFontSize([_private->preferences minimumFontSize]);
// This is a workaround for <rdar://problem/21309911>.
- _private->page->settings().setMetaRefreshEnabled([_private->preferences metaRefreshEnabled]);
+ _private->page->settings().setHTTPEquivEnabled([_private->preferences httpEquivEnabled]);
_private->page->setGroupName(groupName);
@@ -2327,7 +2327,7 @@
}
settings.setPlugInSnapshottingEnabled([preferences plugInSnapshottingEnabled]);
- settings.setMetaRefreshEnabled([preferences metaRefreshEnabled]);
+ settings.setHttpEquivEnabled([preferences httpEquivEnabled]);
settings.setFixedPositionCreatesStackingContext(true);
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
Modified: trunk/Source/WebKit2/ChangeLog (186231 => 186232)
--- trunk/Source/WebKit2/ChangeLog 2015-07-02 19:27:24 UTC (rev 186231)
+++ trunk/Source/WebKit2/ChangeLog 2015-07-02 20:19:36 UTC (rev 186232)
@@ -1,3 +1,26 @@
+2015-07-02 Brady Eidson <beid...@apple.com>
+
+ Add preference to disable all http-equiv.
+ <rdar://problem/9091261> and https://bugs.webkit.org/show_bug.cgi?id=146553
+
+ Reviewed by Sam Weinig.
+
+ * Shared/WebPreferencesDefinitions.h:
+
+ * UIProcess/API/C/WKPreferences.cpp:
+ (WKPreferencesSetMetaRefreshEnabled): Still expose this SPI, but have it affect
+ the "httpEquivEnabled" setting.
+ (WKPreferencesGetMetaRefreshEnabled): Ditto
+ (WKPreferencesSetHTTPEquivEnabled):
+ (WKPreferencesGetHTTPEquivEnabled):
+ * UIProcess/API/C/WKPreferencesRefPrivate.h:
+
+ * WebProcess/InjectedBundle/InjectedBundle.cpp:
+ (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+
2015-07-02 Mark Lam <mark....@apple.com>
WKWebView evaluateJavaScript:completionHandler: should reuse its JSContext instance.
Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (186231 => 186232)
--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2015-07-02 19:27:24 UTC (rev 186231)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2015-07-02 20:19:36 UTC (rev 186232)
@@ -199,7 +199,7 @@
macro(LongMousePressEnabled, longMousePressEnabled, Bool, bool, false) \
macro(NewBlockInsideInlineModelEnabled, newBlockInsideInlineModelEnabled, Bool, bool, false) \
macro(AntialiasedFontDilationEnabled, antialiasedFontDilationEnabled, Bool, bool, false) \
- macro(MetaRefreshEnabled, metaRefreshEnabled, Bool, bool, true) \
+ macro(HTTPEquivEnabled, httpEquivEnabled, Bool, bool, true) \
#define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
macro(IncrementalRenderingSuppressionTimeout, incrementalRenderingSuppressionTimeout, Double, double, 5) \
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (186231 => 186232)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2015-07-02 19:27:24 UTC (rev 186231)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2015-07-02 20:19:36 UTC (rev 186232)
@@ -1359,14 +1359,24 @@
void WKPreferencesSetMetaRefreshEnabled(WKPreferencesRef preferencesRef, bool enabled)
{
- toImpl(preferencesRef)->setMetaRefreshEnabled(enabled);
+ toImpl(preferencesRef)->setHTTPEquivEnabled(enabled);
}
bool WKPreferencesGetMetaRefreshEnabled(WKPreferencesRef preferencesRef)
{
- return toImpl(preferencesRef)->metaRefreshEnabled();
+ return toImpl(preferencesRef)->httpEquivEnabled();
}
+void WKPreferencesSetHTTPEquivEnabled(WKPreferencesRef preferencesRef, bool enabled)
+{
+ toImpl(preferencesRef)->setHTTPEquivEnabled(enabled);
+}
+
+bool WKPreferencesGetHTTPEquivEnabled(WKPreferencesRef preferencesRef)
+{
+ return toImpl(preferencesRef)->httpEquivEnabled();
+}
+
void WKPreferencesSetAllowsAirPlayForMediaPlayback(WKPreferencesRef preferencesRef, bool enabled)
{
toImpl(preferencesRef)->setAllowsAirPlayForMediaPlayback(enabled);
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h (186231 => 186232)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h 2015-07-02 19:27:24 UTC (rev 186231)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h 2015-07-02 20:19:36 UTC (rev 186232)
@@ -373,6 +373,10 @@
WK_EXPORT void WKPreferencesSetMetaRefreshEnabled(WKPreferencesRef preferences, bool enabled);
WK_EXPORT bool WKPreferencesGetMetaRefreshEnabled(WKPreferencesRef preferences);
+// Defaults to true.
+WK_EXPORT void WKPreferencesSetHTTPEquivEnabled(WKPreferencesRef preferences, bool enabled);
+WK_EXPORT bool WKPreferencesGetHTTPEquivEnabled(WKPreferencesRef preferences);
+
#ifdef __cplusplus
}
#endif
Modified: trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.h (186231 => 186232)
--- trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.h 2015-07-02 19:27:24 UTC (rev 186231)
+++ trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.h 2015-07-02 20:19:36 UTC (rev 186232)
@@ -74,7 +74,7 @@
static void cloneSessionData(WebPageProxy& sourcePage, WebPageProxy& newPage);
void fetchData(WebsiteDataTypes, std::function<void (Vector<WebsiteDataRecord>)> completionHandler);
- void removeData(WebsiteDataTypes, std::chrono::system_clock::time_point modifiedSince, std::function<void ()> completionHandler);
+// void removeData(WebsiteDataTypes, std::chrono::system_clock::time_point modifiedSince, std::function<void ()> completionHandler);
void removeData(WebsiteDataTypes, const Vector<WebsiteDataRecord>&, std::function<void ()> completionHandler);
StorageManager* storageManager() { return m_storageManager.get(); }
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (186231 => 186232)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp 2015-07-02 19:27:24 UTC (rev 186231)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp 2015-07-02 20:19:36 UTC (rev 186232)
@@ -207,7 +207,7 @@
macro(WebKitEnableCaretBrowsing, CaretBrowsingEnabled, caretBrowsingEnabled) \
macro(WebKitDisplayImagesKey, LoadsImagesAutomatically, loadsImagesAutomatically) \
macro(WebKitMediaStreamEnabled, MediaStreamEnabled, mediaStreamEnabled) \
- macro(WebKitMetaRefreshEnabled, MetaRefreshEnabled, metaRefreshEnabled)
+ macro(WebKitHTTPEquivEnabled, HttpEquivEnabled, httpEquivEnabled)
#define OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(TestRunnerName, SettingsName, WebPreferencesName) \
if (preference == #TestRunnerName) { \
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (186231 => 186232)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2015-07-02 19:27:24 UTC (rev 186231)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2015-07-02 20:19:36 UTC (rev 186232)
@@ -2784,7 +2784,7 @@
settings.setInteractiveFormValidationEnabled(store.getBoolValueForKey(WebPreferencesKey::interactiveFormValidationEnabledKey()));
settings.setSpatialNavigationEnabled(store.getBoolValueForKey(WebPreferencesKey::spatialNavigationEnabledKey()));
- settings.setMetaRefreshEnabled(store.getBoolValueForKey(WebPreferencesKey::metaRefreshEnabledKey()));
+ settings.setHttpEquivEnabled(store.getBoolValueForKey(WebPreferencesKey::httpEquivEnabledKey()));
DatabaseManager::singleton().setIsAvailable(store.getBoolValueForKey(WebPreferencesKey::databasesEnabledKey()));