<!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>[180020] trunk</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/180020">180020</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2015-02-12 15:23:55 -0800 (Thu, 12 Feb 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Drop the quirks-mode exception for CSS MIME types
https://bugs.webkit.org/show_bug.cgi?id=141501

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Drop the quirks-mode exception for CSS MIME types.
This matches Firefox's behavior.

This patch is based on the following Blink revision:
http://src.chromium.org/viewvc/blink?view=revision&amp;revision=189669

Tests:
- http/tests/misc/css-accept-any-type.html
- http/tests/security/cross-origin-css.html

* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parseAuthorStyleSheet):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::setCSSStyleSheet):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceContent):
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::sheetText):
(WebCore::CachedCSSStyleSheet::canUseSheet):
* loader/cache/CachedCSSStyleSheet.h:

LayoutTests:

Update a couple of layout tests now that we dropped the quirks-mode
exception for CSS MIME types.

* http/tests/misc/css-accept-any-type-expected.txt:
* http/tests/misc/css-accept-any-type.html:
* http/tests/security/cross-origin-css-expected.txt:
* http/tests/security/cross-origin-css.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestshttptestsmisccssacceptanytypeexpectedtxt">trunk/LayoutTests/http/tests/misc/css-accept-any-type-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsmisccssacceptanytypehtml">trunk/LayoutTests/http/tests/misc/css-accept-any-type.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycrossorigincssexpectedtxt">trunk/LayoutTests/http/tests/security/cross-origin-css-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycrossorigincsshtml">trunk/LayoutTests/http/tests/security/cross-origin-css.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssStyleSheetContentscpp">trunk/Source/WebCore/css/StyleSheetContents.cpp</a></li>
<li><a href="#trunkSourceWebCoredomProcessingInstructioncpp">trunk/Source/WebCore/dom/ProcessingInstruction.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorPageAgentcpp">trunk/Source/WebCore/inspector/InspectorPageAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedCSSStyleSheetcpp">trunk/Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedCSSStyleSheeth">trunk/Source/WebCore/loader/cache/CachedCSSStyleSheet.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (180019 => 180020)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-02-12 23:10:30 UTC (rev 180019)
+++ trunk/LayoutTests/ChangeLog        2015-02-12 23:23:55 UTC (rev 180020)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2015-02-12  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Drop the quirks-mode exception for CSS MIME types
+        https://bugs.webkit.org/show_bug.cgi?id=141501
+
+        Reviewed by Alexey Proskuryakov.
+
+        Update a couple of layout tests now that we dropped the quirks-mode
+        exception for CSS MIME types.
+
+        * http/tests/misc/css-accept-any-type-expected.txt:
+        * http/tests/misc/css-accept-any-type.html:
+        * http/tests/security/cross-origin-css-expected.txt:
+        * http/tests/security/cross-origin-css.html:
+
</ins><span class="cx"> 2015-02-12  Beth Dakin  &lt;bdakin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION: Should not send wheel events with a delta of 0
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsmisccssacceptanytypeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/misc/css-accept-any-type-expected.txt (180019 => 180020)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/misc/css-accept-any-type-expected.txt        2015-02-12 23:10:30 UTC (rev 180019)
+++ trunk/LayoutTests/http/tests/misc/css-accept-any-type-expected.txt        2015-02-12 23:23:55 UTC (rev 180020)
</span><span class="lines">@@ -1,3 +1,3 @@
</span><del>-Test for http://bugs.webkit.org/show_bug.cgi?id=11451 REGRESSION: Dell.com does not render correctly in ToT (stylesheet not loaded).
</del><ins>+This was a test for http://bugs.webkit.org/show_bug.cgi?id=11451 REGRESSION: Dell.com does not render correctly in ToT (stylesheet not loaded): given the security implications of accepting bad MIME types, we're now intentionally breaking this case to match other browsers.
</ins><span class="cx"> 
</span><span class="cx"> SUCCESS
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsmisccssacceptanytypehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/misc/css-accept-any-type.html (180019 => 180020)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/misc/css-accept-any-type.html        2015-02-12 23:10:30 UTC (rev 180019)
+++ trunk/LayoutTests/http/tests/misc/css-accept-any-type.html        2015-02-12 23:23:55 UTC (rev 180020)
</span><span class="lines">@@ -10,14 +10,17 @@
</span><span class="cx">             
</span><span class="cx">             var target = document.getElementById(&quot;target&quot;);
</span><span class="cx">             var style = getComputedStyle(target);
</span><del>-            target.innerText = style.position == &quot;relative&quot; ? &quot;SUCCESS&quot; : &quot;FAIL&quot;;
</del><ins>+            target.innerText = style.position == &quot;relative&quot; ? &quot;FAIL&quot; : &quot;SUCCESS&quot;;
</ins><span class="cx">         }
</span><span class="cx">     &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body onload=&quot;test()&quot;&gt;
</span><span class="cx">     &lt;p&gt;
</span><del>-        Test for &lt;i&gt;&lt;a href=&quot;http://bugs.webkit.org/show_bug.cgi?id=11451&quot;&gt;http://bugs.webkit.org/show_bug.cgi?id=11451&lt;/a&gt;
-        REGRESSION: Dell.com does not render correctly in ToT (stylesheet not loaded)&lt;/i&gt;.
</del><ins>+        This was a test for
+        &lt;i&gt;&lt;a href=&quot;http://bugs.webkit.org/show_bug.cgi?id=11451&quot;&gt;http://bugs.webkit.org/show_bug.cgi?id=11451&lt;/a&gt;
+        REGRESSION: Dell.com does not render correctly in ToT (stylesheet not loaded)&lt;/i&gt;:
+        given the security implications of accepting bad MIME types, we're now
+        intentionally breaking this case to match other browsers.
</ins><span class="cx">     &lt;/p&gt;
</span><span class="cx">     &lt;p id=&quot;target&quot;&gt;
</span><span class="cx">     &lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycrossorigincssexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/cross-origin-css-expected.txt (180019 => 180020)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/cross-origin-css-expected.txt        2015-02-12 23:10:30 UTC (rev 180019)
+++ trunk/LayoutTests/http/tests/security/cross-origin-css-expected.txt        2015-02-12 23:23:55 UTC (rev 180020)
</span><span class="lines">@@ -1,7 +1,11 @@
</span><del>-LINK Cross-origin, HTML, valid: rgb(255, 255, 0)
-LINK + IMPORT Cross-origin, HTML, invalid: rgba(0, 0, 0, 0)
-LINK Cross-origin, CSS, invalid: rgb(255, 255, 0)
-LINK Same-origin, HTML, invalid: rgb(255, 255, 0)
-IMPORT Cross-origin, HTML, valid: rgb(255, 255, 0)
-IMPORT Cross-origin, CSS, invalid: rgb(255, 255, 0)
-IMPORT Same-origin, HTML, invalid: rgb(255, 255, 0)
</del><ins>+PASS background image loaded
+
+PASS Testing cross-origin and MIME behavior for CSS. 
+PASS xorigincss1.html should not be loaded via . 
+PASS xorigincss2.html should not be loaded either via  or @import. 
+PASS xorigincss1.css should be loaded via  
+PASS xorigincss3.html should not be loaded, even though it is same-origin 
+PASS xorigincss4.html should not be loaded via @import. 
+PASS xorigincss2.css should be loaded. 
+PASS xorigincss5.html should not be loaded. 
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycrossorigincsshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/cross-origin-css.html (180019 => 180020)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/cross-origin-css.html        2015-02-12 23:10:30 UTC (rev 180019)
+++ trunk/LayoutTests/http/tests/security/cross-origin-css.html        2015-02-12 23:23:55 UTC (rev 180020)
</span><span class="lines">@@ -1,5 +1,12 @@
</span><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;title&gt;Cross-origin CSS&lt;/title&gt;
+
+&lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+
+&lt;!-- Bring in various same- and cross-origin stylesheets. --&gt;
</ins><span class="cx"> &lt;link rel=&quot;stylesheet&quot;
</span><span class="cx">       href=&quot;/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss1.html&quot;&gt;&lt;/link&gt;
</span><span class="cx"> &lt;link rel=&quot;stylesheet&quot;
</span><span class="lines">@@ -9,39 +16,68 @@
</span><span class="cx">       href=&quot;/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss1.css&quot;&gt;&lt;/link&gt;
</span><span class="cx"> &lt;link rel=&quot;stylesheet&quot;
</span><span class="cx">       href=&quot;resources/xorigincss3.html&quot;&gt;&lt;/link&gt;
</span><del>-&lt;script&gt;
-if (window.testRunner) {
-  testRunner.waitUntilDone();
-  testRunner.dumpAsText();
-}
</del><span class="cx"> 
</span><del>-window.onload = function() {
-  ele = document.getElementById(&quot;id1&quot;);
-  ele.innerText = &quot;LINK Cross-origin, HTML, valid: &quot; + window.getComputedStyle(ele, null).getPropertyValue('background-color');
-  ele = document.getElementById(&quot;id2&quot;);
-  ele.innerText = &quot;LINK + IMPORT Cross-origin, HTML, invalid: &quot; + window.getComputedStyle(ele, null).getPropertyValue('background-color');
-  ele = document.getElementById(&quot;id3&quot;);
-  ele.innerText = &quot;LINK Cross-origin, CSS, invalid: &quot; + window.getComputedStyle(ele, null).getPropertyValue('background-color');
-  ele = document.getElementById(&quot;id4&quot;);
-  ele.innerText = &quot;LINK Same-origin, HTML, invalid: &quot; + window.getComputedStyle(ele, null).getPropertyValue('background-color');
-  ele = document.getElementById(&quot;id5&quot;);
-  ele.innerText = &quot;IMPORT Cross-origin, HTML, valid: &quot; + window.getComputedStyle(ele, null).getPropertyValue('background-color');
-  ele = document.getElementById(&quot;id6&quot;);
-  ele.innerText = &quot;IMPORT Cross-origin, CSS, invalid: &quot; + window.getComputedStyle(ele, null).getPropertyValue('background-color');
-  ele = document.getElementById(&quot;id7&quot;);
-  ele.innerText = &quot;IMPORT Same-origin, HTML, invalid: &quot; + window.getComputedStyle(ele, null).getPropertyValue('background-color');
-
-  if (window.testRunner)
-    testRunner.notifyDone();
-}
-&lt;/script&gt;
</del><span class="cx"> &lt;style&gt;
</span><span class="cx"> /* Deliberately reuse the same file / class / id on this first one */
</span><span class="cx"> @import &quot;/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss2.html&quot;;
</span><span class="cx"> @import &quot;/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss4.html&quot;;
</span><span class="cx"> @import &quot;/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss2.css&quot;;
</span><span class="cx"> @import &quot;resources/xorigincss5.html&quot;;
</span><ins>+
+/* Check that data: is still allowed for non-CORS cross-origin image fetches. */
+#data-background-url {
+    content: &quot;PASS (image loaded)&quot;;
+    background: url(&quot;data:image/svg+xml;utf8,&lt;svg xmlns='http://www.w3.org/2000/svg' width='0px' height='0px'&gt;&lt;/svg&gt;&quot;);
+}
</ins><span class="cx"> &lt;/style&gt;
</span><ins>+&lt;script&gt;
+function getBackgroundColorForId(id) {
+    return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
+}
+
+var onloadTest = async_test(&quot;Testing cross-origin and MIME behavior for CSS.&quot;);
+
+window.onload = function () {
+    test(function () {
+        assert_equals(getBackgroundColorForId('id1'), 'rgba(0, 0, 0, 0)');
+    }, 'xorigincss1.html should not be loaded via &lt;link&gt;.');
+
+    test(function () {
+        assert_equals(getBackgroundColorForId('id2'), 'rgba(0, 0, 0, 0)');
+    }, 'xorigincss2.html should not be loaded either via &lt;link&gt; or @import.');
+
+    test(function () {
+        assert_equals(getBackgroundColorForId('id3'), 'rgb(255, 255, 0)');
+    }, 'xorigincss1.css should be loaded via &lt;link&gt;');
+
+    test(function () {
+        assert_equals(getBackgroundColorForId('id4'), 'rgba(0, 0, 0, 0)');
+    }, 'xorigincss3.html should not be loaded, even though it is same-origin');
+
+    test(function () {
+        assert_equals(getBackgroundColorForId('id5'), 'rgba(0, 0, 0, 0)');
+    }, 'xorigincss4.html should not be loaded via @import.');
+
+    test(function () {
+        assert_equals(getBackgroundColorForId('id6'), 'rgb(255, 255, 0)');
+    }, 'xorigincss2.css should be loaded.');
+
+    test(function () {
+        assert_equals(getBackgroundColorForId('id7'), 'rgba(0, 0, 0, 0)');
+    }, 'xorigincss5.html should not be loaded.');
+
+    onloadTest.done();
+};
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><del>-&lt;body&gt;&lt;div id=&quot;id1&quot; class=&quot;id1&quot;&gt;&lt;/div&gt;&lt;div id=&quot;id2&quot; class=&quot;id2&quot;&gt;&lt;/div&gt;&lt;div id=&quot;id3&quot; class=&quot;id3&quot;&gt;&lt;/div&gt;&lt;div id=&quot;id4&quot; class=&quot;id4&quot;&gt;&lt;/div&gt;&lt;div id=&quot;id5&quot; class=&quot;id5&quot;&gt;&lt;/div&gt;&lt;div id=&quot;id6&quot; class=&quot;id6&quot;&gt;&lt;/div&gt;&lt;div id=&quot;id7&quot; class=&quot;id7&quot;&gt;&lt;/div&gt;&lt;/body&gt;
</del><ins>+&lt;body&gt;
+    &lt;div id=&quot;id1&quot; class=&quot;id1&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;id2&quot; class=&quot;id2&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;id3&quot; class=&quot;id3&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;id4&quot; class=&quot;id4&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;id5&quot; class=&quot;id5&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;id6&quot; class=&quot;id6&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;id7&quot; class=&quot;id7&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;data-background-url&quot;&gt;PASS background image loaded&lt;/div&gt;
+&lt;/body&gt;
</ins><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (180019 => 180020)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-02-12 23:10:30 UTC (rev 180019)
+++ trunk/Source/WebCore/ChangeLog        2015-02-12 23:23:55 UTC (rev 180020)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2015-02-12  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Drop the quirks-mode exception for CSS MIME types
+        https://bugs.webkit.org/show_bug.cgi?id=141501
+
+        Reviewed by Alexey Proskuryakov.
+
+        Drop the quirks-mode exception for CSS MIME types.
+        This matches Firefox's behavior.
+
+        This patch is based on the following Blink revision:
+        http://src.chromium.org/viewvc/blink?view=revision&amp;revision=189669
+
+        Tests:
+        - http/tests/misc/css-accept-any-type.html
+        - http/tests/security/cross-origin-css.html
+
+        * css/StyleSheetContents.cpp:
+        (WebCore::StyleSheetContents::parseAuthorStyleSheet):
+        * dom/ProcessingInstruction.cpp:
+        (WebCore::ProcessingInstruction::setCSSStyleSheet):
+        * inspector/InspectorPageAgent.cpp:
+        (WebCore::InspectorPageAgent::cachedResourceContent):
+        * loader/cache/CachedCSSStyleSheet.cpp:
+        (WebCore::CachedCSSStyleSheet::sheetText):
+        (WebCore::CachedCSSStyleSheet::canUseSheet):
+        * loader/cache/CachedCSSStyleSheet.h:
+
</ins><span class="cx"> 2015-02-12  Beth Dakin  &lt;bdakin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION: Should not send wheel events with a delta of 0
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleSheetContentscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleSheetContents.cpp (180019 => 180020)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleSheetContents.cpp        2015-02-12 23:10:30 UTC (rev 180019)
+++ trunk/Source/WebCore/css/StyleSheetContents.cpp        2015-02-12 23:23:55 UTC (rev 180020)
</span><span class="lines">@@ -285,11 +285,8 @@
</span><span class="cx"> 
</span><span class="cx"> void StyleSheetContents::parseAuthorStyleSheet(const CachedCSSStyleSheet* cachedStyleSheet, const SecurityOrigin* securityOrigin)
</span><span class="cx"> {
</span><del>-    // Check to see if we should enforce the MIME type of the CSS resource in strict mode.
-    // Running in iWeb 2 is one example of where we don't want to - &lt;rdar://problem/6099748&gt;
-    bool enforceMIMEType = isStrictParserMode(m_parserContext.mode) &amp;&amp; m_parserContext.enforcesCSSMIMETypeInNoQuirksMode;
</del><span class="cx">     bool hasValidMIMEType = false;
</span><del>-    String sheetText = cachedStyleSheet-&gt;sheetText(enforceMIMEType, &amp;hasValidMIMEType);
</del><ins>+    String sheetText = cachedStyleSheet-&gt;sheetText(&amp;hasValidMIMEType);
</ins><span class="cx"> 
</span><span class="cx">     CSSParser p(parserContext());
</span><span class="cx">     p.parseSheet(this, sheetText, 0, 0, true);
</span></span></pre></div>
<a id="trunkSourceWebCoredomProcessingInstructioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ProcessingInstruction.cpp (180019 => 180020)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ProcessingInstruction.cpp        2015-02-12 23:10:30 UTC (rev 180019)
+++ trunk/Source/WebCore/dom/ProcessingInstruction.cpp        2015-02-12 23:23:55 UTC (rev 180020)
</span><span class="lines">@@ -207,7 +207,7 @@
</span><span class="cx">     // We don't need the cross-origin security check here because we are
</span><span class="cx">     // getting the sheet text in &quot;strict&quot; mode. This enforces a valid CSS MIME
</span><span class="cx">     // type.
</span><del>-    parseStyleSheet(sheet-&gt;sheetText(true));
</del><ins>+    parseStyleSheet(sheet-&gt;sheetText());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(XSLT)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorPageAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorPageAgent.cpp (180019 => 180020)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorPageAgent.cpp        2015-02-12 23:10:30 UTC (rev 180019)
+++ trunk/Source/WebCore/inspector/InspectorPageAgent.cpp        2015-02-12 23:23:55 UTC (rev 180020)
</span><span class="lines">@@ -155,7 +155,7 @@
</span><span class="cx">     if (cachedResource) {
</span><span class="cx">         switch (cachedResource-&gt;type()) {
</span><span class="cx">         case CachedResource::CSSStyleSheet:
</span><del>-            *result = downcast&lt;CachedCSSStyleSheet&gt;(*cachedResource).sheetText(false);
</del><ins>+            *result = downcast&lt;CachedCSSStyleSheet&gt;(*cachedResource).sheetText();
</ins><span class="cx">             return true;
</span><span class="cx">         case CachedResource::Script:
</span><span class="cx">             *result = downcast&lt;CachedScript&gt;(*cachedResource).script();
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedCSSStyleSheetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp (180019 => 180020)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp        2015-02-12 23:10:30 UTC (rev 180019)
+++ trunk/Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp        2015-02-12 23:23:55 UTC (rev 180020)
</span><span class="lines">@@ -78,9 +78,9 @@
</span><span class="cx">     return m_decoder-&gt;encoding().name();
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-const String CachedCSSStyleSheet::sheetText(bool enforceMIMEType, bool* hasValidMIMEType) const 
</del><ins>+const String CachedCSSStyleSheet::sheetText(bool* hasValidMIMEType) const
</ins><span class="cx"> { 
</span><del>-    if (!m_data || m_data-&gt;isEmpty() || !canUseSheet(enforceMIMEType, hasValidMIMEType))
</del><ins>+    if (!m_data || m_data-&gt;isEmpty() || !canUseSheet(hasValidMIMEType))
</ins><span class="cx">         return String();
</span><span class="cx">     
</span><span class="cx">     if (!m_decodedSheetText.isNull())
</span><span class="lines">@@ -113,13 +113,10 @@
</span><span class="cx">         c-&gt;setCSSStyleSheet(m_resourceRequest.url(), m_response.url(), m_decoder-&gt;encoding().name(), this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CachedCSSStyleSheet::canUseSheet(bool enforceMIMEType, bool* hasValidMIMEType) const
</del><ins>+bool CachedCSSStyleSheet::canUseSheet(bool* hasValidMIMEType) const
</ins><span class="cx"> {
</span><span class="cx">     if (errorOccurred())
</span><span class="cx">         return false;
</span><del>-        
-    if (!enforceMIMEType &amp;&amp; !hasValidMIMEType)
-        return true;
</del><span class="cx"> 
</span><span class="cx">     // This check exactly matches Firefox.  Note that we grab the Content-Type
</span><span class="cx">     // header directly because we want to see what the value is BEFORE content
</span><span class="lines">@@ -132,8 +129,6 @@
</span><span class="cx">     bool typeOK = mimeType.isEmpty() || equalIgnoringCase(mimeType, &quot;text/css&quot;) || equalIgnoringCase(mimeType, &quot;application/x-unknown-content-type&quot;);
</span><span class="cx">     if (hasValidMIMEType)
</span><span class="cx">         *hasValidMIMEType = typeOK;
</span><del>-    if (!enforceMIMEType)
-        return true;
</del><span class="cx">     return typeOK;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedCSSStyleSheeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedCSSStyleSheet.h (180019 => 180020)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedCSSStyleSheet.h        2015-02-12 23:10:30 UTC (rev 180019)
+++ trunk/Source/WebCore/loader/cache/CachedCSSStyleSheet.h        2015-02-12 23:23:55 UTC (rev 180020)
</span><span class="lines">@@ -41,13 +41,13 @@
</span><span class="cx">         CachedCSSStyleSheet(const ResourceRequest&amp;, const String&amp; charset, SessionID);
</span><span class="cx">         virtual ~CachedCSSStyleSheet();
</span><span class="cx"> 
</span><del>-        const String sheetText(bool enforceMIMEType = true, bool* hasValidMIMEType = 0) const;
</del><ins>+        const String sheetText(bool* hasValidMIMEType = nullptr) const;
</ins><span class="cx"> 
</span><span class="cx">         PassRefPtr&lt;StyleSheetContents&gt; restoreParsedStyleSheet(const CSSParserContext&amp;);
</span><span class="cx">         void saveParsedStyleSheet(Ref&lt;StyleSheetContents&gt;&amp;&amp;);
</span><span class="cx"> 
</span><span class="cx">     private:
</span><del>-        bool canUseSheet(bool enforceMIMEType, bool* hasValidMIMEType) const;
</del><ins>+        bool canUseSheet(bool* hasValidMIMEType) const;
</ins><span class="cx">         virtual bool mayTryReplaceEncodedData() const override { return true; }
</span><span class="cx"> 
</span><span class="cx">         virtual void didAddClient(CachedResourceClient*) override;
</span></span></pre>
</div>
</div>

</body>
</html>