Title: [182881] trunk/Source/WebCore
Revision
182881
Author
cdu...@apple.com
Date
2015-04-16 00:47:31 -0700 (Thu, 16 Apr 2015)

Log Message

Tests introduced in r182877 are flaky
https://bugs.webkit.org/show_bug.cgi?id=143784

Reviewed by Alexey Proskuryakov.

Tests introduced in r182877 are flaky as the line number sometimes
appears in the console messages. This patch updates the console
logging code so that no Document is provided when logging. Therefore,
no line number will ever be displayed. In this case, I don't think
having the line number is terribly useful anyway.

* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parseAuthorStyleSheet):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (182880 => 182881)


--- trunk/Source/WebCore/ChangeLog	2015-04-16 05:59:18 UTC (rev 182880)
+++ trunk/Source/WebCore/ChangeLog	2015-04-16 07:47:31 UTC (rev 182881)
@@ -1,3 +1,19 @@
+2015-04-16  Chris Dumez  <cdu...@apple.com>
+
+        Tests introduced in r182877 are flaky
+        https://bugs.webkit.org/show_bug.cgi?id=143784
+
+        Reviewed by Alexey Proskuryakov.
+
+        Tests introduced in r182877 are flaky as the line number sometimes
+        appears in the console messages. This patch updates the console
+        logging code so that no Document is provided when logging. Therefore,
+        no line number will ever be displayed. In this case, I don't think
+        having the line number is terribly useful anyway.
+
+        * css/StyleSheetContents.cpp:
+        (WebCore::StyleSheetContents::parseAuthorStyleSheet):
+
 2015-04-15  Simon Fraser  <simon.fra...@apple.com>
 
         We should dump GraphicsLayer's anchorPoint z component

Modified: trunk/Source/WebCore/css/StyleSheetContents.cpp (182880 => 182881)


--- trunk/Source/WebCore/css/StyleSheetContents.cpp	2015-04-16 05:59:18 UTC (rev 182880)
+++ trunk/Source/WebCore/css/StyleSheetContents.cpp	2015-04-16 07:47:31 UTC (rev 182881)
@@ -28,6 +28,8 @@
 #include "Document.h"
 #include "MediaList.h"
 #include "Node.h"
+#include "Page.h"
+#include "PageConsoleClient.h"
 #include "RuleSet.h"
 #include "StyleProperties.h"
 #include "StyleRule.h"
@@ -291,8 +293,10 @@
 
     if (!hasValidMIMEType) {
         ASSERT(sheetText.isNull());
-        if (auto* document = singleOwnerDocument())
-            document->addConsoleMessage(MessageSource::Security, MessageLevel::Error, "Did not parse stylesheet at '" + cachedStyleSheet->url().stringCenterEllipsizedToLength() + "' because its MIME type was invalid.");
+        if (auto* document = singleOwnerDocument()) {
+            if (auto* page = document->page())
+                page->console().addMessage(MessageSource::Security, MessageLevel::Error, "Did not parse stylesheet at '" + cachedStyleSheet->url().stringCenterEllipsizedToLength() + "' because its MIME type was invalid.");
+        }
         return;
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to