<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[185376] branches/safari-600.1.4.16-branch</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/185376">185376</a></dd>
<dt>Author</dt> <dd>bshafiei@apple.com</dd>
<dt>Date</dt> <dd>2015-06-09 13:23:45 -0700 (Tue, 09 Jun 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/183682">r183682</a>.  rdar://problem/21290700</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6001416branchLayoutTestsChangeLog">branches/safari-600.1.4.16-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari6001416branchLayoutTestsplatformwinTestExpectations">branches/safari-600.1.4.16-branch/LayoutTests/platform/win/TestExpectations</a></li>
<li><a href="#branchessafari6001416branchSourceWebCoreChangeLog">branches/safari-600.1.4.16-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari6001416branchSourceWebCoredomDocumentcpp">branches/safari-600.1.4.16-branch/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#branchessafari6001416branchSourceWebCorepageSettingsin">branches/safari-600.1.4.16-branch/Source/WebCore/page/Settings.in</a></li>
<li><a href="#branchessafari6001416branchSourceWebKitmacChangeLog">branches/safari-600.1.4.16-branch/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#branchessafari6001416branchSourceWebKitmacWebViewWebPreferenceKeysPrivateh">branches/safari-600.1.4.16-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h</a></li>
<li><a href="#branchessafari6001416branchSourceWebKitmacWebViewWebPreferencesmm">branches/safari-600.1.4.16-branch/Source/WebKit/mac/WebView/WebPreferences.mm</a></li>
<li><a href="#branchessafari6001416branchSourceWebKitmacWebViewWebPreferencesPrivateh">branches/safari-600.1.4.16-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h</a></li>
<li><a href="#branchessafari6001416branchSourceWebKitmacWebViewWebViewmm">branches/safari-600.1.4.16-branch/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#branchessafari6001416branchSourceWebKit2ChangeLog">branches/safari-600.1.4.16-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari6001416branchSourceWebKit2SharedWebPreferencesDefinitionsh">branches/safari-600.1.4.16-branch/Source/WebKit2/Shared/WebPreferencesDefinitions.h</a></li>
<li><a href="#branchessafari6001416branchSourceWebKit2UIProcessAPICWKPreferencescpp">branches/safari-600.1.4.16-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp</a></li>
<li><a href="#branchessafari6001416branchSourceWebKit2UIProcessAPICWKPreferencesRefPrivateh">branches/safari-600.1.4.16-branch/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h</a></li>
<li><a href="#branchessafari6001416branchSourceWebKit2WebProcessInjectedBundleInjectedBundlecpp">branches/safari-600.1.4.16-branch/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp</a></li>
<li><a href="#branchessafari6001416branchSourceWebKit2WebProcessWebPageWebPagecpp">branches/safari-600.1.4.16-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#branchessafari6001416branchToolsChangeLog">branches/safari-600.1.4.16-branch/Tools/ChangeLog</a></li>
<li><a href="#branchessafari6001416branchToolsDumpRenderTreemacDumpRenderTreemm">branches/safari-600.1.4.16-branch/Tools/DumpRenderTree/mac/DumpRenderTree.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari6001416branchLayoutTestsloadermetarefreshdisabledexpectedtxt">branches/safari-600.1.4.16-branch/LayoutTests/loader/meta-refresh-disabled-expected.txt</a></li>
<li><a href="#branchessafari6001416branchLayoutTestsloadermetarefreshdisabledhtml">branches/safari-600.1.4.16-branch/LayoutTests/loader/meta-refresh-disabled.html</a></li>
<li><a href="#branchessafari6001416branchLayoutTestsloaderresourcesnotifydonehtml">branches/safari-600.1.4.16-branch/LayoutTests/loader/resources/notify-done.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6001416branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/LayoutTests/ChangeLog (185375 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/LayoutTests/ChangeLog        2015-06-09 20:22:44 UTC (rev 185375)
+++ branches/safari-600.1.4.16-branch/LayoutTests/ChangeLog        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2015-06-08  Babak Shafiei  &lt;bshafiei@apple.com&gt;
+
+        Merge r183682.
+
+    2015-05-01  Brady Eidson  &lt;beidson@apple.com&gt;
+
+            Add API to disable meta refreshes.
+            &lt;rdar://problem/20333198&gt; and https://bugs.webkit.org/show_bug.cgi?id=144269
+
+            Reviewed by Alexey Proskuryakov.
+
+            * loader/meta-refresh-disabled-expected.txt: Added.
+            * loader/meta-refresh-disabled.html: Added.
+            * loader/resources/notify-done.html: Added.
+            * platform/win/TestExpectations:
+
</ins><span class="cx"> 2015-05-08  Babak Shafiei  &lt;bshafiei@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r183646.
</span></span></pre></div>
<a id="branchessafari6001416branchLayoutTestsloadermetarefreshdisabledexpectedtxtfromrev183682trunkLayoutTestsloadermetarefreshdisabledexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1.4.16-branch/LayoutTests/loader/meta-refresh-disabled-expected.txt (from rev 183682, trunk/LayoutTests/loader/meta-refresh-disabled-expected.txt) (0 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/LayoutTests/loader/meta-refresh-disabled-expected.txt                                (rev 0)
+++ branches/safari-600.1.4.16-branch/LayoutTests/loader/meta-refresh-disabled-expected.txt        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+This test makes sure the preference to disable meta refreshes works as expected.
+You should see this text when the test is done.
+If you do not see this text, and instead you see a blank page, then the redirect happened, which it should not have.
+
</ins></span></pre></div>
<a id="branchessafari6001416branchLayoutTestsloadermetarefreshdisabledhtmlfromrev183682trunkLayoutTestsloadermetarefreshdisabledhtml"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1.4.16-branch/LayoutTests/loader/meta-refresh-disabled.html (from rev 183682, trunk/LayoutTests/loader/meta-refresh-disabled.html) (0 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/LayoutTests/loader/meta-refresh-disabled.html                                (rev 0)
+++ branches/safari-600.1.4.16-branch/LayoutTests/loader/meta-refresh-disabled.html        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+&lt;head&gt;
+&lt;script&gt;
+if (window.testRunner) {
+    testRunner.overridePreference(&quot;WebKitMetaRefreshEnabled&quot;, &quot;0&quot;);
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+// This bizarre practice of continuously delaying notifyDone() by multiple 0-delay timers
+// is meant to work around a few 0-delays in the meta refresh process.
+// The refresh itself is on a timer, and then the policy delegate's reply might be on a timer.
+// The goal here is to give a successfully scheduled meta refresh long enough to occur,
+// but to not also wait an arbitrary amount of clock time before concluding the test.
+function notifyDoneDelayer(iteration)
+{
+    if (iteration == 10) {
+        if (window.testRunner)
+            testRunner.notifyDone();
+        else
+            document.body.innerHTML = &quot;This test can only be run under DRT/WKTR&quot;;
+        return;
+    }
+    
+    setTimeout(&quot;notifyDoneDelayer(&quot; + ++iteration + &quot;);&quot;, 0);
+}
+
+function loaded()
+{
+    setTimeout(&quot;notifyDoneDelayer(1);&quot;, 0);
+}
+
+&lt;/script&gt;
+&lt;meta http-equiv=&quot;refresh&quot; content=&quot;0;url=resources/notify-done.html&quot;&gt;    
+&lt;/head&gt;
+&lt;body onload=&quot;loaded();&quot;&gt;
+This test makes sure the preference to disable meta refreshes works as expected.&lt;br&gt;
+You should see this text when the test is done.&lt;br&gt;
+If you do not see this text, and instead you see a blank page, then the redirect happened, which it should not have.&lt;br&gt;
+&lt;/body&gt;
</ins></span></pre></div>
<a id="branchessafari6001416branchLayoutTestsloaderresourcesnotifydonehtmlfromrev183682trunkLayoutTestsloaderresourcesnotifydonehtml"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1.4.16-branch/LayoutTests/loader/resources/notify-done.html (from rev 183682, trunk/LayoutTests/loader/resources/notify-done.html) (0 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/LayoutTests/loader/resources/notify-done.html                                (rev 0)
+++ branches/safari-600.1.4.16-branch/LayoutTests/loader/resources/notify-done.html        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+&lt;script&gt;
+if (window.testRunner)
+    testRunner.notifyDone();
+&lt;/script&gt;
</ins></span></pre></div>
<a id="branchessafari6001416branchLayoutTestsplatformwinTestExpectations"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/LayoutTests/platform/win/TestExpectations (185375 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/LayoutTests/platform/win/TestExpectations        2015-06-09 20:22:44 UTC (rev 185375)
+++ branches/safari-600.1.4.16-branch/LayoutTests/platform/win/TestExpectations        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -2821,3 +2821,6 @@
</span><span class="cx"> webkit.org/b/72828 mathml/opentype/horizontal-munderover.html [ Failure ]
</span><span class="cx"> webkit.org/b/119038 mathml/presentation/mo-stretch.html [ Failure ]
</span><span class="cx"> webkit.org/b/119038 mathml/presentation/roots.xhtml [ Failure ]
</span><ins>+
+# Windows doesn't have API for disabling meta refresh
+loader/meta-refresh-disabled.html [ Skip ]
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branchessafari6001416branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/Source/WebCore/ChangeLog (185375 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/Source/WebCore/ChangeLog        2015-06-09 20:22:44 UTC (rev 185375)
+++ branches/safari-600.1.4.16-branch/Source/WebCore/ChangeLog        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-06-08  Babak Shafiei  &lt;bshafiei@apple.com&gt;
+
+        Merge r183682.
+
+    2015-05-01  Brady Eidson  &lt;beidson@apple.com&gt;
+
+            Add API to disable meta refreshes.
+            &lt;rdar://problem/20333198&gt; and https://bugs.webkit.org/show_bug.cgi?id=144269
+
+            Reviewed by Alexey Proskuryakov.
+
+            Test: loader/meta-refresh-disabled.html
+
+            * dom/Document.cpp:
+            (WebCore::Document::processHttpEquiv): Bail early if Settings have meta refreshes disabled.
+            * page/Settings.in:
+
</ins><span class="cx"> 2015-05-31  Babak Shafiei  &lt;bshafiei@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r185018.
</span></span></pre></div>
<a id="branchessafari6001416branchSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/Source/WebCore/dom/Document.cpp (185375 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/Source/WebCore/dom/Document.cpp        2015-06-09 20:22:44 UTC (rev 185375)
+++ branches/safari-600.1.4.16-branch/Source/WebCore/dom/Document.cpp        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -2827,6 +2827,9 @@
</span><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx">     case HTTPHeaderName::Refresh: {
</span><ins>+        if (page() &amp;&amp; !page()-&gt;settings().metaRefreshEnabled())
+            break;
+
</ins><span class="cx">         double delay;
</span><span class="cx">         String urlString;
</span><span class="cx">         if (frame &amp;&amp; parseHTTPRefresh(content, true, delay, urlString)) {
</span></span></pre></div>
<a id="branchessafari6001416branchSourceWebCorepageSettingsin"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/Source/WebCore/page/Settings.in (185375 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/Source/WebCore/page/Settings.in        2015-06-09 20:22:44 UTC (rev 185375)
+++ branches/safari-600.1.4.16-branch/Source/WebCore/page/Settings.in        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -229,3 +229,5 @@
</span><span class="cx"> # Allow clients to permit navigation to an invalid URL. Some apps may use invalid URLs
</span><span class="cx"> # as a means to pass data from the web-portion of their app to the native portion.
</span><span class="cx"> allowNavigationToInvalidURL initial=false
</span><ins>+
+metaRefreshEnabled initial=true
</ins></span></pre></div>
<a id="branchessafari6001416branchSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/Source/WebKit/mac/ChangeLog (185375 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/Source/WebKit/mac/ChangeLog        2015-06-09 20:22:44 UTC (rev 185375)
+++ branches/safari-600.1.4.16-branch/Source/WebKit/mac/ChangeLog        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2015-06-08  Babak Shafiei  &lt;bshafiei@apple.com&gt;
+
+        Merge r183682.
+
+    2015-05-01  Brady Eidson  &lt;beidson@apple.com&gt;
+
+            Add API to disable meta refreshes.
+            &lt;rdar://problem/20333198&gt; and https://bugs.webkit.org/show_bug.cgi?id=144269
+
+            Reviewed by Alexey Proskuryakov.
+
+            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:]):
+
</ins><span class="cx"> 2015-04-21  Lucas Forschler  &lt;lforschler@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r180110
</span></span></pre></div>
<a id="branchessafari6001416branchSourceWebKitmacWebViewWebPreferenceKeysPrivateh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (185375 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2015-06-09 20:22:44 UTC (rev 185375)
+++ branches/safari-600.1.4.16-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -177,6 +177,7 @@
</span><span class="cx"> #define WebKitDebugFullPageZoomPreferenceKey @&quot;WebKitDebugFullPageZoomPreferenceKey&quot;
</span><span class="cx"> 
</span><span class="cx"> #define WebKitMinimumZoomFontSizePreferenceKey @&quot;WebKitMinimumZoomFontSizePreferenceKey&quot;
</span><ins>+#define WebKitMetaRefreshEnabledPreferenceKey @&quot;WebKitMetaRefreshEnabled&quot;
</ins><span class="cx"> 
</span><span class="cx"> #if TARGET_OS_IPHONE
</span><span class="cx"> #define WebKitStandalonePreferenceKey @&quot;WebKitStandalonePreferenceKey&quot;
</span></span></pre></div>
<a id="branchessafari6001416branchSourceWebKitmacWebViewWebPreferencesmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/Source/WebKit/mac/WebView/WebPreferences.mm (185375 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/Source/WebKit/mac/WebView/WebPreferences.mm        2015-06-09 20:22:44 UTC (rev 185375)
+++ branches/safari-600.1.4.16-branch/Source/WebKit/mac/WebView/WebPreferences.mm        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -440,6 +440,7 @@
</span><span class="cx"> #endif
</span><span class="cx">         [NSNumber numberWithBool:YES],  WebKitPluginsEnabledPreferenceKey,
</span><span class="cx">         [NSNumber numberWithBool:YES],  WebKitDatabasesEnabledPreferenceKey,
</span><ins>+        [NSNumber numberWithBool:YES],  WebKitMetaRefreshEnabledPreferenceKey,
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">         [NSNumber numberWithBool:NO],   WebKitStorageTrackerEnabledPreferenceKey,
</span><span class="cx"> #endif
</span><span class="lines">@@ -2532,6 +2533,16 @@
</span><span class="cx">     [self _setBoolValue:enabled forKey:WebKitShouldConvertPositionStyleOnCopyPreferenceKey];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)setMetaRefreshEnabled:(BOOL)enabled
+{
+    [self _setBoolValue:enabled forKey:WebKitMetaRefreshEnabledPreferenceKey];
+}
+
+- (BOOL)metaRefreshEnabled
+{
+    return [self _boolValueForKey:WebKitMetaRefreshEnabledPreferenceKey];
+}
+
</ins><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> @implementation WebPreferences (WebInternal)
</span></span></pre></div>
<a id="branchessafari6001416branchSourceWebKitmacWebViewWebPreferencesPrivateh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (185375 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2015-06-09 20:22:44 UTC (rev 185375)
+++ branches/safari-600.1.4.16-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -435,6 +435,9 @@
</span><span class="cx"> - (void)setGamepadsEnabled:(BOOL)flag;
</span><span class="cx"> - (BOOL)gamepadsEnabled;
</span><span class="cx"> 
</span><ins>+- (void)setMetaRefreshEnabled:(BOOL)flag;
+- (BOOL)metaRefreshEnabled;
+
</ins><span class="cx"> #if TARGET_OS_IPHONE &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &lt; 80000
</span><span class="cx"> - (void)_setAllowCompositingLayerVisualDegradation:(BOOL)flag;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="branchessafari6001416branchSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/Source/WebKit/mac/WebView/WebView.mm (185375 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/Source/WebKit/mac/WebView/WebView.mm        2015-06-09 20:22:44 UTC (rev 185375)
+++ branches/safari-600.1.4.16-branch/Source/WebKit/mac/WebView/WebView.mm        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -2295,6 +2295,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     settings.setPlugInSnapshottingEnabled([preferences plugInSnapshottingEnabled]);
</span><ins>+    settings.setMetaRefreshEnabled([preferences metaRefreshEnabled]);
</ins><span class="cx"> 
</span><span class="cx">     settings.setFixedPositionCreatesStackingContext(true);
</span><span class="cx"> #if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 10100
</span></span></pre></div>
<a id="branchessafari6001416branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/Source/WebKit2/ChangeLog (185375 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/Source/WebKit2/ChangeLog        2015-06-09 20:22:44 UTC (rev 185375)
+++ branches/safari-600.1.4.16-branch/Source/WebKit2/ChangeLog        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2015-06-08  Babak Shafiei  &lt;bshafiei@apple.com&gt;
+
+        Merge r183682.
+
+    2015-05-01  Brady Eidson  &lt;beidson@apple.com&gt;
+
+            Add API to disable meta refreshes.
+            &lt;rdar://problem/20333198&gt; and https://bugs.webkit.org/show_bug.cgi?id=144269
+
+            Reviewed by Alexey Proskuryakov.
+
+            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):
+
</ins><span class="cx"> 2015-04-21  Lucas Forschler  &lt;lforschler@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r182162
</span></span></pre></div>
<a id="branchessafari6001416branchSourceWebKit2SharedWebPreferencesDefinitionsh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/Source/WebKit2/Shared/WebPreferencesDefinitions.h (185375 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2015-06-09 20:22:44 UTC (rev 185375)
+++ branches/safari-600.1.4.16-branch/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -211,6 +211,7 @@
</span><span class="cx">     macro(EnableInheritURIQueryComponent, enableInheritURIQueryComponent, Bool, bool, false) \
</span><span class="cx">     macro(ServiceControlsEnabled, serviceControlsEnabled, Bool, bool, false) \
</span><span class="cx">     macro(GamepadsEnabled, gamepadsEnabled, Bool, bool, false) \
</span><ins>+    macro(MetaRefreshEnabled, metaRefreshEnabled, Bool, bool, true) \
</ins><span class="cx"> 
</span><span class="cx"> #define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
</span><span class="cx">     macro(PDFScaleFactor, pdfScaleFactor, Double, double, 0) \
</span></span></pre></div>
<a id="branchessafari6001416branchSourceWebKit2UIProcessAPICWKPreferencescpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (185375 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp        2015-06-09 20:22:44 UTC (rev 185375)
+++ branches/safari-600.1.4.16-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -1295,3 +1295,13 @@
</span><span class="cx"> {
</span><span class="cx">     return toImpl(preferencesRef)-&gt;minimumZoomFontSize();
</span><span class="cx"> }
</span><ins>+
+void WKPreferencesSetMetaRefreshEnabled(WKPreferencesRef preferencesRef, bool enabled)
+{
+    toImpl(preferencesRef)-&gt;setMetaRefreshEnabled(enabled);
+}
+
+bool WKPreferencesGetMetaRefreshEnabled(WKPreferencesRef preferencesRef)
+{
+    return toImpl(preferencesRef)-&gt;metaRefreshEnabled();
+}
</ins></span></pre></div>
<a id="branchessafari6001416branchSourceWebKit2UIProcessAPICWKPreferencesRefPrivateh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h (185375 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h        2015-06-09 20:22:44 UTC (rev 185375)
+++ branches/safari-600.1.4.16-branch/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -338,6 +338,10 @@
</span><span class="cx"> WK_EXPORT void WKPreferencesSetMinimumZoomFontSize(WKPreferencesRef preferencesRef, double);
</span><span class="cx"> WK_EXPORT double WKPreferencesGetMinimumZoomFontSize(WKPreferencesRef preferencesRef);
</span><span class="cx"> 
</span><ins>+// Defaults to true.
+WK_EXPORT void WKPreferencesSetMetaRefreshEnabled(WKPreferencesRef preferences, bool enabled);
+WK_EXPORT bool WKPreferencesGetMetaRefreshEnabled(WKPreferencesRef preferences);
+
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="branchessafari6001416branchSourceWebKit2WebProcessInjectedBundleInjectedBundlecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (185375 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp        2015-06-09 20:22:44 UTC (rev 185375)
+++ branches/safari-600.1.4.16-branch/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -221,7 +221,8 @@
</span><span class="cx">     macro(WebKitShouldRespectImageOrientation, ShouldRespectImageOrientation, shouldRespectImageOrientation) \
</span><span class="cx">     macro(WebKitEnableCaretBrowsing, CaretBrowsingEnabled, caretBrowsingEnabled) \
</span><span class="cx">     macro(WebKitDisplayImagesKey, LoadsImagesAutomatically, loadsImagesAutomatically) \
</span><del>-    macro(WebKitMediaStreamEnabled, MediaStreamEnabled, mediaStreamEnabled)
</del><ins>+    macro(WebKitMediaStreamEnabled, MediaStreamEnabled, mediaStreamEnabled) \
+    macro(WebKitMetaRefreshEnabled, MetaRefreshEnabled, metaRefreshEnabled)
</ins><span class="cx"> 
</span><span class="cx"> #define OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(TestRunnerName, SettingsName, WebPreferencesName) \
</span><span class="cx">     if (preference == #TestRunnerName) { \
</span></span></pre></div>
<a id="branchessafari6001416branchSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (185375 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-06-09 20:22:44 UTC (rev 185375)
+++ branches/safari-600.1.4.16-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -2749,6 +2749,8 @@
</span><span class="cx">     settings.setInteractiveFormValidationEnabled(store.getBoolValueForKey(WebPreferencesKey::interactiveFormValidationEnabledKey()));
</span><span class="cx">     settings.setSpatialNavigationEnabled(store.getBoolValueForKey(WebPreferencesKey::spatialNavigationEnabledKey()));
</span><span class="cx"> 
</span><ins>+    settings.setMetaRefreshEnabled(store.getBoolValueForKey(WebPreferencesKey::metaRefreshEnabledKey()));
+
</ins><span class="cx"> #if ENABLE(SQL_DATABASE)
</span><span class="cx">     DatabaseManager::manager().setIsAvailable(store.getBoolValueForKey(WebPreferencesKey::databasesEnabledKey()));
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="branchessafari6001416branchToolsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/Tools/ChangeLog (185375 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/Tools/ChangeLog        2015-06-09 20:22:44 UTC (rev 185375)
+++ branches/safari-600.1.4.16-branch/Tools/ChangeLog        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2015-06-08  Babak Shafiei  &lt;bshafiei@apple.com&gt;
+
+        Merge r183682.
+
+    2015-05-01  Brady Eidson  &lt;beidson@apple.com&gt;
+
+            Add API to disable meta refreshes.
+            &lt;rdar://problem/20333198&gt; and https://bugs.webkit.org/show_bug.cgi?id=144269
+
+            Reviewed by Alexey Proskuryakov.
+
+            * DumpRenderTree/mac/DumpRenderTree.mm:
+            (resetWebPreferencesToConsistentValues): Reset the meta refresh pref between tests.
+
</ins><span class="cx"> 2015-01-28  David Kilzer  &lt;ddkilzer@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         run-webkit-tests: Merge 46 commits from trunk to make it work
</span></span></pre></div>
<a id="branchessafari6001416branchToolsDumpRenderTreemacDumpRenderTreemm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/Tools/DumpRenderTree/mac/DumpRenderTree.mm (185375 => 185376)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2015-06-09 20:22:44 UTC (rev 185375)
+++ branches/safari-600.1.4.16-branch/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2015-06-09 20:23:45 UTC (rev 185376)
</span><span class="lines">@@ -853,6 +853,8 @@
</span><span class="cx">     [preferences setLoadsSiteIconsIgnoringImageLoadingPreference:NO];
</span><span class="cx">     [preferences setFrameFlatteningEnabled:NO];
</span><span class="cx">     [preferences setSpatialNavigationEnabled:NO];
</span><ins>+    [preferences setMetaRefreshEnabled:YES];
+
</ins><span class="cx">     if (persistentUserStyleSheetLocation) {
</span><span class="cx">         [preferences setUserStyleSheetLocation:[NSURL URLWithString:(NSString *)(persistentUserStyleSheetLocation.get())]];
</span><span class="cx">         [preferences setUserStyleSheetEnabled:YES];
</span></span></pre>
</div>
</div>

</body>
</html>