Title: [135584] trunk
Revision
135584
Author
[email protected]
Date
2012-11-23 03:27:30 -0800 (Fri, 23 Nov 2012)

Log Message

[Qt] REGRESSION(r135507): It made 13 tests fail
https://bugs.webkit.org/show_bug.cgi?id=103069

Reviewed by Simon Hausmann.

Source/WebCore:

The subframe loading logic depends on that script extensions are not recognized,
so avoid recognizing them in getMIMETypeForExtension which is used for pre-load
mimetype detection.

* platform/qt/MIMETypeRegistryQt.cpp:
(WebCore::MIMETypeRegistry::getMIMETypeForExtension):

LayoutTests:

Unskip the last of test regressions now passing.

* platform/qt/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (135583 => 135584)


--- trunk/LayoutTests/ChangeLog	2012-11-23 11:22:39 UTC (rev 135583)
+++ trunk/LayoutTests/ChangeLog	2012-11-23 11:27:30 UTC (rev 135584)
@@ -1,3 +1,14 @@
+2012-11-23  Allan Sandfeld Jensen  <[email protected]>
+
+        [Qt] REGRESSION(r135507): It made 13 tests fail
+        https://bugs.webkit.org/show_bug.cgi?id=103069
+
+        Reviewed by Simon Hausmann.
+
+        Unskip the last of test regressions now passing.
+
+        * platform/qt/TestExpectations:
+
 2012-11-23  Yury Semikhatsky  <[email protected]>
 
         Unreviewed. Updated test expectations.

Modified: trunk/LayoutTests/platform/qt/TestExpectations (135583 => 135584)


--- trunk/LayoutTests/platform/qt/TestExpectations	2012-11-23 11:22:39 UTC (rev 135583)
+++ trunk/LayoutTests/platform/qt/TestExpectations	2012-11-23 11:27:30 UTC (rev 135584)
@@ -2383,8 +2383,3 @@
 
 # Fails until we enable the Resource Timing API.
 webkit.org/b/61138 http/tests/w3c/webperf/submission/resource-timing [ Skip ]
-
-# [Qt] REGRESSION(r135507): It made 13 tests fail
-# https://bugs.webkit.org/show_bug.cgi?id=103069
-http/tests/navigation/reload-subframe-object.html
-

Modified: trunk/Source/WebCore/ChangeLog (135583 => 135584)


--- trunk/Source/WebCore/ChangeLog	2012-11-23 11:22:39 UTC (rev 135583)
+++ trunk/Source/WebCore/ChangeLog	2012-11-23 11:27:30 UTC (rev 135584)
@@ -1,3 +1,17 @@
+2012-11-23  Allan Sandfeld Jensen  <[email protected]>
+
+        [Qt] REGRESSION(r135507): It made 13 tests fail
+        https://bugs.webkit.org/show_bug.cgi?id=103069
+
+        Reviewed by Simon Hausmann.
+
+        The subframe loading logic depends on that script extensions are not recognized,
+        so avoid recognizing them in getMIMETypeForExtension which is used for pre-load
+        mimetype detection.
+
+        * platform/qt/MIMETypeRegistryQt.cpp:
+        (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
+
 2012-11-23  Jochen Eisinger  <[email protected]>
 
         REGRESSION (r135455): Compilation without SVG enabled broken

Modified: trunk/Source/WebCore/platform/qt/MIMETypeRegistryQt.cpp (135583 => 135584)


--- trunk/Source/WebCore/platform/qt/MIMETypeRegistryQt.cpp	2012-11-23 11:22:39 UTC (rev 135583)
+++ trunk/Source/WebCore/platform/qt/MIMETypeRegistryQt.cpp	2012-11-23 11:27:30 UTC (rev 135584)
@@ -57,8 +57,13 @@
     const QString filename = QStringLiteral("filename.") + QString(suffix);
 
     QMimeType mimeType = QMimeDatabase().mimeTypeForFile(filename, QMimeDatabase::MatchExtension);
-    if (mimeType.isValid() && !mimeType.isDefault())
+    if (mimeType.isValid() && !mimeType.isDefault()) {
+        // getMIMETypeForExtension is used for preload mimetype check, so image looking files can not be loaded as anything but images.
+        // Script looking files (.php) are loaded normally and will have their mimetype determined later.
+        if (mimeType.inherits(QStringLiteral("application/x-executable")))
+            return String();
         return mimeType.name();
+    }
 
     const ExtensionMap *e = extensionMap;
     while (e->extension) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to